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

Field Summary
protected  boolean available
           
protected  long createTime
           
protected  java.lang.String description
           
protected  java.lang.Object toolInfo
           
 
Fields inherited from class org.iges.anagram.Handle
completeName, synch
 
Constructor Summary
DataHandle(java.lang.String completeName, java.lang.String description, java.lang.Object toolInfo, long createTime)
          Creates a new DataHandle
 
Method Summary
 long getCreateTime()
           
 java.lang.String getDescription()
           
 java.lang.Object getToolInfo()
           
 boolean isAvailable()
           
 void setAvailable(boolean available)
          Set the availability of this dataset.
 void setDescription(java.lang.String description)
          Changes the description of this data object.
 void setToolInfo(java.lang.Object toolInfo)
          Changes the tool info object.
 
Methods inherited from class org.iges.anagram.Handle
getCompleteName, getName, getSynch, toString, validateName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

available

protected boolean available

toolInfo

protected java.lang.Object toolInfo

description

protected java.lang.String description

createTime

protected long createTime
Constructor Detail

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 catalogs
toolInfo - 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.
Method Detail

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.