org.aksw.commons.graph
Class DeltaGraph

java.lang.Object
  extended by org.aksw.commons.graph.BaseIndexedGraph
      extended by org.aksw.commons.graph.DeltaGraph
All Implemented Interfaces:
IGraph

public class DeltaGraph
extends BaseIndexedGraph

A wrapper for an underlying graph, whereas the uncachedBulkFind method respects the added and removed triples.

Author:
raven

Field Summary
 
Fields inherited from class org.aksw.commons.graph.BaseIndexedGraph
cacheProvider, listeners
 
Constructor Summary
DeltaGraph(IGraph baseGraph)
           
 
Method Summary
 void add(Collection<com.hp.hpl.jena.graph.Triple> triples)
          Adds triples to the graph
 void addTriple(com.hp.hpl.jena.graph.Triple triple)
           
 void clear()
          Removes all triples from the graph
 void commit()
          Performs the addition/removal on the base graph.
 IGraph getAdditionGraph()
           
 IGraph getBaseGraph()
           
 IGraph getRemovalGraph()
           
 void remove(Collection<com.hp.hpl.jena.graph.Triple> triples)
           
 void removeTriple(com.hp.hpl.jena.graph.Triple triple)
           
 Set<com.hp.hpl.jena.graph.Triple> uncachedBulkFind(Set<List<Object>> keys, int[] indexColumns)
          FIXME: Uncached bulkFind does NOT mean, that no caches will be used.
 
Methods inherited from class org.aksw.commons.graph.BaseIndexedGraph
bulkFind, getCacheProvider, getGraphListeners, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeltaGraph

public DeltaGraph(IGraph baseGraph)
Method Detail

commit

public void commit()
Performs the addition/removal on the base graph. Note that this does not change the set of triples in the graph. Warning: Make sure that triples added to the base graph remain the same on retrieval - otherwise this would cause problems. For instance, datatype information for certain literals get lost in virtuoso. Such critical triples should not be inserted. Wrapp this graph to transform critical triples to safe ones beforehand.


addTriple

public void addTriple(com.hp.hpl.jena.graph.Triple triple)

removeTriple

public void removeTriple(com.hp.hpl.jena.graph.Triple triple)

getBaseGraph

public IGraph getBaseGraph()

getAdditionGraph

public IGraph getAdditionGraph()

getRemovalGraph

public IGraph getRemovalGraph()

add

public void add(Collection<com.hp.hpl.jena.graph.Triple> triples)
Description copied from interface: IGraph
Adds triples to the graph

Specified by:
add in interface IGraph
Overrides:
add in class BaseIndexedGraph

remove

public void remove(Collection<com.hp.hpl.jena.graph.Triple> triples)
Specified by:
remove in interface IGraph
Overrides:
remove in class BaseIndexedGraph

uncachedBulkFind

public Set<com.hp.hpl.jena.graph.Triple> uncachedBulkFind(Set<List<Object>> keys,
                                                          int[] indexColumns)
FIXME: Uncached bulkFind does NOT mean, that no caches will be used. It only means that the caches of the called graph object will not be used.


clear

public void clear()
Description copied from interface: IGraph
Removes all triples from the graph



Copyright © 2012. All Rights Reserved.