Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Question

How do I implement collections in Fedora? Can I have collection-based XACML policies and searches?

Answer

In Fedora, you can establish relationships using a RELS-EXT datastream. See this page for more information about relationships. A collection object is just another Fedora object, which has the rdf element like this example:

Code Block
XML
XML
<rdf:Description rdf:about="info:fedora/abc:1"> <!-- (ie the pid of the collection object) -->
  <rel:isCollection>true</rel:isCollection>
</rdf:Description>

which says it is a collection.

A member of this collection would have a RELS-EXT datastream with the element

Code Block
XML
XML
<rdf:Description rdf:about="info:fedora/abc:2">  <!-- (ie the pid of the member object) -->
  <rel:isMemberOf rdf:resource="info:fedora/abc:1" />
</rdf:Description>

This could equally apply to a child collection of the parent collection, in which case it would also include the element

Code Block
XML
XML
<rel:isCollection>true</rel:isCollection>

Here is the full RELS-EXT datastream element for the parent collection above.

Code Block
XML
XML
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
  <foxml:datastreamVersion CREATED="2009-01-12T14:23:20.112Z" ID="RELS-EXT.0" LABEL="Metadata" MIMETYPE="text/xml" SIZE="271">
    <foxml:contentDigest DIGEST="none" TYPE="DISABLED"/>
      <foxml:xmlContent>
        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rel="info:fedora/fedora-system:def/relations-external#">
          <rdf:Description rdf:about="info:fedora/abc:1">
            <rel:isCollection>true</rel:isCollection>
          </rdf:Description>
        </rdf:RDF>
      </foxml:xmlContent>
    </foxml:datastreamVersion>
  </foxml:datastream>

The xacml policies can then applied to the collection objects.

All relationships are indexed by the resource index provided it is turned on. You can query the resource index for all relationship based data. See this page for more information about the resource index.