Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: I tried to make this discussion of complex issues a bit clearer.

...

If you wish to create a new COLLECTION_POLICY stream, you will be writing XML. One way to do this is to start with an example collection policy (there is one available in ... .[supply an example]) and edit it. The DSID of this datastream must be COLLECTION_POLICY.

QUERY

A QUERY Datastream is an ITQL iTQL query that overrides the Islandora’s default ITQL iTQL query. If you have declared different relationships (not a hasModel relationship) in your COLLECTION_POLICY Datastream, you will have to write a custom QUERY stream to return these relationships. In order to do this, you will have to have an understanding of ITQLiTQL. Resources for learning ITQL iTQL are offered in the Bibliography for this guide. Your ITQL iTQL query must return SPARQL XML to be parsed by the default collection view xslt file, or by a custom COLLECTION_VIEW xslt that you have written yourself.

When you write a QUERY Datastream, you ask the Islandora module to retrieve items that have a different set of objects related to your collection object from those in the default ITQL query. The default ITQL iTQL query is located in the islandora module in the collection_class.inc file. This is the query:

Code Block
$query_string = '
select $object $title $content 
from <#ri> 
where ($object <dc:title> $title 
and $object <fedora-model:hasModel>
 $content 
and ($object <fedora-rels-ext:isMemberOfCollection> <info:fedora/' . $pid . '>

or $object <fedora-rels-ext:isMemberOf> <info:fedora/' . $pid . '>)
and $object <fedora-model:state>
 <info:fedora/fedora-system:def/model#Active>)
minus $content <mulgara:is> <info:fedora/fedora-system:FedoraObject-3.0>order0>
order by $title
';

Note that if you write a QUERY Datastream, you may also have to write a COLLECTION_VIEW Datastream to parse and display your results. Sample QUERY Datastreams are provided in the Resources section of this guide.

COLLECTION_VIEW

Every Solution Pack comes with a default XSLT that controls how objects associated with that SP are displayed. This XSLT is called from the Islandora module at object_helper.inc.

If you want want to change the way objects are displayed in a collection, you can override the default XSLT by putting one of your own and in a COLLECTION_VIEW datastream in the collection objectA COLLECTION_VIEW Datastream contains an XSLT that will define how objects in a collection are displayed. You may wish to write a custom COLLECTION_VIEW stream to change the look and feel of your collection for visitors. For a custom XLST used for a COLLECTION_VIEW Datastream, please refer to the samples and resources section.The XSLT in your COLLECTION_VIEW Datastream datastream has to be matched to designed to parse the SPARQL XML returned by either the default ITQL iTQL query used by Islandora (and found in the Islandora module under sparql_2_html.xsl) or the custom QUERY Datastream that you have written. Your XSLT will parse the SPARQL XML returned by either the default query, or the query you have written. This is the default xslt, called from the Islandora module at object_helper.inc.by a custom query you have put into a QUERY datastream in the collection object. For a custom XLST used for a COLLECTION_VIEW Datastream, please refer to the Samples and Resources section.

CHILD_SECURITY

The optional CHILD_SECURITY is an optional Datastream of a collection object. It is a hand-written eXtensible Access Control Markup Language (XACML) policy that provides defines security at the collection level. To learn more about XACML, visit our resources section. The CHILD_SECURITY Datastream interacts with the default set-up of your Fedora repository. In order to use the CHILD_SECURITY stream effectively, you may wish to review the Islandora and Security section of this guide.

The CHILD_SECURITY Datastream overrides whatever default security you have configured as part of your Fedora and Drupal installations (see the Fedora installation section of this document, particularly information about global XACML policies). For example, if objects in your Fedora repository are, by default, available to the public, you may wish to write a CHILD_SECURITY stream for a collection to restrict access to that collection to specific users or to specific Drupal Roles. In order to use the CHILD_SECURITY stream effectively, you may wish to review the Islandora and Security section of this guide.

All of the objects that are ingested as members of a collection object that has a CHILD_SECURITY stream will have a POLICY stream. Without the POLICY Datastream, the objects default to your base security configuration. This means that if you add a CHILD_SECURITY stream to an object after items are already affiliated with the collection, these objects will not adopt the CHILD_SECURITY policies (and they will have no POLICY Datastreams).

...