|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectncsa.hdf.object.HObject
HObject is the base class for for all the data objects. Current implementing classes include HDF4 and HDF5 data objects. If a new FileFormat is added, the objects of the FileFormat should implementing HObject.
All the HDF4 and HDF5 data objects are inherited from HObject. At the top level of hierarchy, both HDF4 and HDF5 have the same super-classes such Group, and Dataset. At bottom level of hierarchy, HDF4 and HDF5 objects have their own implementation such H4Vdata, H4SDS, H4GRImage, H5ScalarDS, H5CompoundDS, and etc.
Warning: HDF4 and HDF5 may have multiple links to the same object. Data object in this model does not deal with multiple links. Users may create duplicate copies of the same data object with different path. Applications should check the OID of the data object to avoid duplicate copies of the same object.
HDF4 objects are uniquely identified by the (ref_id, tag_id) pairs. HDF5 objects uniquely identified by the reference identifier.
DataFormat
,
Serialized FormField Summary | |
protected boolean |
hasAttribute
|
protected long[] |
oid
array of long integer storing unique identifier for each HDF object. |
static java.lang.String |
separator
The path separator of HDF4 and HDF5 objects. |
Constructor Summary | |
HObject()
|
|
HObject(FileFormat theFileFormat,
java.lang.String theName,
java.lang.String thePath)
Constructs an instance of the data object with specific name and path. |
|
HObject(FileFormat theFileFormat,
java.lang.String theName,
java.lang.String thePath,
long[] oid)
Constructs an instance of the data object with specific name and path. |
Method Summary | |
abstract void |
close(int id)
Closes access to this object. |
boolean |
equalsOID(long[] theID)
Check if this object has the given object identifier. |
int |
getFID()
Returns the file identifier of this data object. |
java.lang.String |
getFile()
Returns the full path of the file that contains this data object. |
FileFormat |
getFileFormat()
Returns the fileformat which contains this object. |
java.lang.String |
getName()
Returns the name of this object. |
long[] |
getOID()
Returns a cloned copy of the object identifier. |
java.lang.String |
getPath()
Returns the full path of this object. |
boolean |
hasAttribute()
|
abstract int |
open()
Opens access to this object. |
void |
setName(java.lang.String newName)
Sets the name of the data object. |
void |
setPath(java.lang.String newPath)
Sets the path of the data object. |
java.lang.String |
toString()
Returns the string representation of this data object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ncsa.hdf.object.DataFormat |
getMetadata, removeMetadata, writeMetadata |
Field Detail |
public static final java.lang.String separator
protected final long[] oid
HDF4 objects are uniquely identified by the (tag_id, ref_id) pairs. HDF5 objects uniquely identified by the reference identifier.
protected boolean hasAttribute
Constructor Detail |
public HObject()
public HObject(FileFormat theFileFormat, java.lang.String theName, java.lang.String thePath)
public HObject(FileFormat theFileFormat, java.lang.String theName, java.lang.String thePath, long[] oid)
oid
- the unique identifier of this data object.Method Detail |
public final java.lang.String getFile()
DataFormat
getFile
in interface DataFormat
public final java.lang.String getName()
public final java.lang.String getPath()
public void setName(java.lang.String newName) throws java.lang.Exception
newName
- the new name of the object.
java.lang.Exception
public void setPath(java.lang.String newPath) throws java.lang.Exception
newPath
- the new path of the object.
java.lang.Exception
public abstract int open()
Sub-classes have to implement this interface so that different data objects have their own ways of how the data resources are opened.
public abstract void close(int id)
id
- the object identifier.
Sub-classes have to implement this interface so that different data
objects have their own ways of how the data resources are closed.public final int getFID()
public final boolean equalsOID(long[] theID)
HDF4 and HDF5 data objects are identified by their unique OIDs. A data object in file may have multiple pathes which are presented in the tree as separate objects. HObject.equalsOID(long[] theID) checks if two data objects int the tree point to the same object in the file.
public final FileFormat getFileFormat()
public final long[] getOID()
public java.lang.String toString()
public boolean hasAttribute()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |