Database Reference
In-Depth Information
A new property is defined by assigning it a URI and describing it with an
rdf:type property whose value is the resource rdf:Property . For example,
we can say that “ has _ name ” is a kind of Property in the following way:
<rdf:Property rdf:ID = “has_name”>
<rdfs:domain rdf:resource = “mereaMaps:TopographicObject”/>
</rdf:Property>
5.6.4 s ubpRopeRTies , D oMaiN , aND R aNge
RDFS also includes several properties, for example,
rdfs:subPropertyOf
rdfs:range
rdfs:domain
Just as classes can have subclasses, so properties can have subproperties, denoted
by rdfs:subPropertyOf . For example, has _ preferred _ name and
has _ short _ name might be subproperties of has _ name . One advantage
of this is that we can differentiate between the different types of name but still
retrieve them all using the superproperty has _ name . If we want to state that the
subject of a particular property is always an instance of a particular class, we use
the rdfs:range property. Similarly, the rdfs:domain property allows us to
specify what class the object of the triple has to be.
<rdf:Property rdf:ID = “has_longitude”>
<rdfs:domain rdf:resource = “mereaMaps:TopographicObject”/>
<rdfs:range rdf:resource = “&xsd;float”/>
</rdf:Property>
Here, we are saying that any instance that is the object of the “ has _ longitude
property is of floating point type, and any instance that is the subject of the
has _ longitude ” property must be a TopographicObject. Note that this
is a far stricter statement than just saying that the has _ longitude property
can be used by a TopographicObject , and as you can see for this example, it
is not really true: So often when authoring your RDFS ontology and modeling the
knowledge, it is best not to use domain and range unless you are absolutely sure that
these things are true and true for every instance of the class. We talk more about
knowledge modeling when we write ontologies in Chapter 10.
5.6.5 RDF C oNTaiNeRs aND C oLLeCTioNs
It is possible to denote groups of resources or values (“literals”) using one of the
RDF container constructs rdf:Bag (a group of resources or literals for which the
order does not matter, and duplicates are allowed); rdf:Seq (an ordered sequence
Search WWH ::




Custom Search