Hi
Since STANBOL-580 it is possible to register Clerezza RDF graphs with
the Stanbol SPARQL endpoint. While this is currently only used by the
Stanbol Contenthub it might be of general interest to Stanbol users.
Here is how it works ...
//you need a BundleContext
BundleContext bundleContext;
//and the Clerezza Graph you want to publish
TripleCollection graph;
//define the metadata for the registration
Dictionary<String,Object> properties = new Hashtable<String,Object>();
properties.put("graph.uri", "http://my.graph.com"); //required
properties.put("graph.name","My graph");
properties.put("graph.description", "Just a How to register a
graph with the SPARQL endpoint");
//use service.rankings to specify the default search graph
//Integer.MAX_VALUE ensures this will be the default search graph
properties.put("service.ranking", Integer.MAX_VALUE);
//Now use your BundleContext to register the graph
ServiceRegistration registration =
bundleContext.registerService(TripleCollection.class.getName(), graph,
properties);
//unrigster if you no longer need the graph
registration.unregister();
If you registered your graph you can access it via
http://{host}:{port}/{stanbol-path}/sparql
See also STANBOL-580 [1] for details.
best
Rupert
[1] https://issues.apache.org/jira/browse/STANBOL-580
--
| Rupert Westenthaler [email protected]
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen