Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The content of RELS-EXT from object "demo:Object_A1"

Code Block
<rdf:RDF>
    <rdf:Description rdf:about="info:fedora/demo:Object_A1">
        <fedora-model:hasModel rdf:resource="info:fedora/demo:CM_A"/>
        <demo-relations:hasB rdf:resource="info:fedora/demo:Object_B1"/>
    </rdf:Description>
</rdf:RDF>

Since the object assert the relation "<fedora-model:hasModel rdf:resource="info:fedora/demo:CM_A"/>", it has the implicit relation <rdf:type rdf:resource="info:fedora/demo:CM_A#Class"/>

The content of the ONTOLOGY datastream in content model "demo:CM_A"

Code Block
<rdf:RDF>
    <owl:Class rdf:about="info:fedora/demo:CM_A#Class">
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty
                        rdf:resource="http://www.statsbiblioteket.dk/demo-relations/#hasB"/>
                <owl:cardinality
                        rdf:datatype=
                                "http://www.w3.org/2001/XMLSchema#integer">
                    1
                </owl:cardinality>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty
                        rdf:resource="http://www.statsbiblioteket.dk/demo-relations/#hasB"/>
                <owl:allValuesFrom rdf:resource="info:fedora:/demo:CM_B#class"/>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
    <owl:ObjectProperty
            rdf:about="http://www.statsbiblioteket.dk/demo-relations/#hasB"/>
</rdf:RDF>

The content model CM_A is defined. There is one defined relation for objects subscribing to this content model, the #hasB relation. Two restrictions are placed on this relation. There must be one, and just one such relation in subscribing objectss, and it must refer to an object of class demo:CM_B#Class (so, the "target" objects should subscribe to the content model demo:CM_B).

...

RELS-EXT from "demo:Object_B1"

Code Block
<rdf:RDF>
    <rdf:Description rdf:about="info:Fedora/demo:Object_B1">
        <fedora-model:hasModel rdf:resource="info:fedora/demo:CM_B"/>
    </rdf:Description>
</rdf:RDF>

So, Object B1 has the content model CM_B. That make the relation from A1 valid, see above. Lets look at the ontology from content model CM_B.

ONTOLOGY from "demo:CM_B"

Code Block

<rdf:RDF>
    <owl:Class rdf:about="info:Fedora/demo:CM_B#Class">
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty
                        rdf:resource="http://www.statsbiblioteket.dk/demo-relations/#hasA"/>
                <owl:allValuesFrom rdf:resource="info:fedora:/demo:CM_A#Class"/>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
    <owl:ObjectProperty
            rdf:about="http://www.statsbiblioteket.dk/demo-relations/#hasA"/>
</rdf:RDF>

CM_B define on relation, the #hasA relation. There is just one restriction on this relation, that it must refer to something of class demo:CM_A#Class. No cardinality restriction is defined, so B1 does not need to have the relation, and in fact, it does not have it.

Ontologies for datastreams

A Fedora object consists of a number of datastreams. One datastream, RELS-INT has been reserved for the rdf statements "about" the datastreams. Datastreams do not have content models themselves. Rather, datastreams are part of fedora objects, and are thus described by the objects' content models. We expand object B1 from above

Object B1's RELS-EXT datastream. This contain the relations for the object itself.

Code Block

<rdf:RDF>
    <rdf:Description rdf:about="info:fedora/demo:Object_A1">
        <fedora-model:hasModel rdf:resource="info:fedora/demo:CM_A"/>
        <demo-relations:hasB rdf:resource="info:fedora/demo:Object_B1"/>
    </rdf:Description>
</rdf:RDF>

]

Object B1's RELS-INT datastream. This contains the relations for the datastreams in the object.

Code Block

<rdf:RDF>
    <rdf:Description rdf:about="info:fedora/demo:Object_A1/DC">
        <demo-relations:dsRelation1 rdf:resource="info:fedora/demo:Object_A1/DC"/>
        <demo-relations:dsRelation2 rdf:resource="info:fedora/demo:Object_A1"/>
    </rdf:Description>
    <rdf:Description rdf:about="info:fedora/demo:Object_A1/RELS-EXT"/>
</rdf:RDF>

]

Even through the RDF statements in the object is separated into these two datastreams, the content models have just one ONTOLOGY datastream, but with multiple class declarations.

Code Block

<rdf:RDF>
    <owl:Class rdf:about="info:Fedora/demo:CM_A#Class">
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty
                        rdf:resource="http://www.statsbiblioteket.dk/demo-relations/#hasA"/>
                <owl:allValuesFrom rdf:resource="info:fedora:/demo:CM_A#Class"/>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
    <owl:Class rdf:about="info:Fedora/demo:CM_A/DC#Class">
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty
                        rdf:resource="http://www.statsbiblioteket.dk/demo-relations/#dsRelation1"/>
                <owl:allValuesFrom rdf:resource="info:fedora:/demo:CM_A/DC#Class"/>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty
                        rdf:resource="http://www.statsbiblioteket.dk/demo-relations/#dsRelation2"/>
                <owl:allValuesFrom rdf:resource="info:fedora:/demo:CM_A#Class"/>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
    <owl:Class rdf:about="info:Fedora/demo:CM_A/RELS-EXT#Class"/>
    <owl:ObjectProperty
            rdf:about="http://www.statsbiblioteket.dk/demo-relations/#hasA"/>
    <owl:ObjectProperty
            rdf:about="http://www.statsbiblioteket.dk/demo-relations/#dsRelation1"/>
    <owl:ObjectProperty
            rdf:about="http://www.statsbiblioteket.dk/demo-relations/#dsRelation2"/>
</rdf:RDF>

Three classes are defined, one for the object, one for the DC datastream, and one for the RELS-EXT datastream. Three object relations are also defined. The class for the object contain the restrictions defined above. The class for the RELS-EXT datastream contain no restrictions, and the class for the DC datastream contain the restrictions on #dsRelation1 and #dsRelations2.

Please note the naming collision. The identifier of the RELS-EXT datastream in the content model is "info:fedora/demo:CM_B/RELS-EXT". The identifier for the class of the datastreams in objects subscribing to this content model is "info:fedora/demo:CM_B/RELS-EXT#Class".