org.iges.anagram
Class DataHandle
java.lang.Object
|
+--org.iges.anagram.Handle
|
+--org.iges.anagram.DataHandle
- All Implemented Interfaces:
- java.io.Serializable
- public class DataHandle
- extends Handle
An entry in the catalog representing a data object being served
by the server
- See Also:
- Serialized Form
Constructor Summary |
DataHandle(java.lang.String completeName,
java.lang.String description,
java.lang.Object toolInfo,
long createTime)
Creates a new DataHandle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
available
protected boolean available
toolInfo
protected java.lang.Object toolInfo
description
protected java.lang.String description
createTime
protected long createTime
DataHandle
public DataHandle(java.lang.String completeName,
java.lang.String description,
java.lang.Object toolInfo,
long createTime)
throws AnagramException
- Creates a new DataHandle
- Parameters:
completeName
- The complete name of this entry, starting
with "/"description
- A concise description of this data object, to be
used in directory listings and catalogstoolInfo
- An object containing information needed
by the Tool module to access this data. The class of this
object up to the writer of the particular Anagram implementation.
However, it should implement the Serializable
interface if possible. A non-Serializable toolInfo object will
prevent the catalog from saving its entries to disk, thus
forcing the server to re-import all data objects each time it
is started.createTime
- The official creation time for this dataset.
isAvailable
public boolean isAvailable()
- Returns:
- True if the data is currently in a usable state.
getDescription
public java.lang.String getDescription()
- Returns:
- A concise description of this data object
setDescription
public void setDescription(java.lang.String description)
- Changes the description of this data object. This
method should not be called without first obtaining
an exclusive lock on this data handle.
getToolInfo
public java.lang.Object getToolInfo()
- Returns:
- The object containing information needed
by the Tool module to access this data.
The class of this Object is determined by the Tool.
setToolInfo
public void setToolInfo(java.lang.Object toolInfo)
- Changes the tool info object. This
method should not be called without first obtaining
an exclusive lock on this data handle.
getCreateTime
public long getCreateTime()
- Returns:
- The time that this dataset was last modified.
This time will be updated every time the setDescription() or
setToolInfo() methods are called.
setAvailable
public void setAvailable(boolean available)
- Set the availability of this dataset. The server will
only attempt to access datasets that are flagged as
available. This
method should not be called without first obtaining
an exclusive lock on this data handle.