The org.ourproject.swapi.rdf.syntax package is based mainly on the
RDF Concepts and Abstract Syntax document. It represents the foundation on which applications manipulate primative RDF concepts like:
URI References - Resources that have a name
Blank Nodes - Anonymous Resources
Plain Literals - Literal Strings with an optional language tag
Typed Literals - Literal Objects with a datatype URI identifying the type of object
Although the abstract syntax does not define an internal structure for Blank Nodes, SWAPI allows Blank Nodes to provide an indentifier, which in the context of a particular graph, allows them to be identified. However, this identifier is neither uniform nor unique between graphs, and shouldn't be used to identify them when comparing data from different graphs.
Hierarchy
Each primative is organized into a small hierarchy of types:
Node
↑
|
Resource ----------+---------- Literal
↑ ↑
| |
URIRef --+-- BlankNode PlainLiteral --+-- TypedLiteral
Node, Resource, and Literal are abstract nodes. Every thing that you work with is a URIRef, BlankNode, PlainLiteral, or TypedLiteral. Each Node is closely coupled with a dispatcher, which is used to define Visitor Objects to make life easier.
Groups of Nodes
Nodes can be grouped in Statements, which are likewise grouped into Graphs.
Statements
A Statement is a triple consisting of:
one subject Resource
one predicate URIRef
one target Node
In the strictest sense of RDF's abstract syntax, statements are also called "triples", predicates are also called "properties", and targets are also called "objects". However, each of those alternate words mean different things to programmers, so SWAPI typically uses the non-ambigous words - predicate and target - so as not to confuse the developers. (i.e. Is that an Object or an object?)
Graphs
A Graph is an unordered set of statements. Graph Objects provide basic query commands; however, all mutation commands should be done through an Operation instance.
Semantic Web API