In this article, I am going to explain RDF as it related to Jena API.
During the course of working with RDF files, I came across lot's of concepts that really look lame to my understanding of how to implement the Jena API in parsing RDF files. Questions such as ;
Openly enough, if you were to crack the workings of how RDF works, it will be a different task if you have not explored and understood the RDF core semantics, syntax and concepts document. RDF may be used with any datatype definition that conforms to the relational database abstraction, even if not defined in terms of XML Schema.
A model is fully formed RDF file. That is, a file that consists of resources, properties and literals. That is, an RDF Graph. An Object consisting of a Subject, predicate and Literal.
A Resource is an object consisting of a Subject, a predicate and a literal, which is an Object in itself.
In Jena terms, each AResource consists of a subject, a predicate and a literal. The representation of this can be found in the StatementHandler class statement() method.
A statement can be said to be the same as a Triple. That is, the conjunction of a subject, predicate and a literal.
A Literal is an object made up of a subject and a predicate. i.e subject meaning a node and predicate, the node attribute or property. A literal may be the Object of an RDF statement, but not the Subject or the predicate.
RDF Literals consists of Plain literals and Typed literals. XML is embedded in RDF using Literals in the format rdf:XMLLiteral.
Note: RDF Literals are distinct and distinguishable from RDF URI references; e.g. http://example.org as an RDF Literal (untyped, without a language tag) is not equal to http://example.org as an RDF URI reference.
In Jena terms, A Literal is made up of key and value. So by implementation, I can say;
Map<String, String> nodevalue = new HashMap<String, String>();
This is an Object in RDF URI reference format i.e http://example.org
That is, property. A Property is a linker between the Subject and the Object.
This simply means an RDF graph made up of what is called the Subject, Predicate and Object.
RDF Triples contains:
Blank node means the node(in XML terms i.e tag) does not have a separate form of identification. hence, it is anonymous.
"A blank node is a node that is not a URI reference or a literal. In the RDF abstract syntax, a blank node is just a unique node that can be used in one or more RDF statements, but has no intrinsic name."
Blank nodes are in form of RDF URI references i.e URI e.g http://example.org.
An RDF graph is a composition of a full blown RDF file. A file that consists of the subject, predicate and an object. An RDF graph is a set of RDF triples.
The nodes of an RDF graph are its subjects and objects.
Quoting the w3 reference found at http://www.w3.org/TR/rdf-concepts/, "A convention used by some linear representations of an RDF graph to allow several statements to reference the same unidentified resource is to use a blank node identifier, which is a local identifier that can be distinguished from all URIs and literals. When graphs are merged, their blank nodes must be kept distinct if meaning is to be preserved; this may call for re-allocation of blank node identifiers. Note that such blank node identifiers are not part of the RDF abstract syntax, and the representation of triples containing blank nodes is entirely dependent on the particular concrete syntax used".
An RDF URI reference is a URI of the form http://example.org
Post new comment