Provides the API for accessing and processing data stored according to the RDF abstract syntax. The API includes a framework for constructing {@link com.ibm.team.jfs.app.rdf.Statement statements} and {@link com.ibm.team.jfs.app.rdf.IGraph graphs} and storing these in {@link com.ibm.team.jfs.app.rdf.IGraphStore graph stores}. Both graphs and stores make use of the Java Collections Framework, specifically both implement the {@link java.util.Collection} interface to allow them to act as other collections do.
The purpose of the Graph API package is to provide concrete implementations of common elements but also to describe the key interfaces required to implement an RDF Store - that is a persistent store for RDF graphs. Thus the overall RDF API distinguishes between two roles, the role of the developer writing to the RDF Graph and Query APIs and the role of the store provider writing implementations of these two API interfaces. To implement a store the developer must not only provide an implementation of {@link com.ibm.team.jfs.app.rdf.IGraphStore} but it is expected that an implementation of {@link com.ibm.team.jfs.app.rdf.IGraph} and {@link com.ibm.team.jfs.app.rdf.INamedGraph} will be required that correspond to the storage model of the {@link com.ibm.team.jfs.app.rdf.IGraphStore}.
The following diagram attempts to demonstrate the key elements currently provided by the overall RDF API. Those elements in light blue are provided, at least in part, by the RDF API whereas those elements in orange below are required to be implemented by a store provider.
In particular note the dependencies between the elements in the diagram above, the parsers implemented in the RDF API only require access to the API whereas the reasoners will require access to at least the graph API and most likely the query API as well. The overall RDF API includes a simple implementation of the graph store as an in-memory collection, this allows clients to have a light-weight non-persistent graph and store implementation for manipulating temporary graphs of statements.
rdf
Package ContainsIn both {@link com.ibm.team.jfs.app.rdf.LiteralNode} and {@link com.ibm.team.jfs.app.rdf.URINode} instances the API will validate that the URI provided by the client is both non-null as well as absolute. The RDF data model requires that all URIs in graphs be absolute, and it is the job of any given parser to ensure the correct construction of URIs using whatever resolution mechanism is provided in the representation syntax (xml:base for RDF/XML for example).
A store must implement the {@link com.ibm.team.jfs.app.rdf.IGraphStore} to allow clients to connect to the store and create new graphs, retrieve graphs and remove graphs. In general a store will also have their own implementations of both {@link com.ibm.team.jfs.app.rdf.IGraph} and {@link com.ibm.team.jfs.app.rdf.INamedGraph} as these graph implementations will often need to have links back to store-specific resources.
The package {@link com.ibm.team.jfs.app.rdf.memory} provides an example implementation of an entirely in-memory store that can be used for testing or managing temporary graphs.
@since 0.1