Sunday, 5 December 2010

The Semantic Web Technologies - RDFS

RDF describes resources with classes, properties, and values.

In addition, RDF also need a way to define application-specific classes and properties. Application-specific classes and properties must be defined using extensions to RDF.
One such extension is RDF Schema.

RDF Schema does not provide actual application-specific classes and properties. (This is dealt with OWL in the next post)

Instead RDF Schema provides the framework to describe application-specific classes and properties.
Classes in RDF Schema is much like classes in object oriented programming languages. This allows resources to be defined as instances of classes, and subclasses of classes.

E.g.
<?xml version="1.0"?>

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://www.animals.fake/animals#">

<rdf:Description rdf:ID="animal">
  <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
</rdf:Description>

<rdf:Description rdf:ID="horse">
  <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
  <rdfs:subClassOf rdf:resource="#animal"/>
</rdf:Description>

</rdf:RDF>

In the example above, the resource "horse" is a subclass of the class "animal".
 http://www.w3schools.com/rdf/rdf_schema.asp

The purpose of RDFS is then to relate the categories and their hierachy (taxonomy) into a syntax that allows the elements to be grouped into classes using standard vocabulary.
In terms of distinguishing a taxonomy from an ontology, we can use a defnition from Chowdhury 2007:



Machines not only need to read the correct pieces of data, and through the RDF statements can identify a framework for using common metadata standards, however each subject domain has it’s own structure with categories and sub categories. We call these an example of a taxonomy (much like the Wikepedia example where subjects have various categories, a parent-child relationship). “Taxonomy could take the form of a web directory such as Yahoo, subject heading list (e.g the Library of Congress subject heading list)  Chowdhury 2007. The RDFS defines a syntax for the taxonomy, defining the parent-child relationships that exist in that hierarchy. (Pidock 2003)?? Quoted from Chowdhury.  


The RDFS vocabulary builds on the limited vocabulary of RDF.

[edit] Classes

  • rdfs:Resource is the class of everything. All things described by RDF are resources.
  • rdfs:Class declares a resource as a class for other resources.
A typical example of an rdfs:Class is foaf:Person in the Friend of a Friend (FOAF) 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:Literalliteral 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.

[edit] 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 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.

[edit] 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.

[edit] See also

  • SPARQL Query Language for RDF
http://en.wikipedia.org/wiki/RDF_Schema

No comments:

Post a Comment