Versions Compared

Key

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

...

Instead of "rdf:range", one should use the "allValuesFrom" restriction. This restriction defines a range for the property, but only in the given class. As such, the restriction will have no global effect. "rdf:domain" is just not nessesary. The property 3 implies that the ONTOLOGY in a Content Model should describe the local area, i.e. the objects subscribing to that content model. The result of this is that the domain, so to speak, of a property will always be the Content Model in which it was defined. But again, this restriction will have no global effect, the property defined somewhere else will have some other Content Model as its domain.

Example of a simple ontology

Code Block

    <!--RELS-EXT from Object_A1-->
    <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>

    <!--OWL-SCHEMA from CM_A-->
    <owl:Class rdf:about="info:fedora/demo:CM_A">
        <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"/>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
    <owl:ObjectProperty
            rdf:about="http://www.statsbiblioteket.dk/demo-relations/#hasB"/>

An object A1 and a Content model CM_A is defined. There is one defined relation for A1, the #hasB relation. Two restrictions are placed on this relation. There must be one, and just one such relation in A1, and it must refer to an object of class/Content model CM_B. In fact, A1 has one such relation, and it refers to the object B1, which follows below.

Code Block

    <!--RELS-EXT from Object_B1-->
    <rdf:Description rdf:about="info:Fedora/demo:Object_B1">
        <fedora-model:hasModel rdf:resource="info:fedora/demo:CM_B"/>
    </rdf:Description>


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

Here is the the object B1, and it's Content model CM_B. There is one fedined relation from a B1, the #hasA relation. There is just one restriction on this relation, that it must refer to something of class/Content model CM_A. No cardinality restriction is defined, so B1 does not need to have the relation, and in fact, it does not have it.