| java.lang.Object org.openrdf.model.impl.ValueFactoryBase org.openrdf.sail.nativerdf.ValueStore
ValueStore | public class ValueStore extends ValueFactoryBase (Code) | | File-based indexed storage and retrieval of RDF values. ValueStore maps RDF
values to integer IDs and vice-versa.
author: Arjohn Kampman |
Method Summary | |
public void | clear() Removes all values from the ValueStore. | public void | close() Closes the ValueStore, releasing any file references, etc. | public NativeBNode | createBNode(String nodeID) | public NativeLiteral | createLiteral(String value) | public NativeLiteral | createLiteral(String value, String language) | public NativeLiteral | createLiteral(String value, URI datatype) | public Statement | createStatement(Resource subject, URI predicate, Value object) | public Statement | createStatement(Resource subject, URI predicate, Value object, Resource context) | public NativeURI | createURI(String uri) | public NativeURI | createURI(String namespace, String localName) | public int | getID(Value value) Gets the ID for the specified value.
Parameters: value - A value. | public NativeBNode | getNativeBNode(BNode bnode) Creates a NativeBNode that is equal to the supplied bnode. | public NativeLiteral | getNativeLiteral(Literal l) Creates an NativeLiteral that is equal to the supplied literal. | public NativeResource | getNativeResource(Resource resource) | public NativeURI | getNativeURI(URI uri) Creates a NativeURI that is equal to the supplied URI. | public NativeValue | getNativeValue(Value value) | public Lock | getReadLock() Gets a read lock on this value store that can be used to prevent values
from being removed while the lock is active. | public ValueStoreRevision | getRevision() | public NativeValue | getValue(int id) Gets the value for the specified ID.
Parameters: id - A value ID. | public static void | main(String[] args) | public int | storeValue(Value value) Stores the supplied value and returns the ID that has been assigned to it.
In case the value was already present, the value will not be stored again
and the ID of the existing value is returned.
Parameters: value - The Value to store. | public void | sync() Synchronizes any changes that are cached in memory to disk. |
clear | public void clear() throws IOException(Code) | | Removes all values from the ValueStore.
exception: IOException - If an I/O error occurred. |
close | public void close() throws IOException(Code) | | Closes the ValueStore, releasing any file references, etc. Once closed,
the ValueStore can no longer be used.
exception: IOException - If an I/O error occurred. |
getNativeBNode | public NativeBNode getNativeBNode(BNode bnode)(Code) | | Creates a NativeBNode that is equal to the supplied bnode. This method
returns the supplied bnode itself if it is already a NativeBNode that has
been created by this ValueStore, which prevents unnecessary object
creations.
A NativeBNode for the specified bnode. |
getNativeLiteral | public NativeLiteral getNativeLiteral(Literal l)(Code) | | Creates an NativeLiteral that is equal to the supplied literal. This
method returns the supplied literal itself if it is already a
NativeLiteral that has been created by this ValueStore, which prevents
unnecessary object creations.
A NativeLiteral for the specified literal. |
getNativeURI | public NativeURI getNativeURI(URI uri)(Code) | | Creates a NativeURI that is equal to the supplied URI. This method returns
the supplied URI itself if it is already a NativeURI that has been created
by this ValueStore, which prevents unnecessary object creations.
A NativeURI for the specified URI. |
getReadLock | public Lock getReadLock() throws InterruptedException(Code) | | Gets a read lock on this value store that can be used to prevent values
from being removed while the lock is active.
|
getValue | public NativeValue getValue(int id) throws IOException(Code) | | Gets the value for the specified ID.
Parameters: id - A value ID. The value for the ID, or null no such value could befound. exception: IOException - If an I/O error occurred. |
storeValue | public int storeValue(Value value) throws IOException(Code) | | Stores the supplied value and returns the ID that has been assigned to it.
In case the value was already present, the value will not be stored again
and the ID of the existing value is returned.
Parameters: value - The Value to store. The ID that has been assigned to the value. exception: IOException - If an I/O error occurred. |
sync | public void sync() throws IOException(Code) | | Synchronizes any changes that are cached in memory to disk.
exception: IOException - If an I/O error occurred. |
|
|