RDF Schema (RDFS)


While RDF is the cornerstone of the Semantic Web, it was designed to describe machine-interpretable statements, not to formally define terms of a knowledge domain. For this reason, the RDF vocabulary was extended by concepts required for creating controlled vocabularies and basic ontologies, resulting in the RDF Schema Language, which was later renamed to the RDF Vocabulary Description Language (RDFS). RDFS is suitable for defining terms of a knowledge domain and basic relationships between them. As an extension of RDF, RDFS also reuses properties from the RDF vocabulary. RDFS-based vocabularies and ontologies can be represented as RDF graphs.

The RDFS classes and properties form the RDFS vocabulary (rdfsV), including a specialized set of predefined RDF resources with their meaning and using URI references with the prefix http://www.w3.org/2000/01/rdfschema# and the associated qualified name (QName) prefix rdfs:. The classes of the RDFS vocabulary are used to define a class resource (rdfs:Resource), the class of literal values such as strings and integers (rdfs:Literal), the class of classes (rdfs:Class), the class of RDF datatypes (rdfs:Datatype), the class of RDF containers (rdfs:Container), and the class of container membership properties (rdfs:ContainerMembershipProperty). The properties of RDFS can express that the subject is a subclass of a class (rdfs:subClassOf), the subject is a subproperty of a property (rdfs:subPropertyOf), add a human-readable name for the subject (rdfs:label), declare a description of the subject resource (rdfs:comment), identify a member of the subject resource (rdfs:member), add information related to the subject resource (rdfs:seeAlso), and provide the definition of the subject resource (rdfs:isDefinedBy).

Properties can be declared to apply to only certain instances of classes by defining their domain and range that indicate the relationships between RDFS classes and properties and RDF data. The rdfs:domain predicate indicates that a particular property applies to instances of a designated class (the domain of the property), in other words declare the class of those resources that may appear as subjects in a triple with the predicate. The rdfs:range predicate indicates that the values of a particular property are instances of a designated class or its allowed values are of a certain datatype, i.e., the class or datatype of those resources that may appear as the object in a triple with the predicate, also known as the range of the property, as shown in Listing 1.

Listing 1. Using RDFS Domain and Range


@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix vidont: <http://vidont.org/> .

schema:Movie rdf:type rdfs:Class .
schema:Person rdf:type rdfs:Class .
vidont:Unforgiven rdf:type schema:Movie .
vidont:ClintEastwood rdf:type schema:Person .
vidont:directedBy rdfs:domain schema:Movie .
vidont:directedBy rdfs:range schema:Person .
vidont:Unforgiven vidont:directedBy vidont:ClintEastwood .