com.hp.hpl.jena.sparql.graph
Class GraphDataBag

java.lang.Object
  extended by com.hp.hpl.jena.graph.impl.GraphBase
      extended by com.hp.hpl.jena.mem.GraphMemBase
          extended by com.hp.hpl.jena.sparql.graph.GraphDataBag
All Implemented Interfaces:
com.hp.hpl.jena.graph.Graph, com.hp.hpl.jena.graph.GraphAdd, com.hp.hpl.jena.graph.impl.GraphWithPerform
Direct Known Subclasses:
GraphDefaultDataBag, GraphDistinctDataBag

public abstract class GraphDataBag
extends com.hp.hpl.jena.mem.GraphMemBase

A Graph based on top of a DataBag. This means it has some limitations:

  1. Cannot add any triples after you call find() unless you first call clear() or getBulkUpdateHandler().removeAll().
  2. Cannot remove any triples except by calling clear() or getBulkUpdateHandler().removeAll().
  3. There is no indexing, so find() will always scan all triples.
  4. The size() method is not guaranteed to be accurate, treat it as an estimate.
  5. You must call close() in order to release any resources (such as spill files).


Field Summary
 
Fields inherited from class com.hp.hpl.jena.mem.GraphMemBase
store
 
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
GraphDataBag(ThresholdPolicy<com.hp.hpl.jena.graph.Triple> thresholdPolicy)
           
GraphDataBag(ThresholdPolicy<com.hp.hpl.jena.graph.Triple> thresholdPolicy, com.hp.hpl.jena.shared.ReificationStyle style)
           
 
Method Summary
 void clear()
           
 int graphBaseSize()
           
 void performAdd(com.hp.hpl.jena.graph.Triple t)
           
 
Methods inherited from class com.hp.hpl.jena.mem.GraphMemBase
close, getBulkUpdateHandler, openAgain
 
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
add, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getCapabilities, getEventManager, getPrefixMapping, getReifier, getStatisticsHandler, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, performDelete, queryHandler, size, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphDataBag

public GraphDataBag(ThresholdPolicy<com.hp.hpl.jena.graph.Triple> thresholdPolicy)

GraphDataBag

public GraphDataBag(ThresholdPolicy<com.hp.hpl.jena.graph.Triple> thresholdPolicy,
                    com.hp.hpl.jena.shared.ReificationStyle style)
Method Detail

performAdd

public void performAdd(com.hp.hpl.jena.graph.Triple t)
Specified by:
performAdd in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performAdd in class com.hp.hpl.jena.graph.impl.GraphBase

graphBaseSize

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

clear

public void clear()
Specified by:
clear in class com.hp.hpl.jena.mem.GraphMemBase


Licenced under the Apache License, Version 2.0