org.mulgara.mrg
Class PackedIndexedGraph

java.lang.Object
  extended by org.mulgara.mrg.AbstractGraphExt
      extended by org.mulgara.mrg.AbstractGraph
          extended by org.mulgara.mrg.IndexedGraph
              extended by org.mulgara.mrg.PackedIndexedGraph
All Implemented Interfaces:
AppendableGraph, Graph, GraphExt, WritableGraph

public class PackedIndexedGraph
extends IndexedGraph

A fully indexed graph with tree indexes. This gives log(N) lookups, but uses less memory. Aside from this, it operates the same way as IndexedGraph.


Field Summary
 
Fields inherited from interface org.mulgara.mrg.Graph
X
 
Constructor Summary
PackedIndexedGraph()
          Default constructor for an empty graph.
PackedIndexedGraph(Collection<Triple> triples)
          Builds a graph with a collection of triples.
 
Method Summary
protected
<X> Collection<X>
createCollection()
          Use a HashSet for efficient lookups.
protected
<X,Y> Map<X,Y>
createMap()
          Use hashmaps for efficient lookups.
 
Methods inherited from class org.mulgara.mrg.IndexedGraph
delete, getObjects, getPredicates, insert, match
 
Methods inherited from class org.mulgara.mrg.AbstractGraph
delete, doesResourceExist, exportN3, exportN3, exportXML, exportXML, getProperties, getRawProperties, getRdfList, getSubjects, getSubjects, getTriples, getValue, getValues, insert, isAsserted, isAsserted, isEmpty, matchSubgraph, mergeInto, size, unionInto
 
Methods inherited from class org.mulgara.mrg.AbstractGraphExt
doesResourceExist, doesResourceExist, getProperties, getProperties, getRdfList, getRdfList, getRdfList, getRdfList, getRdfList, getRdfList, getRdfList, getRdfList, getSubjects, getSubjects, getSubjects, getSubjects, getSubjects, getSubjects, getSubjects, getSubjects, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, getValues, getValues, getValues, getValues, getValues, getValues, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mulgara.mrg.GraphExt
doesResourceExist, doesResourceExist, getProperties, getProperties, getRdfList, getRdfList, getRdfList, getRdfList, getRdfList, getRdfList, getRdfList, getRdfList, getSubjects, getSubjects, getSubjects, getSubjects, getSubjects, getSubjects, getSubjects, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, getValues, getValues, getValues, getValues, getValues, getValues, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, isAsserted, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchSubgraphX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX, matchX
 

Constructor Detail

PackedIndexedGraph

public PackedIndexedGraph()
Default constructor for an empty graph.


PackedIndexedGraph

public PackedIndexedGraph(Collection<Triple> triples)
Builds a graph with a collection of triples.

Parameters:
triples - The initial triples for the graph.
Method Detail

createMap

protected <X,Y> Map<X,Y> createMap()
Use hashmaps for efficient lookups.

Overrides:
createMap in class IndexedGraph
Returns:
an instance of a HashMap.

createCollection

protected <X> Collection<X> createCollection()
Use a HashSet for efficient lookups.

Overrides:
createCollection in class IndexedGraph
Returns:
an instance of a HashSet.


Copyright © 2011. All Rights Reserved.