271
Semantic Technologies for IoT
may present only once in a JSON object and the value of each predicate key is an array of
JSON objects.
An RDF triple can be written in the following way:
{ "Subject" : { "Predicate" : [ Object ] } }
In a triple, the object is represented as a JSON object as follows:
type (mandatory and must be lower case)
'uri' or 'literal' or 'bnode'
value (mandatory and full URI should be used)
its lexical value
datatype (optional)
the data type of the literal value
lang (optional)
language of a literal value
Example :
{
“ https://w3id.org/saref#Switch" : {
“ https://w3id.org/saref#hasName" : [ { “value” : ” “Light switch”,
“type” : “literal”,
“lang” : “en” } ]
}
}
(d) N3 or Notation3
In N3 notation, the subject, predicate, and object of an RDF triple are separated by spaces
and each triple is terminated with a period (.). The syntax of N3 would be:
@prefix saref:.
saref:EnergyMeter saref:IsUsedForr saref:Energy;
sasaref:consistsOf saref:Meter.
(e) RDF/\XML
RDF/XML is an XML syntax for RDF in terms of namespaces in XML. With the help of
XML syntax, RDF information can easily be exchanged between computers independent
of operating systems and application languages. RDF/XML is a syntax defined by the W3C
to serialize an RDF graph as an XML document.
is the root element of an RDF document. It defines the XML document to be
an RDF document. It also contains a reference to the RDF namespace as follows:
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
.............
The element contains the description of the resource identified by the
rdf:about attribute.
Semantic Technologies for IoT
may present only once in a JSON object and the value of each predicate key is an array of
JSON objects.
An RDF triple can be written in the following way:
{ "Subject" : { "Predicate" : [ Object ] } }
In a triple, the object is represented as a JSON object as follows:
type (mandatory and must be lower case)
'uri' or 'literal' or 'bnode'
value (mandatory and full URI should be used)
its lexical value
datatype (optional)
the data type of the literal value
lang (optional)
language of a literal value
Example :
{
“ https://w3id.org/saref#Switch" : {
“ https://w3id.org/saref#hasName" : [ { “value” : ” “Light switch”,
“type” : “literal”,
“lang” : “en” } ]
}
}
(d) N3 or Notation3
In N3 notation, the subject, predicate, and object of an RDF triple are separated by spaces
and each triple is terminated with a period (.). The syntax of N3 would be:
@prefix saref:
saref:EnergyMeter saref:IsUsedForr saref:Energy;
sasaref:consistsOf saref:Meter.
(e) RDF/\XML
RDF/XML is an XML syntax for RDF in terms of namespaces in XML. With the help of
XML syntax, RDF information can easily be exchanged between computers independent
of operating systems and application languages. RDF/XML is a syntax defined by the W3C
to serialize an RDF graph as an XML document.
an RDF document. It also contains a reference to the RDF namespace as follows:
.............
The
rdf:about attribute.
