|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectncsa.hdf.object.HObject
ncsa.hdf.object.h5.H5Link
public class H5Link
An H5Link object represents an existing HDF5 object in file.
H5Link object is an HDF5 object that is either a soft or an external link to an object in a file that does not exist. The type of the object is unknown. Once the object being linked to is created, and the type is known, then H5link object will change its type.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Fields inherited from class ncsa.hdf.object.HObject |
---|
separator |
Constructor Summary | |
---|---|
H5Link(FileFormat theFile,
java.lang.String name,
java.lang.String path)
Constructs an HDF5 link with specific name, path, and parent. |
|
H5Link(FileFormat theFile,
java.lang.String theName,
java.lang.String thePath,
long[] oid)
|
Method Summary | |
---|---|
void |
close(int id)
Closes access to the object. |
java.util.List |
getMetadata()
Retrieves the metadata such as attributes from file. |
java.util.List |
getMetadata(int... attrPropList)
|
boolean |
hasAttribute()
Check if the object has any attributes attached. |
int |
open()
Opens an existing object such as dataset or group for access. |
void |
removeMetadata(java.lang.Object info)
Deletes an existing metadata from this data object. |
void |
writeMetadata(java.lang.Object info)
Writes a specific metadata (such as attribute) into file. |
Methods inherited from class ncsa.hdf.object.HObject |
---|
equalsOID, getFID, getFile, getFileFormat, getFullName, getLinkTargetObjName, getName, getOID, getPath, setLinkTargetObjName, setName, setPath, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
HObject.serialVersionUID
,
Constant Field ValuesConstructor Detail |
---|
public H5Link(FileFormat theFile, java.lang.String name, java.lang.String path)
theFile
- the file which containing the link.name
- the name of this link, e.g. "link1".path
- the full path of this link, e.g. "/groups/".public H5Link(FileFormat theFile, java.lang.String theName, java.lang.String thePath, long[] oid)
Method Detail |
---|
public void close(int id)
HObject
Sub-classes must implement this interface because different data objects have their own ways of how the data resources are closed.
For example, H5Group.close() calls the ncsa.hdf.hdf5lib.H5.H5Gclose() method and closes the group resource specified by the group id.
close
in class HObject
id
- The object identifier.public int open()
HObject
open
in class HObject
HObject.close(int)
public java.util.List getMetadata() throws java.lang.Exception
DataFormat
Metadata such as attributes are stored in a List.
java.lang.Exception
public boolean hasAttribute()
DataFormat
public void removeMetadata(java.lang.Object info) throws java.lang.Exception
DataFormat
info
- the metadata to delete.
java.lang.Exception
public void writeMetadata(java.lang.Object info) throws java.lang.Exception
DataFormat
If an HDF(4&5) attribute exists in file, the method updates its value. If the attribute does not exists in file, it creates the attribute in file and attaches it to the object. It will fail to write a new attribute to the object where an attribute with the same name already exists. To update the value of an existing attribute in file, one needs to get the instance of the attribute by getMetadata(), change its values, and use writeMetadata() to write the value.
info
- the metadata to write.
java.lang.Exception
public java.util.List getMetadata(int... attrPropList) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |