I\'m starting to work with the Jena Engine and I think I got a grasp of what semantics are. However I\'m having a hard time understanding the different ways to represent a bunch
Short answer: Model
is just a stateless wrapper with lots of convenience methods around a Graph
. ModelFactory.createModelForGraph(Graph)
wraps a graph in a model. Model.getGraph()
gets the wrapped graph.
Most application programmers would use Model
. Personally I prefer to use Graph
because it's simpler. I have trouble remembering all the cruft on the Model
class.
Dataset
is a collection of several Model
s: one “default model” and zero or more “named models”. This corresponds to the notion of an “RDF dataset” in SPARQL. (Technically speaking, SPARQL is not a query language for “RDF graphs” but for “RDF datasets” which can be collections of named RDF graphs plus a default graph.)