org.openrdf.sesame.sailimpl.nativerdf.model
Interface NativeValue

All Superinterfaces:
Comparable, Serializable, Value
All Known Subinterfaces:
NativeResource
All Known Implementing Classes:
NativeBNode, NativeLiteral, NativeURI

public interface NativeValue
extends Value


Method Summary
 int getInternalId()
          Gets the ID that is used in the native RDF repository for this Value.
 NativeRdfRepository getRepository()
          Returns the NativeRdfRepository that contains this NativeValue.
 ValueStoreRevision getValueStoreRevision()
          Gets the revision of the value store that created this value.
 void setInternalId(int id, ValueStoreRevision revision)
          Sets the ID that is used for this value in a specific revision of the value store.
 
Methods inherited from interface org.openrdf.model.Value
getObjectStatements
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getRepository

public NativeRdfRepository getRepository()
Returns the NativeRdfRepository that contains this NativeValue. IDs are only unique within a single repository, but an application could use several repositories at the same time, passing NativeValue objects generated by one Sail to another Sail. In such situations, the ID of the first Sail cannot be used by the second Sail. Hence, the NativeRdfRepository should verify that it is the 'owner' of a value before using the recorded internal ID.


setInternalId

public void setInternalId(int id,
                          ValueStoreRevision revision)
Sets the ID that is used for this value in a specific revision of the value store.


getInternalId

public int getInternalId()
Gets the ID that is used in the native RDF repository for this Value.

Returns:
The value's ID, or 0 if not yet set.

getValueStoreRevision

public ValueStoreRevision getValueStoreRevision()
Gets the revision of the value store that created this value. The value's internal ID is only valid when it's value store revision is equal to the value store's current revision.

Returns:
The revision of the value store that created this value, or null if the internal ID has not yet been set.


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.