org.topbraid.core.graph
Class DelegatingGraph

java.lang.Object
  extended by org.topbraid.core.graph.DelegatingGraph
All Implemented Interfaces:
com.hp.hpl.jena.graph.Graph, com.hp.hpl.jena.graph.GraphAdd, BatchOperationGraph
Direct Known Subclasses:
BufferingGraph, CachingGraph

public class DelegatingGraph
extends java.lang.Object
implements BatchOperationGraph

A Graph that delegates all calls into a given Graph. This class can serve as a base class to build a stack of Graphs.

Author:
Holger Knublauch

Field Summary
 
Fields inherited from interface com.hp.hpl.jena.graph.Graph
emptyGraph
 
Constructor Summary
DelegatingGraph(com.hp.hpl.jena.graph.Graph delegate)
           
 
Method Summary
 void add(java.util.Collection<com.hp.hpl.jena.graph.Triple> triples)
          Adds multiple Triples at the same time.
 void add(com.hp.hpl.jena.graph.Triple t)
           
 void close()
           
 boolean contains(com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
           
 boolean contains(com.hp.hpl.jena.graph.Triple t)
           
 void delete(java.util.Collection<com.hp.hpl.jena.graph.Triple> triples)
          Deletes multiple Triples at the same time.
 void delete(com.hp.hpl.jena.graph.Triple t)
           
 boolean dependsOn(com.hp.hpl.jena.graph.Graph other)
           
 com.hp.hpl.jena.util.iterator.ExtendedIterator find(com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
           
 com.hp.hpl.jena.util.iterator.ExtendedIterator find(com.hp.hpl.jena.graph.TripleMatch m)
           
 com.hp.hpl.jena.graph.BulkUpdateHandler getBulkUpdateHandler()
           
 com.hp.hpl.jena.graph.Capabilities getCapabilities()
           
 com.hp.hpl.jena.graph.Graph getDelegate()
           
 com.hp.hpl.jena.graph.GraphEventManager getEventManager()
           
 com.hp.hpl.jena.shared.PrefixMapping getPrefixMapping()
           
 com.hp.hpl.jena.graph.Reifier getReifier()
           
 com.hp.hpl.jena.graph.GraphStatisticsHandler getStatisticsHandler()
           
 com.hp.hpl.jena.graph.Graph getTerminalDelegate()
          Gets the delegate that is at the end of the delegation chain.
 com.hp.hpl.jena.graph.TransactionHandler getTransactionHandler()
           
 boolean isClosed()
           
 boolean isEmpty()
           
 boolean isIsomorphicWith(com.hp.hpl.jena.graph.Graph g)
           
 void notifyAdd(com.hp.hpl.jena.graph.Triple t)
           
 void notifyDelete(com.hp.hpl.jena.graph.Triple t)
           
 com.hp.hpl.jena.graph.query.QueryHandler queryHandler()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingGraph

public DelegatingGraph(com.hp.hpl.jena.graph.Graph delegate)
Method Detail

add

public void add(com.hp.hpl.jena.graph.Triple t)
         throws com.hp.hpl.jena.shared.AddDeniedException
Specified by:
add in interface com.hp.hpl.jena.graph.GraphAdd
Throws:
com.hp.hpl.jena.shared.AddDeniedException

add

public void add(java.util.Collection<com.hp.hpl.jena.graph.Triple> triples)
Description copied from interface: BatchOperationGraph
Adds multiple Triples at the same time.

Specified by:
add in interface BatchOperationGraph
Parameters:
triples - the Triples to add

close

public void close()
Specified by:
close in interface com.hp.hpl.jena.graph.Graph

contains

public boolean contains(com.hp.hpl.jena.graph.Triple t)
Specified by:
contains in interface com.hp.hpl.jena.graph.Graph

contains

public boolean contains(com.hp.hpl.jena.graph.Node s,
                        com.hp.hpl.jena.graph.Node p,
                        com.hp.hpl.jena.graph.Node o)
Specified by:
contains in interface com.hp.hpl.jena.graph.Graph

delete

public void delete(com.hp.hpl.jena.graph.Triple t)
            throws com.hp.hpl.jena.shared.DeleteDeniedException
Specified by:
delete in interface com.hp.hpl.jena.graph.Graph
Throws:
com.hp.hpl.jena.shared.DeleteDeniedException

delete

public void delete(java.util.Collection<com.hp.hpl.jena.graph.Triple> triples)
Description copied from interface: BatchOperationGraph
Deletes multiple Triples at the same time.

Specified by:
delete in interface BatchOperationGraph
Parameters:
triples - the Triples to delete

dependsOn

public boolean dependsOn(com.hp.hpl.jena.graph.Graph other)
Specified by:
dependsOn in interface com.hp.hpl.jena.graph.Graph

find

public com.hp.hpl.jena.util.iterator.ExtendedIterator find(com.hp.hpl.jena.graph.TripleMatch m)
Specified by:
find in interface com.hp.hpl.jena.graph.Graph

find

public com.hp.hpl.jena.util.iterator.ExtendedIterator find(com.hp.hpl.jena.graph.Node s,
                                                           com.hp.hpl.jena.graph.Node p,
                                                           com.hp.hpl.jena.graph.Node o)
Specified by:
find in interface com.hp.hpl.jena.graph.Graph

getBulkUpdateHandler

public com.hp.hpl.jena.graph.BulkUpdateHandler getBulkUpdateHandler()
Specified by:
getBulkUpdateHandler in interface com.hp.hpl.jena.graph.Graph

getCapabilities

public com.hp.hpl.jena.graph.Capabilities getCapabilities()
Specified by:
getCapabilities in interface com.hp.hpl.jena.graph.Graph

getDelegate

public final com.hp.hpl.jena.graph.Graph getDelegate()

getEventManager

public com.hp.hpl.jena.graph.GraphEventManager getEventManager()
Specified by:
getEventManager in interface com.hp.hpl.jena.graph.Graph

getPrefixMapping

public com.hp.hpl.jena.shared.PrefixMapping getPrefixMapping()
Specified by:
getPrefixMapping in interface com.hp.hpl.jena.graph.Graph

getReifier

public com.hp.hpl.jena.graph.Reifier getReifier()
Specified by:
getReifier in interface com.hp.hpl.jena.graph.Graph

getStatisticsHandler

public com.hp.hpl.jena.graph.GraphStatisticsHandler getStatisticsHandler()
Specified by:
getStatisticsHandler in interface com.hp.hpl.jena.graph.Graph

getTerminalDelegate

public com.hp.hpl.jena.graph.Graph getTerminalDelegate()
Gets the delegate that is at the end of the delegation chain.

Returns:
the terminal delegate (not an instance of DelegatingGraph)

getTransactionHandler

public com.hp.hpl.jena.graph.TransactionHandler getTransactionHandler()
Specified by:
getTransactionHandler in interface com.hp.hpl.jena.graph.Graph

isClosed

public boolean isClosed()
Specified by:
isClosed in interface com.hp.hpl.jena.graph.Graph

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface com.hp.hpl.jena.graph.Graph

isIsomorphicWith

public boolean isIsomorphicWith(com.hp.hpl.jena.graph.Graph g)
Specified by:
isIsomorphicWith in interface com.hp.hpl.jena.graph.Graph

notifyAdd

public void notifyAdd(com.hp.hpl.jena.graph.Triple t)

notifyDelete

public void notifyDelete(com.hp.hpl.jena.graph.Triple t)

queryHandler

public com.hp.hpl.jena.graph.query.QueryHandler queryHandler()
Specified by:
queryHandler in interface com.hp.hpl.jena.graph.Graph

size

public int size()
Specified by:
size in interface com.hp.hpl.jena.graph.Graph