RDF2Go/CodeSamples

From semanticweb.org

Jump to:navigation, search

[edit] Set-up and configure Model

There are basically two ways to set-up a model:

ModelFactory modelFactory = RDF2Go.getModelFactory();
Model model = modelFactory.createModel();
model.open();
// use it
MySpecialSesameModel mySpecialSesameModel = new MySpecialSesameModel( ... );
// wrap it, replace 'SesameModel' as needed
Model model = new SesameModel( mySpecialSesameModel ); 
model.open();
// use it

You can use

org.ontoware.rdf2go.impl.jena24.ModelImplJena24 // Jena model
org.openrdf.rdf2go.RepositoryModel // Sesame model
org.openrdf.rdf2go.RepositoryModelSet // Sesame modelset
Navigation
services
Toolbox