org.jrdf.graph.local.mem
Class ReadWriteGraphImpl

java.lang.Object
  extended by org.jrdf.graph.local.mem.ReadWriteGraphImpl
All Implemented Interfaces:
ReadableGraph, ReadWriteGraph, WritableGraph

public class ReadWriteGraphImpl
extends Object
implements ReadWriteGraph


Constructor Summary
ReadWriteGraphImpl(LongIndex[] newIndexes, NodePool newNodePool, IteratorFactory newIteratorFactory)
           
 
Method Summary
 void clear()
           
 boolean contains(SubjectNode subject, PredicateNode predicate, ObjectNode object)
           
 ClosableIterator<Triple> find(SubjectNode subject, PredicateNode predicate, ObjectNode object)
           
 ClosableIterator<PredicateNode> findUniquePredicates()
           
 ClosableIterator<PredicateNode> findUniquePredicates(Resource resource)
           
 long getSize()
           
 void localizeAndAdd(SubjectNode subject, PredicateNode predicate, ObjectNode object)
           
 void localizeAndRemove(SubjectNode subject, PredicateNode predicate, ObjectNode object)
           
 void removeIterator(Iterator<Triple> triples)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadWriteGraphImpl

public ReadWriteGraphImpl(LongIndex[] newIndexes,
                          NodePool newNodePool,
                          IteratorFactory newIteratorFactory)
Method Detail

contains

public boolean contains(SubjectNode subject,
                        PredicateNode predicate,
                        ObjectNode object)
Specified by:
contains in interface ReadableGraph

find

public ClosableIterator<Triple> find(SubjectNode subject,
                                     PredicateNode predicate,
                                     ObjectNode object)
Specified by:
find in interface ReadableGraph

getSize

public long getSize()
Specified by:
getSize in interface ReadableGraph

findUniquePredicates

public ClosableIterator<PredicateNode> findUniquePredicates(Resource resource)
                                                     throws GraphException
Specified by:
findUniquePredicates in interface ReadableGraph
Throws:
GraphException

findUniquePredicates

public ClosableIterator<PredicateNode> findUniquePredicates()
Specified by:
findUniquePredicates in interface ReadableGraph

localizeAndAdd

public void localizeAndAdd(SubjectNode subject,
                           PredicateNode predicate,
                           ObjectNode object)
                    throws GraphException
Specified by:
localizeAndAdd in interface WritableGraph
Throws:
GraphException

localizeAndRemove

public void localizeAndRemove(SubjectNode subject,
                              PredicateNode predicate,
                              ObjectNode object)
                       throws GraphException
Specified by:
localizeAndRemove in interface WritableGraph
Throws:
GraphException

removeIterator

public void removeIterator(Iterator<Triple> triples)
                    throws GraphException
Specified by:
removeIterator in interface WritableGraph
Throws:
GraphException

clear

public void clear()
Specified by:
clear in interface WritableGraph