org.mulgara.mrg
Class PackedGraphImpl

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

public class PackedGraphImpl
extends AbstractGraph

A graph that uses tree sets and maps to keep the memory footprint smaller. This gives log(N) lookups.


Field Summary
 
Fields inherited from interface org.mulgara.mrg.Graph
X
 
Constructor Summary
PackedGraphImpl()
          Default constructor for an empty graph.
PackedGraphImpl(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.AbstractGraph
delete, delete, doesResourceExist, exportN3, exportN3, exportXML, exportXML, getObjects, getPredicates, getProperties, getRawProperties, getRdfList, getSubjects, getSubjects, getTriples, getValue, getValues, insert, insert, isAsserted, isAsserted, isEmpty, match, 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

PackedGraphImpl

public PackedGraphImpl()
Default constructor for an empty graph.


PackedGraphImpl

public PackedGraphImpl(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.

Specified by:
createMap in class AbstractGraph
Returns:
an instance of a HashMap.

createCollection

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

Specified by:
createCollection in class AbstractGraph
Returns:
an instance of a HashSet.


Copyright © 2011. All Rights Reserved.