com.hp.hpl.jena.graph.compose
Class Delta

java.lang.Object
  extended bycom.hp.hpl.jena.graph.impl.GraphBase
      extended bycom.hp.hpl.jena.graph.compose.CompositionBase
          extended bycom.hp.hpl.jena.graph.compose.Dyadic
              extended bycom.hp.hpl.jena.graph.compose.Delta
All Implemented Interfaces:
Graph, GraphAdd

public class Delta
extends Dyadic
implements Graph

Graph operation for wrapping a base graph and leaving it unchanged while recording all the attempted updates for later access.

TODO review in the light of GraphWrapper

Author:
hedgehog

Field Summary
 
Fields inherited from interface com.hp.hpl.jena.graph.Graph
emptyGraph
 
Constructor Summary
Delta(Graph base)
           
 
Method Summary
 void close()
          Free all resources, any further use of this Graph is an error.
 ExtendedIterator find(TripleMatch tm)
          Find all the base triples matching tm, exclude the ones that are deleted, add the ones that have been added.
 Graph getAdditions()
          Answer the graph of all triples added
 Graph getDeletions()
          Answer the graph of all triples removed
 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.
 int size()
          For a concrete graph this returns the number of triples in the graph.
 
Methods inherited from class com.hp.hpl.jena.graph.compose.Dyadic
dependsOn, union
 
Methods inherited from class com.hp.hpl.jena.graph.compose.CompositionBase
butNot, contains, countIterator, ifIn, ifIn, recording, reject, rejecting
 
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
add, contains, delete, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getTransactionHandler, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, queryHandler, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.graph.Graph
contains, contains, delete, dependsOn, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getTransactionHandler, isEmpty, isIsomorphicWith, queryHandler
 
Methods inherited from interface com.hp.hpl.jena.graph.GraphAdd
add
 

Constructor Detail

Delta

public Delta(Graph base)
Method Detail

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.


performDelete

public void performDelete(Triple t)
Remove the triple, ie, remove it from the adds, add it to the removals.


find

public ExtendedIterator find(TripleMatch tm)
Find all the base triples matching tm, exclude the ones that are deleted, add the ones that have been added.

Specified by:
find in interface Graph
See Also:
Graph.find(TripleMatch)

close

public void close()
Description copied from interface: Graph
Free all resources, any further use of this Graph is an error.

Specified by:
close in interface Graph
Overrides:
close in class Dyadic

size

public int size()
Description copied from interface: Graph
For a concrete graph this returns the number of triples in the graph. For graphs which might infer additional triples it results an estimated lower bound of the number of triples. For example, an inference graph might return the number of triples in the raw data graph.

Specified by:
size in interface Graph
Overrides:
size in class CompositionBase
Returns:
The integer triple count
See Also:
Graph.size()


Copyright © 2000-2003 Hewlett-Packard. All Rights Reserved.