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

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.Difference
All Implemented Interfaces:
Graph, GraphAdd

public class Difference
extends Dyadic
implements Graph

Class representing the dynamic set difference L - R of two graphs. This is updatable; the updates are written through to one or other of the base graphs.

Author:
hedgehog

Field Summary
 
Fields inherited from interface com.hp.hpl.jena.graph.Graph
emptyGraph
 
Constructor Summary
Difference(Graph L, Graph R)
          Initialise a graph representing the difference L - R.
 
Method Summary
 ExtendedIterator find(TripleMatch t)
          Returns an iterator over all the Triples that match the triple pattern.
 void performAdd(Triple t)
          Add a triple to the difference: add it to the left operand, and remove it from the right operand.
 void performDelete(Triple t)
          Remove a triple from the difference: remove it from the left operand.
 
Methods inherited from class com.hp.hpl.jena.graph.compose.Dyadic
close, dependsOn, union
 
Methods inherited from class com.hp.hpl.jena.graph.compose.CompositionBase
butNot, contains, countIterator, ifIn, ifIn, recording, reject, rejecting, size
 
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
close, contains, contains, delete, dependsOn, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getTransactionHandler, isEmpty, isIsomorphicWith, queryHandler, size
 
Methods inherited from interface com.hp.hpl.jena.graph.GraphAdd
add
 

Constructor Detail

Difference

public Difference(Graph L,
                  Graph R)
Initialise a graph representing the difference L - R.

Method Detail

performAdd

public void performAdd(Triple t)
Add a triple to the difference: add it to the left operand, and remove it from the right operand.


performDelete

public void performDelete(Triple t)
Remove a triple from the difference: remove it from the left operand. [It could be added to the right operand instead, but somehow that feels less satisfactory.]


find

public ExtendedIterator find(TripleMatch t)
Description copied from interface: Graph
Returns an iterator over all the Triples that match the triple pattern.

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


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