|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ontoware.rdf2go.model.impl.AbstractModelSetImpl
org.openrdf.rdf2go.RepositoryModelSet
public class RepositoryModelSet
A ModelSet implementation for the OpenRDF (Sesame) 2.0.1 API.
Note that RepositoryModel and RepositoryModelSet only work well together
because they both keep their RepositoryConnections in auto-commit mode. This
cannot be changed by the user. Do mass-updates using #update(Diff),
addAll(Iterator) or removeAll(Iterator), then the current
connection will be used in non-autocommit mode and commited, including a
rollback when it fails.
Note: Every Model returned by this implementation should be explicitly closed by the user.
| Constructor Summary | |
|---|---|
RepositoryModelSet(org.openrdf.repository.Repository repository)
|
|
| Method Summary | |
|---|---|
void |
addAll(java.util.Iterator<? extends Statement> iterator)
|
boolean |
addModel(Model model)
|
void |
addModel(Model model,
URI contextURI)
|
void |
addModelSet(ModelSet modelSet)
|
void |
addStatement(Statement statement)
|
protected void |
assertModel()
same as model.assetModel() |
void |
close()
Releases all resources held by the RepositoryModelSet. |
void |
commit()
|
boolean |
contains(Statement s)
|
boolean |
containsModel(URI contextURI)
|
boolean |
containsStatements(UriOrVariable contextURI,
ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
|
QuadPattern |
createQuadPattern(UriOrVariable context,
ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
|
URI |
createURI(java.lang.String uriString)
|
void |
dump()
|
void |
finalize()
|
ClosableIterator<Statement> |
findStatements(QuadPattern pattern)
|
ClosableIterator<Statement> |
findStatements(UriOrVariable contextURI,
ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
|
Model |
getDefaultModel()
|
Model |
getModel(URI contextURI)
|
ClosableIterator<Model> |
getModels()
|
ClosableIterator<URI> |
getModelURIs()
|
java.lang.String |
getNamespace(java.lang.String prefix)
|
java.util.Map<java.lang.String,java.lang.String> |
getNamespaces()
|
org.openrdf.repository.Repository |
getUnderlyingModelImplementation()
|
org.openrdf.repository.Repository |
getUnderlyingModelSetImplementation()
|
boolean |
isOpen()
Returns whether the RepositoryModelSet is currently opened. |
ClosableIterator<Statement> |
iterator()
|
void |
open()
Prepares the RepositoryModelSet for operation. |
ClosableIterable<Statement> |
queryConstruct(java.lang.String queryString,
java.lang.String queryLanguage)
|
QueryResultTable |
querySelect(java.lang.String queryString,
java.lang.String queryLanguage)
|
void |
readFrom(java.io.InputStream in)
|
void |
readFrom(java.io.InputStream in,
Syntax syntax)
|
void |
readFrom(java.io.InputStream in,
Syntax syntax,
java.lang.String baseURI)
|
void |
readFrom(java.io.Reader reader)
|
void |
readFrom(java.io.Reader reader,
Syntax syntax)
|
void |
readFrom(java.io.Reader reader,
Syntax syntax,
java.lang.String baseURI)
|
void |
removeAll()
|
void |
removeAll(java.util.Iterator<? extends Statement> iterator)
|
boolean |
removeModel(URI contextURI)
|
void |
removeNamespace(java.lang.String prefix)
|
void |
removeStatement(Statement statement)
|
void |
removeStatements(QuadPattern pattern)
|
void |
removeStatements(UriOrVariable context,
ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
|
void |
setAutocommit(boolean autocommit)
|
void |
setNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
|
void |
setUnderlyingModelSetImplementation(org.openrdf.repository.Repository repository)
|
long |
size()
|
boolean |
sparqlAsk(java.lang.String queryString)
|
ClosableIterable<Statement> |
sparqlConstruct(java.lang.String queryString)
|
ClosableIterable<Statement> |
sparqlDescribe(java.lang.String queryString)
|
QueryResultTable |
sparqlSelect(java.lang.String queryString)
|
void |
update(DiffReader diff)
|
void |
writeTo(java.io.OutputStream out)
Writes the whole ModelSet in TriX syntax to the OutputStream. |
void |
writeTo(java.io.OutputStream out,
Syntax syntax)
Writes the whole ModelSet to the OutputStream. |
void |
writeTo(java.io.Writer writer)
Writes the whole ModelSet in TriX syntax to the writer. |
void |
writeTo(java.io.Writer writer,
Syntax syntax)
Writes the whole ModelSet to the Writer. |
| Methods inherited from class org.ontoware.rdf2go.model.impl.AbstractModelSetImpl |
|---|
addReificationOf, addReificationOf, addStatement, countStatements, createBlankNode, createBlankNode, createDatatypeLiteral, createLanguageTagLiteral, createPlainLiteral, createStatement, createStatement, deleteReification, getAllReificationsOf, hasReifications, isEmpty, isLocked, isValidURI, lock, newRandomUniqueURI, removeStatement, serialize, unlock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryModelSet(org.openrdf.repository.Repository repository)
throws ModelRuntimeException
ModelRuntimeException| Method Detail |
|---|
public void addAll(java.util.Iterator<? extends Statement> iterator)
throws ModelRuntimeException
addAll in interface ModelSetAddRemoveaddAll in class AbstractModelSetImplModelRuntimeException
public boolean addModel(Model model)
throws ModelRuntimeException
addModel in interface ModelSetaddModel in class AbstractModelSetImplModelRuntimeException
public void addModel(Model model,
URI contextURI)
throws ModelRuntimeException
addModel in interface ModelSetaddModel in class AbstractModelSetImplModelRuntimeException
public void addModelSet(ModelSet modelSet)
throws ModelRuntimeException
addModelSet in interface ModelSetaddModelSet in class AbstractModelSetImplModelRuntimeException
public void addStatement(Statement statement)
throws ModelRuntimeException
ModelRuntimeExceptionpublic void close()
public void commit()
public boolean contains(Statement s)
throws ModelRuntimeException
contains in interface FindableModelSetcontains in class AbstractModelSetImplModelRuntimeExceptionpublic boolean containsModel(URI contextURI)
public boolean containsStatements(UriOrVariable contextURI,
ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
throws ModelRuntimeException
containsStatements in interface FindableModelSetcontainsStatements in class AbstractModelSetImplModelRuntimeException
public QuadPattern createQuadPattern(UriOrVariable context,
ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
public URI createURI(java.lang.String uriString)
throws ModelRuntimeException
createURI in interface ModelSetcreateURI in interface ModelValueFactorycreateURI in class AbstractModelSetImplModelRuntimeExceptionpublic void dump()
dump in interface ModelSetdump in class AbstractModelSetImpl
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
public ClosableIterator<Statement> findStatements(QuadPattern pattern)
throws ModelRuntimeException
findStatements in interface FindableModelSetfindStatements in class AbstractModelSetImplModelRuntimeException
public ClosableIterator<Statement> findStatements(UriOrVariable contextURI,
ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
throws ModelRuntimeException
findStatements in interface FindableModelSetfindStatements in class AbstractModelSetImplModelRuntimeExceptionpublic Model getDefaultModel()
public Model getModel(URI contextURI)
public ClosableIterator<Model> getModels()
public ClosableIterator<URI> getModelURIs()
public java.lang.String getNamespace(java.lang.String prefix)
public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
public org.openrdf.repository.Repository getUnderlyingModelImplementation()
public org.openrdf.repository.Repository getUnderlyingModelSetImplementation()
public boolean isOpen()
public ClosableIterator<Statement> iterator()
iterator in interface java.lang.Iterable<Statement>iterator in interface ClosableIterable<Statement>iterator in class AbstractModelSetImplpublic void open()
public ClosableIterable<Statement> queryConstruct(java.lang.String queryString,
java.lang.String queryLanguage)
throws QueryLanguageNotSupportedException,
ModelRuntimeException
QueryLanguageNotSupportedException
ModelRuntimeException
public QueryResultTable querySelect(java.lang.String queryString,
java.lang.String queryLanguage)
throws QueryLanguageNotSupportedException,
ModelRuntimeException
QueryLanguageNotSupportedException
ModelRuntimeException
public void readFrom(java.io.InputStream in)
throws java.io.IOException,
ModelRuntimeException
java.io.IOException
ModelRuntimeException
public void readFrom(java.io.InputStream in,
Syntax syntax)
throws java.io.IOException,
ModelRuntimeException
readFrom in interface ModelSetIOreadFrom in class AbstractModelSetImpljava.io.IOException
ModelRuntimeException
public void readFrom(java.io.InputStream in,
Syntax syntax,
java.lang.String baseURI)
throws java.io.IOException,
ModelRuntimeException
java.io.IOException
ModelRuntimeException
public void readFrom(java.io.Reader reader)
throws java.io.IOException,
ModelRuntimeException
java.io.IOException
ModelRuntimeException
public void readFrom(java.io.Reader reader,
Syntax syntax)
throws java.io.IOException,
ModelRuntimeException
readFrom in interface ModelSetIOreadFrom in class AbstractModelSetImpljava.io.IOException
ModelRuntimeException
public void readFrom(java.io.Reader reader,
Syntax syntax,
java.lang.String baseURI)
throws java.io.IOException,
ModelRuntimeException
java.io.IOException
ModelRuntimeException
public void removeAll()
throws ModelRuntimeException
removeAll in interface ModelSetremoveAll in class AbstractModelSetImplModelRuntimeException
public void removeAll(java.util.Iterator<? extends Statement> iterator)
throws ModelRuntimeException
removeAll in interface ModelSetAddRemoveremoveAll in class AbstractModelSetImplModelRuntimeExceptionpublic boolean removeModel(URI contextURI)
public void removeNamespace(java.lang.String prefix)
public void removeStatement(Statement statement)
throws ModelRuntimeException
ModelRuntimeException
public void removeStatements(QuadPattern pattern)
throws ModelRuntimeException
removeStatements in interface ModelSetAddRemoveremoveStatements in class AbstractModelSetImplModelRuntimeException
public void removeStatements(UriOrVariable context,
ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
throws ModelRuntimeException
removeStatements in interface ModelSetAddRemoveremoveStatements in class AbstractModelSetImplModelRuntimeExceptionpublic void setAutocommit(boolean autocommit)
public void setNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic void setUnderlyingModelSetImplementation(org.openrdf.repository.Repository repository)
public long size()
throws ModelRuntimeException
ModelRuntimeException
public boolean sparqlAsk(java.lang.String queryString)
throws ModelRuntimeException
sparqlAsk in interface SparqlablesparqlAsk in class AbstractModelSetImplModelRuntimeException
public ClosableIterable<Statement> sparqlConstruct(java.lang.String queryString)
throws ModelRuntimeException
ModelRuntimeException
public ClosableIterable<Statement> sparqlDescribe(java.lang.String queryString)
throws ModelRuntimeException
ModelRuntimeException
public QueryResultTable sparqlSelect(java.lang.String queryString)
throws ModelRuntimeException
ModelRuntimeException
public void update(DiffReader diff)
throws ModelRuntimeException
update in interface ModelSetAddRemoveupdate in class AbstractModelSetImplModelRuntimeException
public void writeTo(java.io.OutputStream out)
throws java.io.IOException,
ModelRuntimeException
java.io.IOException
ModelRuntimeException
public void writeTo(java.io.OutputStream out,
Syntax syntax)
throws java.io.IOException,
ModelRuntimeException
writeTo in interface ModelSetIOwriteTo in class AbstractModelSetImpljava.io.IOException
ModelRuntimeException
public void writeTo(java.io.Writer writer)
throws java.io.IOException,
ModelRuntimeException
java.io.IOException
ModelRuntimeException
public void writeTo(java.io.Writer writer,
Syntax syntax)
throws java.io.IOException,
ModelRuntimeException
writeTo in interface ModelSetIOwriteTo in class AbstractModelSetImpljava.io.IOException
ModelRuntimeExceptionprotected void assertModel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||