269
Semantic Technologies for IoT
interpreted appropriately. It may appear only in the object position but not in the subject
or the predicate positions in the RDF triple. Generally, literals with string data type can be
related with a language tag. Consider the following example: “dimanche” can be related
with the “fr” language tag and “Sunday” with the “en” language tag.
13.2.1.4 Blank Nodes
When we talk about resources without the consideration of the use of the global identifier,
the blank nodes come into picture. Blank nodes are used to denote resources and its naming can be given without an IRI. In an RDF triple, these blank nodes may be used in the
subject and object positions.
13.2.1.5 Multiple RDF Graphs
Sometimes, it is advantageous to work with multiple RDF graphs combined easily with the
data from multiple sources. An RDF dataset is a collection of RDF graphs with zero or more
named graphs. In an RDF dataset, the named graphs are the RDF graphs that are associated
with IRI or blank node. The blank node or IRI is called the graph name. The other graph
which is remaining in the RDF dataset without a related IRI is called the default graph.
13.2.1.6 RDF Vocabulary
An RDF vocabulary is a pre-defined set of predicates that can be used in an application.
List of RDF vocabulary is given in Table 13.1.
13.2.1.7 Writing RDF Graphs
For writing RDF graphs, different serialization formats are available such as Turtle,
N-Triple, RDF/JSON, RDF/XML, and N3 or Notation3. Nevertheless, using the different
formats for writing down the same graph leads to logically equivalent triples.
(a) Turtle
A Turtle serialization format is a textual representation. Single-line comments can be
given after a “#” which is not part of the lexical token. Simple triple statement is a chain
of subject part, predicate part, and object part, each of which can separated by space and
ends with by “.”
TABLE 13.1
RDF Classes
Classes
Comment
rdf:Statement
Class of RDF statements
rdf:Property
Class of properties
rdf:nil
Empty list
rdf:Bag
Unordered containers class
rdf:Seq
Ordered containers class
rdf:Alt
Class of containers of alternatives
rdf:List
RDF lists class
rdf:XMLLiteral
XML literal values
Semantic Technologies for IoT
interpreted appropriately. It may appear only in the object position but not in the subject
or the predicate positions in the RDF triple. Generally, literals with string data type can be
related with a language tag. Consider the following example: “dimanche” can be related
with the “fr” language tag and “Sunday” with the “en” language tag.
13.2.1.4 Blank Nodes
When we talk about resources without the consideration of the use of the global identifier,
the blank nodes come into picture. Blank nodes are used to denote resources and its naming can be given without an IRI. In an RDF triple, these blank nodes may be used in the
subject and object positions.
13.2.1.5 Multiple RDF Graphs
Sometimes, it is advantageous to work with multiple RDF graphs combined easily with the
data from multiple sources. An RDF dataset is a collection of RDF graphs with zero or more
named graphs. In an RDF dataset, the named graphs are the RDF graphs that are associated
with IRI or blank node. The blank node or IRI is called the graph name. The other graph
which is remaining in the RDF dataset without a related IRI is called the default graph.
13.2.1.6 RDF Vocabulary
An RDF vocabulary is a pre-defined set of predicates that can be used in an application.
List of RDF vocabulary is given in Table 13.1.
13.2.1.7 Writing RDF Graphs
For writing RDF graphs, different serialization formats are available such as Turtle,
N-Triple, RDF/JSON, RDF/XML, and N3 or Notation3. Nevertheless, using the different
formats for writing down the same graph leads to logically equivalent triples.
(a) Turtle
A Turtle serialization format is a textual representation. Single-line comments can be
given after a “#” which is not part of the lexical token. Simple triple statement is a chain
of subject part, predicate part, and object part, each of which can separated by space and
ends with by “.”
TABLE 13.1
RDF Classes
Classes
Comment
rdf:Statement
Class of RDF statements
rdf:Property
Class of properties
rdf:nil
Empty list
rdf:Bag
Unordered containers class
rdf:Seq
Ordered containers class
rdf:Alt
Class of containers of alternatives
rdf:List
RDF lists class
rdf:XMLLiteral
XML literal values
