Semweb4j/multipleModels/step1

From semanticweb.org
Jump to: navigation, search

Up | Previous lesson | Next step

Contents

[edit] Step 1: ModelSets

[edit] initializing sets of models

To use sets of models, you can use the RDF2Go ModelFactory almost like always:

	private static ModelSet modelSet;
	
	private static void init() throws ModelRuntimeException {
		modelSet = RDF2Go.getModelFactory().createModelSet();		
		modelSet.open();
	}

A modelSet implements the interfaces

Sparqlable, ModelSetIO, FindableModelSet, ModelSetAddRemove, ModelValueFactory

and therefore can be queried with SPARQL, serialized, queried with triple patterns (finding) and you can do

modelSet.addStatement(contextURI, subject, predicate, object)

and similar like in a quad store.


[edit] basic modelSet operations

[edit] set arithmetics

[edit] output

Personal tools
Namespaces

Variants
Actions
Navigation
services
Toolbox