ncsa.hdf.object
Interface DataFormat

All Known Implementing Classes:
HObject

public interface DataFormat

An interface provides general I/O operations for read/write information about the object. such as read data content or data attribute into memory, write data content or data attribute into file.

See Also:
HObject

Method Summary
 java.lang.String getFile()
          Returns the full path of the file that contains this data object.
 java.util.List getMetadata()
          Loads the metadata such as attributes and type of the the data object into memory if the metadata is not loaded.
 void removeMetadata(java.lang.Object info)
          Deletes an existing metadata from this data object.
 void writeMetadata(java.lang.Object info)
          Saves a specific metadata into file.
 

Method Detail

getFile

public java.lang.String getFile()
Returns the full path of the file that contains this data object. The file name is necessary because the file of this data object is uniquely identified when mutilple files are opened by an application at the same time.


getMetadata

public java.util.List getMetadata()
                           throws java.lang.Exception
Loads the metadata such as attributes and type of the the data object into memory if the metadata is not loaded. If the metadata is loaded, it returns the metadata. The metadata is stored as a collection of metadata ojbects in a List.

Returns:
the list of metadata objects.
Throws:
java.lang.Exception
See Also:
List

writeMetadata

public void writeMetadata(java.lang.Object info)
                   throws java.lang.Exception
Saves a specific metadata into file. If the metadata exists, it updates its value. If the metadata does not exists, it creates and attach the new metadata to the object and saves it into file.

Parameters:
info - the specific metadata.
Throws:
java.lang.Exception

removeMetadata

public void removeMetadata(java.lang.Object info)
                    throws java.lang.Exception
Deletes an existing metadata from this data object.

Parameters:
info - the metadata to delete.
Throws:
java.lang.Exception