Package be.uclouvain.orthanc
Class KeysValuesIterator
- java.lang.Object
-
- be.uclouvain.orthanc.KeysValuesIterator
-
public class KeysValuesIterator extends java.lang.Object
Iterator over the keys and values of a key-value store
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
KeysValuesIterator(long self)
Construct a Java object wrapping a C object that is managed by Orthanc.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeysValuesIterator
createKeysValuesIterator(java.lang.String storeId)
Create an iterator over the key-value pairs of a key-value store in the Orthanc database.void
dispose()
Manually deallocate the C object that is associated with this Java wrapper.protected void
finalize()
java.lang.String
getKey()
Get the current key of an iterator over a key-value store.protected long
getSelf()
Return the C object that is associated with this Java wrapper.byte[]
getValue()
Get the current value of an iterator over a key-value store.boolean
next()
Advance to the next element in the iterator.
-
-
-
Method Detail
-
getSelf
protected long getSelf()
Return the C object that is associated with this Java wrapper.- Returns:
- Pointer to the C object.
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
dispose
public void dispose()
Manually deallocate the C object that is associated with this Java wrapper. This method can be used to immediately deallocate the C object, instead of waiting for the garbage collector to dispose the Java wrapper.
-
createKeysValuesIterator
public static KeysValuesIterator createKeysValuesIterator(java.lang.String storeId)
Create an iterator over the key-value pairs of a key-value store in the Orthanc database. The iterator loops over the keys according to the lexicographical order.- Parameters:
storeId
- A unique identifier identifying both the plugin and the key-value store.- Returns:
- The newly constructed object.
-
getKey
public java.lang.String getKey()
Get the current key of an iterator over a key-value store. Before using this function, the function OrthancPluginKeysValuesIteratorNext() must have been called at least once.- Returns:
- The resulting string.
-
getValue
public byte[] getValue()
Get the current value of an iterator over a key-value store. Before using this function, the function OrthancPluginKeysValuesIteratorNext() must have been called at least once.- Returns:
- The resulting memory buffer.
-
next
public boolean next()
Advance to the next element in the iterator.- Returns:
- Whether the iterator is done.
-
-