org.openrdf.sail.memory
Class MemoryStoreConnection.MemTripleSource

java.lang.Object
  extended by org.openrdf.sail.memory.MemoryStoreConnection.MemTripleSource
All Implemented Interfaces:
TripleSource
Enclosing class:
MemoryStoreConnection

protected class MemoryStoreConnection.MemTripleSource
extends Object
implements TripleSource

Implementation of the TripleSource interface from the Sail Query Model


Field Summary
protected  boolean includeInferred
           
protected  ReadMode readMode
           
protected  int snapshot
           
 
Constructor Summary
MemoryStoreConnection.MemTripleSource(boolean includeInferred, int snapshot, ReadMode readMode)
           
 
Method Summary
 CloseableIteration<MemStatement,QueryEvaluationException> getStatements(Resource subj, URI pred, Value obj, Resource... contexts)
          Gets all statements that have a specific subject, predicate and/or object.
 MemValueFactory getValueFactory()
          Gets a ValueFactory object that can be used to create URI-, blank node- and literal objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

snapshot

protected final int snapshot

readMode

protected final ReadMode readMode

includeInferred

protected final boolean includeInferred
Constructor Detail

MemoryStoreConnection.MemTripleSource

public MemoryStoreConnection.MemTripleSource(boolean includeInferred,
                                             int snapshot,
                                             ReadMode readMode)
Method Detail

getStatements

public CloseableIteration<MemStatement,QueryEvaluationException> getStatements(Resource subj,
                                                                               URI pred,
                                                                               Value obj,
                                                                               Resource... contexts)
Description copied from interface: TripleSource
Gets all statements that have a specific subject, predicate and/or object. All three parameters may be null to indicate wildcards. Optionally a (set of) context(s) may be specified in which case the result will be restricted to statements matching one or more of the specified contexts.

Specified by:
getStatements in interface TripleSource
Parameters:
subj - A Resource specifying the subject, or null for a wildcard.
pred - A URI specifying the predicate, or null for a wildcard.
obj - A Value specifying the object, or null for a wildcard.
contexts - The context(s) to get the statements from. Note that this parameter is a vararg and as such is optional. If no contexts are supplied the method operates on the entire repository.
Returns:
An iterator over the relevant statements.

getValueFactory

public MemValueFactory getValueFactory()
Description copied from interface: TripleSource
Gets a ValueFactory object that can be used to create URI-, blank node- and literal objects.

Specified by:
getValueFactory in interface TripleSource
Returns:
a ValueFactory object for this TripleSource.


Copyright © 2001-2008 Aduna. All Rights Reserved.