|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ModelSet
A ModelSet is like a Graph Data Set in SPARQL. It contains a number of named graphs (Models), which might be empty. Additionally, one special unnamed model, the 'Default Model' belongs to a ModelSet. ModelSet offers a number of methods that make it behave like a quad store, however, when e.g. removing all statements with a certain context, the model named with that context still remains in the ModelSet.
ModelSet can be read from a named graph aware serialization
such as TRIG or TRIX using the read/write methods. If you read a
serialization that supports only one graph (like RDF/XML), a default model
will be created.
| Method Summary | |
|---|---|
boolean |
addModel(Model model)
Adds a model to this ModelSet. |
void |
addModel(Model model,
URI contextURI)
Adds a complete Model to the given contextURI. |
void |
addModelSet(ModelSet modelSet)
Adds a complete ModelSet to this ModelSet. |
void |
close()
Close connection to defined, unterlying implementation |
boolean |
containsModel(URI contextURI)
|
Statement |
createStatement(URI context,
Resource subject,
URI predicate,
Node object)
Creates a statement with a context URI. |
URI |
createURI(java.lang.String uriString)
Creates an RDF2Go URI. |
void |
dump()
Print the whole content of this ModelSet to System.out. |
Model |
getDefaultModel()
The default model is used when the modelset is loaded from a serialization that has no context. |
Model |
getModel(URI contextURI)
Get the Model with the passed URI. |
ClosableIterator<Model> |
getModels()
|
ClosableIterator<URI> |
getModelURIs()
|
java.lang.Object |
getUnderlyingModelSetImplementation()
|
boolean |
isEmpty()
|
boolean |
isOpen()
|
void |
open()
Open connection to defined, unterlying implementation |
void |
removeAll()
Removes all models, which is not the same as removing all statements from all models in this ModelSet. |
boolean |
removeModel(URI contextURI)
Removes the Model (NamedGraph) denoted by contextURI from this modelset. |
long |
size()
The number of explicit statements. |
| Methods inherited from interface org.ontoware.rdf2go.model.Sparqlable |
|---|
queryConstruct, querySelect, sparqlAsk, sparqlConstruct, sparqlDescribe, sparqlSelect |
| Methods inherited from interface org.ontoware.rdf2go.model.ModelSetIO |
|---|
readFrom, readFrom, readFrom, readFrom, readFrom, readFrom, serialize, writeTo, writeTo, writeTo, writeTo |
| Methods inherited from interface org.ontoware.rdf2go.model.FindableModelSet |
|---|
contains, containsStatements, countStatements, createQuadPattern, findStatements, findStatements |
| Methods inherited from interface org.ontoware.rdf2go.model.ModelSetAddRemove |
|---|
addAll, addStatement, addStatement, removeAll, removeStatement, removeStatement, removeStatements, removeStatements, update |
| Methods inherited from interface org.ontoware.aifbcommons.collection.ClosableIterable |
|---|
iterator |
| Methods inherited from interface org.ontoware.rdf2go.model.Lockable |
|---|
isLocked, lock, unlock |
| Methods inherited from interface org.ontoware.rdf2go.model.ModelValueFactory |
|---|
createBlankNode, createBlankNode, createDatatypeLiteral, createLanguageTagLiteral, createPlainLiteral, createStatement, isValidURI, newRandomUniqueURI |
| Methods inherited from interface org.ontoware.rdf2go.model.Commitable |
|---|
commit, setAutocommit |
| Methods inherited from interface org.ontoware.rdf2go.model.ReificationSupport |
|---|
addReificationOf, addReificationOf, deleteReification, getAllReificationsOf, hasReifications |
| Methods inherited from interface org.ontoware.rdf2go.model.NamespaceSupport |
|---|
getNamespace, getNamespaces, removeNamespace, setNamespace |
| Method Detail |
|---|
void open()
boolean isOpen()
void close()
long size()
throws ModelRuntimeException
ModelRuntimeExceptionboolean isEmpty()
URI createURI(java.lang.String uriString)
throws ModelRuntimeException
createURI in interface ModelValueFactoryuriString -
ModelRuntimeException - if URI has not a valid URI fomat - according to the adapter
Statement createStatement(URI context,
Resource subject,
URI predicate,
Node object)
context - subject - predicate - object -
Model getModel(URI contextURI)
contextURI - the URI of the context. This is the same as the name of the
named graph.
boolean removeModel(URI contextURI)
contextURI -
boolean addModel(Model model)
model -
void addModel(Model model,
URI contextURI)
throws ModelRuntimeException
Model to the given contextURI.
The context URI of the model is ignored.
contextURI - model -
ModelRuntimeException - if any internal (I/O related) exception occurs
void addModelSet(ModelSet modelSet)
throws ModelRuntimeException
ModelSet to this ModelSet. Context URIs in
the Statements of the modelSet are respected.
contextURI - modelSet -
ModelRuntimeException - if any internal (I/O related) exception occursboolean containsModel(URI contextURI)
contextURI -
void removeAll()
throws ModelRuntimeException
ModelRuntimeExceptionModel getDefaultModel()
ClosableIterator<Model> getModels()
ClosableIterator<URI> getModelURIs()
java.lang.Object getUnderlyingModelSetImplementation()
void dump()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||