RDF Elements
We do not need to specify URI for every RDF node in a graph. A node without URI called blank node (abbreviated b-node) and can be viewed as a graph scoped identifier that cannot be directly referenced from outside. A blank node can be used in any triple only as a subject or an object and cannot be used as a predicate. Blank node is useful for example when specifying lists (see figure illustrating bag).
![rdf bag](images/rdf-bag.gif)
Illustration of a bag (unordered container) and a blank node
The RDF language namespace prefix is usually rdf:
and is
(syntactically) defined at http://www.w3.org/1999/02/22-rdf-syntax-ns#
.
RDF vocabulary includes the following elements:
rdf:type
- it is a predicate used to state that a resource is an instance of a classrdf:XMLLiteral
- the class of typed literals (i.e., of XML literal values)rdf:Property
- the class of properties (i.e. binary relations that are used as predicates in triples)rdf:Alt
,rdf:Bag
,rdf:Seq
- containers of alternatives, unordered containers, and ordered containers (see figure with bag for an example)rdf:List
- the class of RDF Listsrdf:nil
- an instance ofrdf:List
representing the empty listrdf:Statement
,rdf:subject
,rdf:predicate
,rdf:object
- used for reification (described below)
These elements are further discussed in the next section about RDFS, since RDFS adds further constrains on them to specify their meaning more precisely.
Let us only further explain RDF reification. RDF reification allows to disassemble a statement (triple) to its parts and to use the whole statement or parts of the statement as a part of other triples. The whole triple can then be treated as a resource which allows to make assertions about the statement. For example, for the statement
:john :has :cat
the RDF reification is as follows (note that the result is resource that can for example participate as a subject in another triple):
[ a rdf:Statement; rdf:subject :john; rdf:predicate :has; rdf:object :cat ].
To summarize, RDF triple is a triple <subject, predicate, object> where subject can be URI or b-node, predicate can be URI, and object can be URI, b-node, or literal. RDF graph is a set of RDF triples. Formal semantics for RDF is defined using model theory.
![Previous - RDF Graph and Syntax Previous - RDF Graph and Syntax](images/prev.gif)
![Next - RDF Schema RDFS Next - RDF Schema RDFS](images/next.gif)
(c) Marek Obitko, 2007 - Terms of use