Resource Description Framework Schema | |
Abbreviation | RDFS |
---|---|
Status | W3C Recommendation |
Year started | January 5, 1999[1][2] |
First published | April 30, 2002[2] |
Latest version | 1.1 (Recommendation) February 25, 2014[3] |
Organization | |
Editors |
|
Base standards | RDF |
Related standards | |
Domain | |
Website | www |
RDF Schema (Resource Description Framework Schema, variously abbreviated as RDFS, RDF(S), RDF-S, or RDF/S) is a set of classes with certain properties using the RDF extensible knowledge representation data model, providing basic elements for the description of ontologies. It uses various forms of RDF vocabularies, intended to structure RDF resources. RDF and RDFS can be saved in a triplestore, then one can extract some knowledge from them using a query language, like SPARQL.
The first version[1][4] was published by the World-Wide Web Consortium (W3C) in April 1998, and the final W3C recommendation was released in February 2014.[3] Many RDFS components are included in the more expressive Web Ontology Language (OWL).
RDFS constructs are the RDFS classes, associated properties and utility properties built on the vocabulary of RDF.[5][6][7]
rdfs:Resource
rdfs:Class
A typical example of an rdfs:Class is foaf:Person
in the Friend of a Friend (FOAF) vocabulary.[8] An instance of foaf:Person
is a resource that is linked to the class foaf:Person
using the rdf:type
property, such as in the following formal expression of the natural-language sentence: 'John is a Person'.
ex:John rdf:type foaf:Person
The definition of rdfs:Class
is recursive: rdfs:Class
is the class of classes, and so it is an instance of itself.
rdfs:Class rdf:type rdfs:Class
The other classes described by the RDF and RDFS specifications are:
rdfs:Literal
rdfs:Datatype
rdfs:Datatype
is both an instance of and a subclass of rdfs:Class
. Each instance of rdfs:Datatype
is a subclass of rdfs:Literal
.rdf:XMLLiteral
rdf:XMLLiteral
is an instance of rdfs:Datatype
(and thus a subclass of rdfs:Literal
).rdf:Property
Properties are instances of the class rdf:Property
and describe a relation between subject resources and object resources. When used as such a property is a predicate (see also RDF: reification).
rdfs:domain
rdf:Property
declares the class of the subject in a triple whose predicate is that property.rdfs:range
rdf:Property
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 ex:employer
relates a subject, which is of type foaf:Person
, to an object, which is of type foaf:Organization
:
ex:employer rdfs:domain foaf:Person ex:employer rdfs:range foaf:Organization
Given the previous two declarations, from the triple:
ex:John ex:employer ex:CompanyX
can be inferred (resp. follows) that ex:John
is a foaf:Person
, and ex:CompanyX
is a foaf:Organization
.
rdf:type
rdfs:subClassOf
For example, the following declares that 'Every Person is an Agent':
foaf:Person rdfs:subClassOf foaf:Agent
Hierarchies of classes support inheritance of a property domain and range (see definitions in the next section) from a class to its subclasses.
rdfs:subPropertyOf
rdf:Property
that is used to state that all resources related by one property are also related by another.rdfs:label
rdf:Property
that may be used to provide a human-readable version of a resource's name.rdfs:comment
rdf:Property
that may be used to provide a human-readable description of a resource.rdfs:seeAlso
rdf:Property
that is used to indicate a resource that might provide additional information about the subject resource.rdfs:isDefinedBy
rdf:Property
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.An entailment regime defines, by using RDFS (or OWL, etc.), not only which entailment relation is used, but also which queries and graphs are well-formed for the regime. The RDFS entailment is a standard entailment relation in the semantic web.[11]
For example, the following declares that 'Dog1 is an animal', 'Cat1 is a cat', 'zoos host animals' and 'Zoo1 hosts the Cat2':
ex:dog1 rdf:type ex:animal ex:cat1 rdf:type ex:cat zoo:host rdfs:range ex:animal ex:zoo1 zoo:host ex:cat2
The graph is not well-formed because the system can not guess that a cat is an animal. To make a well-formed graph, the statement 'Cats are animals' can be added:
ex:cat rdfs:subClassOf ex:animal
Here is a correct example:
In English | The graph |
---|---|
|
![]() |
RDF/turtle | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.org/> .
@prefix zoo: <http://example.org/zoo/> .
ex:dog1 rdf:type ex:animal .
ex:cat1 rdf:type ex:cat .
ex:cat rdfs:subClassOf ex:animal .
zoo:host rdfs:range ex:animal .
ex:zoo1 zoo:host ex:cat2 .
|
If the triplestore (or RDF database) implements the regime entailment of RDF and RDFS, the SPARQL query as follows (the keyword "a" is equivalent to rdf:type in SPARQL):
PREFIX ex: <http://example.org/>
SELECT ?animal
WHERE
{ ?animal a ex:animal . }
The following gives the result with cat1 in it, because the Cat's type inherits of Animal's type:
animal |
---|
<http://example.org/dog1>
|
<http://example.org/cat1>
|
<http://example.org/cat2>
|
RDF vocabularies represented in RDFS include:[10]
madsrdf:prominentFamilyMember
.[16]