For your convenience you may access a web-form at the Uri-Path /graph/upload-form
.
start("mvn:org.apache.clerezza/rdf.stable.serializer")
start("mvn:org.apache.clerezza/rdf.file.storage")
Smart Content Binding (SCB) is an open source framework developed by clerezza.org aiming primarily at providing a java implementation of the graph data model specified by W3C RDF and functionalities to operate on that data model. SCB offers a service interface to access multiple named graphs and it can use various providers to manage RDF graphs in a technology specific manner, e.g., using Jena (TBD) or Sesame . It also provides façades that allow an application to use Jena or Sesame (TBD) APIs to process RDF graphs (note that the choice of a façade is independent of the chosen backend; you can for example use the Jena façade to write your code against the Jena API while using the Sesame provider to store your data in a Sesame store). Furthermore, SCB offers a serialization and a parsing service to convert a ImmutableGraph into a certain representation (format) and vice versa. In order to support ontologies usage, SCB provides a tool to convert ontologies defined in various formats including RDF/XML into Java classes.
<scr:component enabled="true" name="org.example.html.BookFormRenderlet"> <implementation class="org.example.html.BookFormRenderlet"/> <service servicefactory="false"> <provide interface="org.apache.clerezza.platform.typerendering.Renderlet"/> </service> <property name="service.pid" value="org.example.html.BookFormRenderlet"/> <reference name="renderletManager" interface="org.apache.clerezza.platform.typerendering.RenderletManager" cardinality="1..1" policy="static" bind="bindRenderletManager" unbind="unbindRenderletManager"/> </scr:component>
Smart Content Binding (SCB) is an open source framework developed by clerezza.org aiming primarily at providing a java implementation of the graph data model specified by W3C RDF and functionalities to operate on that data model. SCB offers a service interface to access multiple named graphs and it can use various providers to manage RDF graphs in a technology specific manner, e.g., using Jena (TBD) or Sesame . It also provides façades that allow an application to use Jena or Sesame (TBD) APIs to process RDF graphs (note that the choice of a façade is independent of the chosen backend; you can for example use the Jena façade to write your code against the Jena API while using the Sesame provider to store your data in a Sesame store). Furthermore, SCB offers a serialization and a parsing service to convert a ImmutableGraph into a certain representation (format) and vice versa. In order to support ontologies usage, SCB provides a tool to convert ontologies defined in various formats including RDF/XML into Java classes.
SCB comprises the following architectural components as depicted in Fig. 1:
Figure 1: SCB Architecture
The Core contains interface definitions of the RDF ImmutableGraph data model and its
implementation. The three main classes are ImmutableGraph
, Graph
,
and Graph
. The class ImmutableGraph
represents an
immutable RDF ImmutableGraph, as such its identity criterion is defined in terms of
graph-isomorphism. The class Graph
represents a mutable RDF ImmutableGraph,
which enables triples to be added to or removed from a ImmutableGraph. The class
Graph
is the super class of both the class ImmutableGraph
and M
ImmutableGraph
.
SCB Core provides three services: TcManager
[4] allows access to
the various Graph
s, Parser
[5] and
Serializer
[6] to allow reading and writing graphs from and to
various formats. In an OSGi environment these services are accessed using the
service registry or injected using OSGi Declarative Services. In a non OSGi environment
static factory methods are used to return an instance.
The TcManager
delegates actual processing tasks to a specific Storage Provider
chosen from a set of Storage Providers based on their priority number (weight).
Storage Providers can be dynamically bound to or unbound from the Core.
The functionality required by the Parser and Serializer is delegated to registered
Parsing and Serializing Providers respectively, according to their capability
(supported formats). Later registered providers shadow previous ones for the same format.
The current implementation of SCB includes a Jena Façade. The Jena Façade allows an application to use Jena API to manipulate a TC.
In order to ease operations on a resource in a TC, the Utilities component provides a class with a set of useful methods, e.g., to delete all triples (statements) with the resource as subject and a specified predicate.
Finally, the Ontologies Tool contains a standalone application called SchemaGen to generate the Java source code with constants from an ontology description.
Each architectural component described above comprises one or more artifacts as
listed in Table 1.
Table 1: Artifacts of each architectural components
Architectural Component | Artifact | Artifact Type |
---|---|---|
Core | org.apache.clerezza.rdf.core | Jar and OSGi bundle |
org.apache.clerezza.rdf.core.test | Jar and OSGi bundle | |
Façades | org.apache.clerezza.rdf.jena.facade | Jar and OSGi bundle |
Utilities | org.apache.clerezza.rdf.utils | Jar and OSGi bundle |
Storage Providers | org.apache.clerezza.rdf.sesame.storage | Jar and OSGi bundle |
org.apache.clerezza.rdf.jena.storage | Jar and OSGi bundle | |
Parsing Providers | org.apache.clerezza.rdf.jena.parser | Jar and OSGi bundle |
Serializing Providers | org.apache.clerezza.rdf.jena.serializer | Jar and OSGi bundle |
Ontologies Tool | org.apache.clerezza.rdf.tool.schemagen | Executable jar |
If you want to build SCB from its sources, you need JDK version 1.6 to compile. Maven version 2.0.9 has been used to build SCB.
To develop an application on top of SCB, you need to have the Core and optionally Utilities and Façades.
To deploy an application which uses SCB, Java(TM) SE Runtime Environment 6 or higher is needed. If the application does not use OSGi, then the SCB Core, the jars required for compilation, as well as the needed implementations (typically one provider for storage, serialization, and parsing) must be in the classpath. If the application uses OSGi, these jars are loaded as bundles, and to run in OSGi, Declarative Services must be enabled (see the documentation of your OSGi container).
The use of SCB in an OSGi environment has been tested with Apache Felix [7] and Eclipse Equinox [8].
Since SCB applies a Service Oriented Architecture approach, following components can be easily extended: Storage Providers, Parsing Providers, and Serializing Providers. Using OSGi, new bundles just need to implement the required service interfaces. To be located outside an OSGi environment, they should also provide files in "META-INF/services" for the services they expose. Consult the SCB JavaDoc for more information [9].