public class TupleIterator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TupleIterator.RetrieveMode |
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_arity |
protected DataStore |
m_dataStore |
protected Dictionary |
m_dictionary |
protected GroundTerm[] |
m_groundTerms |
protected boolean |
m_groundTermsRetrieved |
protected java.nio.LongBuffer |
m_multiplicities |
protected long |
m_multiplicitiesPtr |
protected java.nio.IntBuffer |
m_resourceIDsBuffer |
protected long |
m_resourceIDsBufferPtr |
protected Resource[] |
m_resources |
protected boolean |
m_resourcesRetrieved |
protected TupleIterator.RetrieveMode |
m_retrieveMode |
protected long |
m_tupleIteratorPtr |
protected int |
m_windowSize |
| Modifier | Constructor and Description |
|---|---|
protected |
TupleIterator(DataStore dataStore,
java.lang.String queryText,
Prefixes prefixes,
Parameters parameters,
TripleStatus tripleStatusMask,
TripleStatus expectedValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes of the iterator.
|
protected void |
ensureValidState() |
void |
finalize() |
int |
getArity()
Gets the arity of the tuple iterator.
|
GroundTerm |
getGroundTerm(int termIndex)
Returns the ground term by for the given termIndex.
|
long |
getMultiplicity()
Gets the multiplicity of the current tuple.
|
long |
getNext()
Advances the iterator (i.e.
|
Resource |
getResource(int termIndex)
Returns the raw ground term for the given termIndex.
|
int |
getResourceID(int termIndex)
Returns the resource id for the given termIndex.
|
boolean |
isValid()
Determines whether the iterator is in a valid state: i.e.
|
protected long |
nCompileQuery(long dataStorePtr,
java.lang.String queryText,
java.lang.String[] prefixes,
boolean useBushy,
boolean useDistinct,
boolean exactCardinality,
boolean allAnswersInRoot,
boolean expandEquality,
int tripleStatus,
int expectedValue,
int[] arity) |
protected void |
nDispose(long tupleIteartorPtr) |
protected int |
nGetNext(long tupleIteratorPtr,
int windowSize,
long resourceIDsPtr,
long multiplicitiesPtr) |
protected void |
nInitialize(java.nio.IntBuffer resourceIDs,
java.nio.LongBuffer multiplicities,
long[] pointers) |
protected int |
nOpen(long tupleIteratorPtr,
int windowSize,
long resourceIDsPtr,
long multiplicitiesPtr) |
long |
open()
Opens the iterator, i.e.
|
protected volatile long m_tupleIteratorPtr
protected final DataStore m_dataStore
protected final Dictionary m_dictionary
protected final int m_windowSize
protected final int m_arity
protected final java.nio.IntBuffer m_resourceIDsBuffer
protected final java.nio.LongBuffer m_multiplicities
protected final long m_resourceIDsBufferPtr
protected final long m_multiplicitiesPtr
protected final Resource[] m_resources
protected final GroundTerm[] m_groundTerms
protected final TupleIterator.RetrieveMode m_retrieveMode
protected boolean m_groundTermsRetrieved
protected boolean m_resourcesRetrieved
protected TupleIterator(DataStore dataStore, java.lang.String queryText, Prefixes prefixes, Parameters parameters, TripleStatus tripleStatusMask, TripleStatus expectedValue) throws JRDFStoreException
JRDFStoreExceptionprotected long nCompileQuery(long dataStorePtr,
java.lang.String queryText,
java.lang.String[] prefixes,
boolean useBushy,
boolean useDistinct,
boolean exactCardinality,
boolean allAnswersInRoot,
boolean expandEquality,
int tripleStatus,
int expectedValue,
int[] arity)
throws JRDFStoreException
JRDFStoreExceptionprotected void nInitialize(java.nio.IntBuffer resourceIDs,
java.nio.LongBuffer multiplicities,
long[] pointers)
protected int nOpen(long tupleIteratorPtr,
int windowSize,
long resourceIDsPtr,
long multiplicitiesPtr)
throws JRDFStoreException
JRDFStoreExceptionprotected int nGetNext(long tupleIteratorPtr,
int windowSize,
long resourceIDsPtr,
long multiplicitiesPtr)
throws JRDFStoreException
JRDFStoreExceptionprotected void nDispose(long tupleIteartorPtr)
throws JRDFStoreException
JRDFStoreExceptionprotected void ensureValidState()
throws JRDFStoreException
JRDFStoreExceptionpublic int getArity()
throws JRDFStoreException
JRDFStoreException - thrown if the iterator is in invalid statepublic long getMultiplicity()
throws JRDFStoreException
JRDFStoreException - thrown if the iterator is in invalid statepublic boolean isValid()
throws JRDFStoreException
JRDFStoreException - thrown if the iterator is in invalid statepublic long open()
throws JRDFStoreException
JRDFStoreException - thrown if the iterator is in invalid statepublic long getNext()
throws JRDFStoreException
JRDFStoreException - thrown if the iterator is in invalid statepublic GroundTerm getGroundTerm(int termIndex) throws JRDFStoreException
termIndex - the index of the termJRDFStoreException - thrown if the iterator is in invalid statepublic Resource getResource(int termIndex) throws JRDFStoreException
termIndex - the index of the termJRDFStoreException - thrown if the iterator is in invalid statepublic int getResourceID(int termIndex)
throws JRDFStoreException
termIndex - the index of the termJRDFStoreException - thrown if the iterator is in invalid statepublic void dispose()
public void finalize()
finalize in class java.lang.Object