public class Dictionary
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
Dictionary.JNIToken |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_cacheGroundTerms |
protected boolean |
m_cacheResources |
protected DataStore |
m_dataStore |
protected long |
m_dictionaryPtr |
protected Cache<GroundTerm> |
m_groundTermCache |
protected Cache<Resource> |
m_resourceCache |
protected java.lang.ThreadLocal<Dictionary.JNIToken> |
s_jniToken |
| Constructor and Description |
|---|
Dictionary(DataStore dataStore,
long dictionaryPtr,
boolean cacheResources,
boolean cacheGroundTerms) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureValidState() |
protected GroundTerm |
getGroundTerm(java.lang.String lexicalForm,
Datatype datatype) |
void |
getGroundTerms(int[] resourceIDs,
int firstResourceIndex,
int afterLastResourceIndex,
GroundTerm[] groundTerms) |
void |
getGroundTerms(java.nio.IntBuffer resourceIDsBuffer,
long resourceIDsPtr,
int firstResourceIndex,
int afterLastResourceIndex,
GroundTerm[] groundTerms) |
protected java.lang.String |
getLexicalFormUsingByteArray(Dictionary.JNIToken jniToken) |
Resource |
getResource(int resourceID) |
void |
getResources(int[] resourceIDs,
int firstResourceIndex,
int afterLastResourceIndex,
Resource[] resources) |
protected void |
getResources(java.nio.IntBuffer resourceIDsBuffer,
long resourceIDsPtr,
int firstResourceIndex,
int afterLastResourceIndex,
boolean exportAsResources,
Resource[] resources,
GroundTerm[] groundTerms) |
void |
getResources(java.nio.IntBuffer resourceIDsBuffer,
long resourceIDsPtr,
int firstResourceIndex,
int afterLastResourceIndex,
Resource[] resources) |
void |
initialize() |
protected long |
nGetBufferPtr(java.nio.ByteBuffer buffer) |
protected int |
nGetMaxResourceID(long dictionaryPtr) |
protected int |
nGetResources(long dictionaryPtr,
long resourceIDsPtr,
int position,
int limit,
long maskPtr,
long stringByteBufferPtr,
int stringByteBufferLength,
long stringLengthsBufferPtr,
long datatypeIDsBufferPtr) |
protected void |
nResolveResources(long dictionaryPtr,
int[] resourceIDs,
java.lang.String[] lexicalForms,
int[] datatypes) |
int[] |
resolveResources(java.lang.String[] lexicalForms,
int[] datatypeIDs)
Resolves the specified ground terms.
|
protected final java.lang.ThreadLocal<Dictionary.JNIToken> s_jniToken
protected final long m_dictionaryPtr
protected final DataStore m_dataStore
protected final boolean m_cacheResources
protected final boolean m_cacheGroundTerms
protected final Cache<GroundTerm> m_groundTermCache
public Dictionary(DataStore dataStore, long dictionaryPtr, boolean cacheResources, boolean cacheGroundTerms)
protected long nGetBufferPtr(java.nio.ByteBuffer buffer)
protected int nGetMaxResourceID(long dictionaryPtr)
protected int nGetResources(long dictionaryPtr,
long resourceIDsPtr,
int position,
int limit,
long maskPtr,
long stringByteBufferPtr,
int stringByteBufferLength,
long stringLengthsBufferPtr,
long datatypeIDsBufferPtr)
throws JRDFStoreException
JRDFStoreExceptionprotected void nResolveResources(long dictionaryPtr,
int[] resourceIDs,
java.lang.String[] lexicalForms,
int[] datatypes)
throws JRDFStoreException
JRDFStoreExceptionprotected void ensureValidState()
throws JRDFStoreException
JRDFStoreExceptionpublic void initialize()
protected GroundTerm getGroundTerm(java.lang.String lexicalForm, Datatype datatype)
protected void getResources(java.nio.IntBuffer resourceIDsBuffer,
long resourceIDsPtr,
int firstResourceIndex,
int afterLastResourceIndex,
boolean exportAsResources,
Resource[] resources,
GroundTerm[] groundTerms)
throws JRDFStoreException
JRDFStoreExceptionprotected java.lang.String getLexicalFormUsingByteArray(Dictionary.JNIToken jniToken)
public Resource getResource(int resourceID) throws JRDFStoreException
JRDFStoreExceptionpublic void getResources(int[] resourceIDs,
int firstResourceIndex,
int afterLastResourceIndex,
Resource[] resources)
throws JRDFStoreException
JRDFStoreExceptionpublic void getResources(java.nio.IntBuffer resourceIDsBuffer,
long resourceIDsPtr,
int firstResourceIndex,
int afterLastResourceIndex,
Resource[] resources)
throws JRDFStoreException
JRDFStoreExceptionpublic void getGroundTerms(int[] resourceIDs,
int firstResourceIndex,
int afterLastResourceIndex,
GroundTerm[] groundTerms)
throws JRDFStoreException
JRDFStoreExceptionpublic void getGroundTerms(java.nio.IntBuffer resourceIDsBuffer,
long resourceIDsPtr,
int firstResourceIndex,
int afterLastResourceIndex,
GroundTerm[] groundTerms)
throws JRDFStoreException
JRDFStoreExceptionpublic int[] resolveResources(java.lang.String[] lexicalForms,
int[] datatypeIDs)
throws JRDFStoreException
lexicalForms - the lexical forms of the resourcesdatatypeIDs - the data type IDs of the resourcesJRDFStoreException - thrown if there is an error