Terminology
RDFS constructs are the RDFS classes, associated properties and utility properties built on the vocabulary of RDF.Classes
; : Represents the class of everything. All things described by RDF are resources. ; : An ''rdfs:Class'' declares a resource as aex:John rdf:type foaf:PersonThe definition of is recursive: is the class of classes, and so it is an instance of itself.
rdfs:Class rdf:type rdfs:ClassThe other classes described by the RDF and RDFS specifications are: ; : literal values such as strings and integers. Property values such as textual strings are examples of RDF literals. Literals may be plain or typed. ; : the class of datatypes. is both an instance of and a subclass of . Each instance of is a subclass of . ; : the class of XML literal values. is an instance of (and thus a subclass of ). ; : the class of properties.
Properties
Properties are instances of the class and describe a relation between subject resources and object resources. When used as such a property is a predicate (see also RDF: reification). ; : the ''rdfs:domain'' of an declares the class of the ''subject'' in a triple whose predicate is that property. ; : the ''rdfs:range'' of an declares the class or datatype of the ''object'' in a triple whose predicate is that property. For example, the following declarations are used to express that the property relates a subject, which is of type , to an object, which is of type :ex:employer rdfs:domain foaf:Person ex:employer rdfs:range foaf:OrganizationGiven the previous two declarations, from the triple:
ex:John ex:employer ex:CompanyXcan be inferred (resp. follows) that is a , and is a . ; : a property used to state that a resource is an instance of a class. A commonly accepted QName for this property is "a". ; : allows declaration of hierarchies of classes. For example, the following declares that 'Every Person is an Agent':
foaf:Person rdfs:subClassOf foaf:AgentHierarchies of classes support inheritance of a property domain and range (see definitions in the next section) from a class to its subclasses. ; : an instance of that is used to state that all resources related by one property are also related by another. ; : an instance of that may be used to provide a human-readable version of a resource's name. ; : an instance of that may be used to provide a human-readable description of a resource.
Utility properties
; : an instance of that is used to indicate a resource that might provide additional information about the subject resource. ; : an instance of that is used to indicate a resource defining the subject resource. This property may be used to indicate an RDF vocabulary in which a resource is described.RDFS entailment
An entailment regime defines whether the triples in a graph are logically contradictory or not. RDFS entailment is not very restrictive, i.e. it does not contain a large amount of rules (compared, for example, to OWL) limiting what kind of statements are valid in the graph. On the other hand it is also not very expressive, meaning that the semantics that can be represented in a machine-interpretable way with the graph is quite limited. Below in a simple example of the capabilities and limits of RDFS entailment, we start with a graph containing the following explicit triples:foo:SomeGiraffe rdf:type bar:Animal. foo:SomeElephant rdf:type bar:Elephant. foo:SomeZoo rdf:type bar:Zoo. bar:livesInZoo rdfs:domain bar:Animal. bar:livesInZoo rdfs:range bar:Zoo. foo:SomeElephant bar:livesInZoo foo:SomeZoo.Without enabling inferencing with RDFS entailment, the data we have does not tell us whether
foo:SomeElephant
is a bar:Animal
. When we do RDFS-based inferencing, we will get the following extra triple:
foo:SomeElephant rdf:type bar:Animal.The
rdfs:domain
statement dictates that any subject in triples where bar:livesInZoo
is the predicate is of type bar:Animal
. What RDFS entailment is not able to tell us is the relationship between bar:Animal
and bar:Elephant
. Due to inferencing we now know that foo:SomeElephant
is both bar:Animal
and bar:Elephant
so these classes do intersect but there is no information to deduce whether they merely intersect, are equal or have a subclass relationship.
In RDFS 1.1, the domain and range statements do not carry any formal meaning and their interpretation is left up to the implementer. On the other hand in the 1.2 Working draft they are used as entailment rules for inferencing the types of individuals. Nevertheless in both versions, it is very clearly stated that the expected functionality of range is "the values of a property are instances of one or more classes" and domain "any resource that has a given property is an instance of one or more classes".
The example above demonstrated some of the limits and capabilities of RDFS entailment, but did not show an example of a logical inconsistency (which could in layman terms be interpreted as a "validation error"), meaning that the statements the triples make are in conflict and try to express contradictory states of affairs. An example of this in RDFS would be having conflicting datatypes for objects (e.g. declaring a resource to be of type xsd:integer
and being also declared to be xsd:boolean
when inferencing is enabled).
Examples of RDF vocabularies
RDF vocabularies represented in RDFS include: * FOAF: the source of the FOAF Vocabulary Specification is RDFS written in the RDFa syntax. * Dublin Core: RDFS source is available in several syntaxes * Schema.org: the source of their schema was originally RDFS written in the RDFa syntax until July 2020. * Simple Knowledge Organization System (SKOS) developed the RDF schema titled as SKOS XL Vocabulary, which is an OWL ontology for the SKOS vocabulary that uses the OWL RDF/XML syntax, and hence makes use of a number of classes and properties from RDFS. * TheSee also
* SPARQL Query Language for RDF * Platform for Internet Content Selection (PICS) *References
External links