public class DiffImpl extends AbstractModelAddRemove implements Diff
Constructor and Description |
---|
DiffImpl() |
DiffImpl(Iterator<? extends Statement> added,
Iterator<? extends Statement> removed) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(Iterator<? extends Statement> other)
Add all statements contained in 'other' to this model = 'union'
|
void |
addStatement(Resource subject,
URI predicate,
Node object)
adds a (subject, property ,object)-statement to this model
|
void |
addStatement(Statement statement)
adds a statement to this model
|
Diff |
create(Iterator<? extends Statement> added,
Iterator<? extends Statement> removed)
Should also be offered by a constructor
|
void |
dump() |
boolean |
equals(Object other) |
static boolean |
equals(Set<Statement> a,
Set<Statement> b) |
Iterable<Statement> |
getAdded() |
Diff |
getDiff(Iterator<? extends Statement> statements) |
Iterable<Statement> |
getRemoved() |
int |
hashCode() |
boolean |
isLocked() |
ClosableIterator<Statement> |
iterator()
Returns an iterator over a set of elements of type T.
|
void |
lock()
Tries to obtain a lock.
|
void |
removeAll()
Removes all statements from this model.
|
void |
removeAll(Iterator<? extends Statement> other)
Removes all statements contained in 'other' from this model =
'difference'
|
void |
removeStatement(Resource subject,
URI predicate,
Node object)
remove a (subject, property ,object)-statement from the model
|
void |
removeStatement(Statement statement)
remove a rdf2go-statement from the model
|
void |
unlock()
Removes a lock.
|
void |
update(DiffReader diff)
Apply the changes given by this diff
|
removeStatement, removeStatement, removeStatement, removeStatement, removeStatement, removeStatement
addStatement, addStatement, addStatement, addStatement, addStatement, addStatement
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
removeStatement, removeStatement, removeStatement, removeStatement, removeStatement, removeStatement
forEach, spliterator
addStatement, addStatement, addStatement, addStatement, addStatement, addStatement
public Diff create(Iterator<? extends Statement> added, Iterator<? extends Statement> removed)
Diff
public Iterable<Statement> getAdded()
getAdded
in interface DiffReader
public Iterable<Statement> getRemoved()
getRemoved
in interface DiffReader
public void removeStatement(Statement statement) throws ModelRuntimeException
ModelAddRemove
removeStatement
in interface ModelAddRemove
removeStatement
in class AbstractModelAddRemove
ModelRuntimeException
public void removeAll(Iterator<? extends Statement> other) throws ModelRuntimeException
ModelAddRemove
removeAll
in interface ModelAddRemove
removeAll
in class AbstractModelAddRemove
ModelRuntimeException
public void removeAll() throws ModelRuntimeException
ModelAddRemove
removeAll
in interface ModelAddRemove
removeAll
in class AbstractModelAddRemove
ModelRuntimeException
public ClosableIterator<Statement> iterator()
ClosableIterable
public void addStatement(Statement statement) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class AbstractModelWriter
statement
- the statement to addModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addAll(Iterator<? extends Statement> other) throws ModelRuntimeException
ModelWriter
addAll
in interface ModelWriter
addAll
in class AbstractModelWriter
other
- another RDF2GO modelModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public Diff getDiff(Iterator<? extends Statement> statements) throws ModelRuntimeException
getDiff
in interface ModelAddRemove
ModelRuntimeException
public void update(DiffReader diff) throws ModelRuntimeException
ModelAddRemove
update
in interface ModelAddRemove
update
in class AbstractModelAddRemove
ModelRuntimeException
public void lock() throws LockException
Lockable
lock
in interface Lockable
LockException
- if already lockedpublic boolean isLocked()
public void unlock()
Lockable
public void addStatement(Resource subject, URI predicate, Node object) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class AbstractModelAddRemove
subject
- of the statementpredicate
- of the statementobject
- of the statementModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void removeStatement(Resource subject, URI predicate, Node object) throws ModelRuntimeException
ModelAddRemove
removeStatement
in interface ModelAddRemove
removeStatement
in class AbstractModelAddRemove
subject
- URI or Object (= blankNode)object
- URI or String (=plainLiteral) or BlankNode (=blankNode) or
TypedLiteral or LanguageTagLiteralModelRuntimeException
Copyright © 2005–2019 IT-Consulting Dr. Max Völkel | Project started at FZI Forschungszentrum Informatik, www.fzi.de. All rights reserved.