I come cross a books ontology, in the bottom of the owl document, we have:
<!-- Object Properties -->
<owl:ObjectProperty rdf:about="#contains"/>
<owl:ObjectProperty rdf:about="#datePublished"/>
<owl:ObjectProperty rdf:about="#hasGenre"/>
<owl:ObjectProperty rdf:about="#hasGrade"/>
<owl:ObjectProperty rdf:about="#hasName"/>
<owl:ObjectProperty rdf:about="#hasSize"/>
<owl:ObjectProperty rdf:about="#hasType"/>
<owl:ObjectProperty rdf:about="#isTitled"/>
<owl:ObjectProperty rdf:about="#publishedBy"/>
<owl:ObjectProperty rdf:about="#timePublished"/>
<owl:ObjectProperty rdf:about="#writtenBy"/>
<owl:ObjectProperty rdf:ID="isReserved">
<rdfs:domain rdf:resource="#Book"/>
<rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>A reservation has been made by a person for a book.</rdfs:comment>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="isNotReserved">
<rdfs:domain rdf:resource="#Book"/>
<rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>The given book is available in the library.</rdfs:comment>
</owl:ObjectProperty>
</rdf:RDF>
I just can't understand why the author of this ontology choose to use rdf:ID
in in the last two owl:ObjectProperty
(isReserved
and isNotReserved
) instead of just using rdf:about
like the rest ?
ps: I fully read RDF/XML part that specifies the use of xml:base
and rdf:ID
and checked in the answer here, just I need further clarification in the context of the ontology defined in the above gist.
quote from RDF/XML specs:
The rdf:ID attribute on a node element (not property element, that has another meaning) can be used instead of rdf:about and gives a relative IRI equivalent to # concatenated with the rdf:ID attribute value. So for example if rdf:ID="name", that would be equivalent to rdf:about="#name". rdf:ID provides an additional check since the same name can only appear once in the scope of an xml:base value (or document, if none is given), so is useful for defining a set of distinct, related terms relative to the same IRI.