RDF Schema
Encyclopedia
RDF Schema is a set of classes with certain properties using the RDF
Resource Description Framework
The Resource Description Framework is a family of World Wide Web Consortium specifications originally designed as a metadata data model...

 extensible knowledge representation
Knowledge representation
Knowledge representation is an area of artificial intelligence research aimed at representing knowledge in symbols to facilitate inferencing from those knowledge elements, creating new elements of knowledge...

 language, providing basic elements for the description of ontologies
Ontology (computer science)
In computer science and information science, an ontology formally represents knowledge as a set of concepts within a domain, and the relationships between those concepts. It can be used to reason about the entities within that domain and may be used to describe the domain.In theory, an ontology is...

, otherwise called RDF vocabularies, intended to structure RDF resources
Resource (Web)
The concept of resource is primitive in the Web architecture, and is used in the definition of its fundamental elements. The term was first introduced to refer to targets of Uniform Resource Locators , but its definition has been further extended to include the referent of any Uniform Resource...

. These structured elements with RDFS in a triplestore
Triplestore
A triplestore is a purpose-built database for the storage and retrieval of Resource Description Framework metadata.Much like a relational database, one stores information in a triplestore and retrieves it via a query language...

, you can use the query language SPARQL
SPARQL
SPARQL is an RDF query language; its name is an acronym that stands for SPARQL Protocol and RDF Query Language. It was made a standard by the RDF Data Access Working Group of the World Wide Web Consortium, and considered as one of the key technologies of semantic web...

 to reach them.

The first version was published by the World-Wide Web Consortium (W3C) in April 1998, and the final W3C recommendation
W3C recommendation
A W3C Recommendation is the final stage of a ratification process of the World Wide Web Consortium working group concerning a technical standard. This designation signifies that a document has been subjected to a public and W3C-member organization's review. It aims to standardise the Web technology...

 was released in February 2004. Many RDFS components are included in the more expressive language Web Ontology Language
Web Ontology Language
The Web Ontology Language is a family of knowledge representation languages for authoring ontologies.The languages are characterised by formal semantics and RDF/XML-based serializations for the Semantic Web...

 (OWL).

Main RDFS constructs

RDFS constructs are the RDFS classes, associated properties and utility properties built on the limited vocabulary of RDF.

Classes

  • rdfs:Resource is the class of everything. All things described by RDF are resources.
  • rdfs:Class declares a resource as a class
    Class (philosophy)
    Philosophers sometimes distinguish classes from types and kinds. We can talk about the class of human beings, just as we can talk about the type , human being, or humanity...

     for other resources.

A typical example of an rdfs:Class is foaf:Person in the Friend of a Friend (FOAF
FOAF (software)
FOAF is a machine-readable ontology describing persons, their activities and their relations to other people and objects. Anyone can use FOAF to describe him or herself...

) vocabulary. 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 rdfs:Class of any rdfs:Class.

The other classes described by the RDF and RDFS specifications are:
  • rdfs:Literal – literal values such as strings and integers. Property values such as textual strings are examples of RDF literals. Literals may be plain or typed.
  • rdfs:Datatype – the class of datatypes. 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 – the class of XML literal values. rdf:XMLLiteral is an instance of rdfs:Datatype (and thus a subclass of rdfs:Literal).
  • rdf:Property – the class of properties.

Properties

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 of an rdf:predicate declares the class of the subject in a triple
    Tuple
    In mathematics and computer science, a tuple is an ordered list of elements. In set theory, an n-tuple is a sequence of n elements, where n is a positive integer. There is also one 0-tuple, an empty sequence. An n-tuple is defined inductively using the construction of an ordered pair...

     whose second component is the predicate.
  • rdfs:range of an rdf:predicate declares the class or datatype of the object in a triple whose second component is the predicate.

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, the following triple requires that ex:John is necessarily a foaf:Person, and ex:CompanyX is necessarily a foaf:Organization:

ex:John ex:employer ex:CompanyX
  • rdf:type is a property used to state that a resource is an instance of a class.
  • rdfs:subClassOf allows to declare hierarchies of classes.

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 next section) from a class to its subclasses.
  • rdfs:subPropertyOf is an instance of rdf:Property that is used to state that all resources related by one property are also related by another.
  • rdfs:label is an instance of rdf:Property that may be used to provide a human-readable version of a resource's name.
  • rdfs:comment is an instance of rdf:Property that may be used to provide a human-readable description of a resource.

Utility Properties

  • rdfs:seeAlso is an instance of rdf:Property that is used to indicate a resource that might provide additional information about the subject resource.
  • rdfs:isDefinedBy is an instance of 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.

RDFS Entailment

An entailment regime defines by RDFs not only which entailment
Entailment (pragmatics)
In pragmatics , entailment is the relationship between two sentences where the truth of one requires the truth of the other ....

 relation is used, but also which queries and graphs are well-formed for the regime. The RDFS entailment is a standard entailment relations in the semantic web.

For example, the following declares that 'Dog is an animal','Cat1 is a cat', 'Zoos host animals' and 'Zoo 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


But this graph is not well formed because the system can not guess that a cat is an animal. We have to add 'Cats are animals' to do a well-formed graph with :

ex:cat rdfs:subClassOf ex:animal


Voila, the correct example:
In english The graph
  • Dog is an animal
  • Cat1 is a cat
  • Cats are animals
  • Zoos host animals
  • Zoo hosts the Cat2
En RDF/turtle
Turtle
Turtles are reptiles of the order Testudines , characterised by a special bony or cartilaginous shell developed from their ribs that acts as a shield...



@prefix rdf: .
@prefix rdfs: .
@prefix ex: .
@prefix 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 your triplestore
Triplestore
A triplestore is a purpose-built database for the storage and retrieval of Resource Description Framework metadata.Much like a relational database, one stores information in a triplestore and retrieves it via a query language...

 (or RDF database) implements the regime entailment
Entailment (pragmatics)
In pragmatics , entailment is the relationship between two sentences where the truth of one requires the truth of the other ....

 of RDF and RDFS, the SPARQL
SPARQL
SPARQL is an RDF query language; its name is an acronym that stands for SPARQL Protocol and RDF Query Language. It was made a standard by the RDF Data Access Working Group of the World Wide Web Consortium, and considered as one of the key technologies of semantic web...

query as follows (the keyword "a" is equivalent to rdf:type in SPARQL):

PREFIX ex:
SELECT ?animal
WHERE
{ ?x a ex:animal . }


Give the following result with cat2 because the Cat's type inherits of Animal's type:
animal

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK