RDF2Go/CodeSamples
From semanticweb.org
Revision as of 18:36, 22 July 2008 by Max Völkel (Talk | contribs)
[edit] Set-up and configure Model
There are basically two ways to set-up a model:
- via RDF2Go
ModelFactory modelFactory = RDF2Go.getModelFactory(); Model model = modelFactory.createModel(); model.open(); // use it
- wrapping (not using a ModelFactory at all)
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