| org.ontoware.rdf2go.model.ModelSetAddRemove
ModelSetAddRemove | public interface ModelSetAddRemove extends ClosableIterable<Statement>,Lockable(Code) | | Allows to add and removes statements from a ModelSet. Statements without a
context are added/removed from the default model.
For plain triples models, this is modeled as a number of interfaces:
ClosableIterable, ModelWriter, Lockable
author: voelkel |
Method Summary | |
void | addAll(Iterator<? extends Statement> statement) For each statement in the iterator, this method creates a Model named
statement.getContextURI if needed. | void | addStatement(URI contextURI, Resource subject, URI predicate, Node object) This method creates a Model named 'contextURI' if needed. | void | addStatement(Statement statement) This method creates a Model named statement.getContextURI if needed. | void | removeAll(Iterator<? extends Statement> statement) For each statement in the iterator, the statement is removed form the
model named statement.getContext(); If the model named
statement.getContext() becomes empty, it remains in the ModelSet. | void | removeStatement(URI contextURI, Resource subject, URI predicate, Node object) Removes the statement (s,p,o) from a model named contextURI. | void | removeStatement(Statement statement) Removes the statement (s,p,o) from a model named statement.getContext(). | void | removeStatements(QuadPattern quadPattern) | void | removeStatements(UriOrVariable context, ResourceOrVariable subject, UriOrVariable predicate, NodeOrVariable object) | void | update(DiffReader diff) Apply the changes given by this diff in one atomic operation
Implementations must check that all statements to be removed are still in
the Model. |
addAll | void addAll(Iterator<? extends Statement> statement) throws ModelRuntimeException(Code) | | For each statement in the iterator, this method creates a Model named
statement.getContextURI if needed. Then the statement (s,p,o) is inserted
into that model.
Parameters: statement - throws: ModelRuntimeException - if any internal (I/O related) exception occurs |
addStatement | void addStatement(URI contextURI, Resource subject, URI predicate, Node object) throws ModelRuntimeException(Code) | | This method creates a Model named 'contextURI' if needed. Then the
statement (s,p,o) is inserted into that model.
Parameters: contextURI - a URI Parameters: subject - a Resource (URI or BlankNode) Parameters: predicate - Parameters: object - a Node throws: ModelRuntimeException - if any internal (I/O related) exception occurs |
addStatement | void addStatement(Statement statement) throws ModelRuntimeException(Code) | | This method creates a Model named statement.getContextURI if needed. Then
the statement (s,p,o) is inserted into that model.
Parameters: statement - throws: ModelRuntimeException - if any internal (I/O related) exception occurs |
removeAll | void removeAll(Iterator<? extends Statement> statement) throws ModelRuntimeException(Code) | | For each statement in the iterator, the statement is removed form the
model named statement.getContext(); If the model named
statement.getContext() becomes empty, it remains in the ModelSet.
Parameters: statement - throws: ModelRuntimeException - if any internal (I/O related) exception occurs |
removeStatement | void removeStatement(URI contextURI, Resource subject, URI predicate, Node object) throws ModelRuntimeException(Code) | | Removes the statement (s,p,o) from a model named contextURI. If the model
named 'contextURI' becomes empty, it remains in the ModelSet.
Parameters: context - a URI Parameters: subject - a Resource (URI or BlankNode) Parameters: predicate - Parameters: object - a Node throws: ModelRuntimeException - if any internal (I/O related) exception occurs |
removeStatement | void removeStatement(Statement statement) throws ModelRuntimeException(Code) | | Removes the statement (s,p,o) from a model named statement.getContext().
If the model named statement.getContext() becomes empty, it remains in
the ModelSet.
Parameters: statement - a Statement throws: ModelRuntimeException - if any internal (I/O related) exception occurs |
update | void update(DiffReader diff) throws ModelRuntimeException(Code) | | Apply the changes given by this diff in one atomic operation
Implementations must check that all statements to be removed are still in
the Model. Otherwise an exception is thrown.
First all triples to be removed are removed, then triples to be added are
added.
In this modelset, this means (s,p,o) is removed from the graph named c,
for all statements (c,s,p,o). Note: Models becoming empty are not
removed.
Parameters: diff - throws: ModelRuntimeException - if a model or statement in a model to be removed does notexist. |
|
|