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

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

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 class com.hp.hpl.jena.graph.impl.GraphBase
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT
 
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.
 Graph getAdditions()
          Answer the graph of all triples added
 Graph getDeletions()
          Answer the graph of all triples removed
 com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> graphBaseFind(TripleMatch tm)
          Find all the base triples matching tm, exclude the ones that are deleted, add the ones that have been added.
 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 com.hp.hpl.jena.graph.compose.Dyadic
dependsOn, getL, getR, union
 
Methods inherited from class com.hp.hpl.jena.graph.compose.CompositionBase
butNot, ifIn, ifIn, recording, reject, rejecting, rejecting
 
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
add, contains, contains, delete, find, find, forTestingOnly_graphBaseFind, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getStatisticsHandler, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, queryHandler, size, 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, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getStatisticsHandler, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, queryHandler, size
 
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.

Specified by:
performAdd in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performAdd in class com.hp.hpl.jena.graph.impl.GraphBase

performDelete

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

Specified by:
performDelete in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performDelete in class com.hp.hpl.jena.graph.impl.GraphBase

graphBaseFind

public com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> graphBaseFind(TripleMatch tm)
Find all the base triples matching tm, exclude the ones that are deleted, add the ones that have been added.

Specified by:
graphBaseFind in class com.hp.hpl.jena.graph.impl.GraphBase

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

graphBaseSize

public int graphBaseSize()
Overrides:
graphBaseSize in class com.hp.hpl.jena.graph.impl.GraphBase


Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP