Package org.apache.jena.graph.compose
Class Delta
- java.lang.Object
-
- org.apache.jena.graph.impl.GraphBase
-
- org.apache.jena.graph.compose.CompositionBase
-
- org.apache.jena.graph.compose.Delta
-
- All Implemented Interfaces:
Graph
,GraphWithPerform
public class Delta extends CompositionBase implements Graph
Graph operation for wrapping a base graph and leaving it unchanged while recording all the attempted updates for later access. The behavior of this class is not well defined if triples are added to or removed from the base graph, the additions graph, or the deletions graph while this graph is in use.
-
-
Field Summary
-
Fields inherited from class org.apache.jena.graph.impl.GraphBase
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT
-
Fields inherited from interface org.apache.jena.graph.Graph
emptyGraph
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this graph.Graph
getAdditions()
Answer the graph of all triples added.Capabilities
getCapabilities()
Answer the capabilities of this graph; the default is an AllCapabilities object (the same one each time, not that it matters - Capabilities should be immutable).Graph
getDeletions()
Answer the graph of all triples removed.int
graphBaseSize()
void
performAdd(Triple t)
Add the triple to the graph, ie add it to the additions, remove it from the removals.void
performDelete(Triple t)
Remove the triple, ie, remove it from the adds, add it to the removals.-
Methods inherited from class org.apache.jena.graph.compose.CompositionBase
butNot, ifIn, ifIn, recording, reject, rejecting, rejecting
-
Methods inherited from class org.apache.jena.graph.impl.GraphBase
add, clear, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, getPrefixMapping, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, remove, size, toString, toString
-
-
-
-
Constructor Detail
-
Delta
public Delta(Graph base)
-
-
Method Detail
-
getCapabilities
public Capabilities getCapabilities()
Description copied from class:GraphBase
Answer the capabilities of this graph; the default is an AllCapabilities object (the same one each time, not that it matters - Capabilities should be immutable).- Specified by:
getCapabilities
in interfaceGraph
- Overrides:
getCapabilities
in classGraphBase
-
getAdditions
public Graph getAdditions()
Answer the graph of all triples added.
-
getDeletions
public Graph getDeletions()
Answer the graph of all triples removed.
-
performAdd
public void performAdd(Triple t)
Add the triple to the graph, ie add it to the additions, remove it from the removals.- Specified by:
performAdd
in interfaceGraphWithPerform
- Overrides:
performAdd
in classGraphBase
-
performDelete
public void performDelete(Triple t)
Remove the triple, ie, remove it from the adds, add it to the removals.- Specified by:
performDelete
in interfaceGraphWithPerform
- Overrides:
performDelete
in classGraphBase
-
close
public void close()
Description copied from class:GraphBase
Close this graph. Subgraphs may extend to discard resources.
-
graphBaseSize
public int graphBaseSize()
-
-