RDFS Tutorial
From Wiki
This article is a stub. You can help us by expanding it.
- RDF Schema provides constructs to define vocabularies for the Web
- The RDF Schema elements are in the namespace:
http://www.w3.org/2000/01/rdf-schema#
Contents |
RDF Schema Classes
-
rdfs:Resource- The class of all things -
rdfs:Class- The class of all classes -
rdfs:Literal- The class of all data literals (or data values), subsuming plain and typed literals -
rdfs:XMLLiteral- The class of all literals with XML syntax -
rdfs:Datatype- The class of all datatypes
RDF Schema Properties
- rdfs:subClassOf
- rdfs:subPropertyOf
- rdfs:domain
- rdfs:range
- rdfs:seeAlso
- rdfs:isDefinedBy
- rdfs:comment
- rdfs:label
Defining Properties
<rdf:Description rdf:ID="ex:name"> <rdf:type rdf:resource="rdf:Property"/> </rdf:Description>
or
<rdf:Property rdf:ID="ex:name"/>
or
ex:name rdf:type rdf:Property
Defining Properties with Domain and Range
... helps to avoid typing mistakes.
<rdf:Property rdf:ID="p:age"> <rdfs:domain rdf:resource="uni:Employee"/> <rdfs:range rdf:resource="xs:integer"/> </rdf:Property>
In the above example you can see age values as typed literals.
Defining a Data-Valued Property without a Specific Datatype
Relationships Between Core Classes and Properties
-
rdfs:subClassOfandrdfs:subPropertyOfare transitive, by definition -
rdfs:Classis a subclass ofrdfs:Resourcei.e. the following axiom holds:
rdfs:Class rdfs:subClassOf rdfs:resource.
- Because everything is a resource
rdfs:Resourceis an instance ofrdfs:Classi.e.
rdfs:Resource rdf:type rdfs:Class.
-
rdfs:Resourceis the class of all resources
rdfs:Resource rdf:type rdfs:Resource.
- Every class is an instance of
rdfs:Class. Consequentlyrdfs:Classis an instance of itself
rdfs:Class rdf:type rdfs:Class
References
- RDF Vocabulary Description Language 1.0: RDF Schema W3C Recommendation 10 February 2004, http://www.w3.org/TR/rdf-schema/

