AbstractSyntaxApi

The org.ourproject.swapi.rdf.syntax package is based mainly on the [WWW] RDF Concepts and Abstract Syntax document. It represents the foundation on which applications manipulate primative RDF concepts like:

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:

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.

last edited 2005-09-14 16:50:36 by JamesCerra