public class H5Link extends HObject
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.
fileFormat, linkTargetObjName, oid, separator
Constructor and Description |
---|
H5Link(FileFormat theFile,
String name,
String path)
Constructs an HDF5 link with specific name, path, and parent.
|
H5Link(FileFormat theFile,
String theName,
String thePath,
long[] oid) |
Modifier and Type | Method and Description |
---|---|
void |
close(int id)
Closes access to the object.
|
List |
getMetadata()
Retrieves the metadata such as attributes from file.
|
List |
getMetadata(int... attrPropList) |
boolean |
hasAttribute()
Check if the object has any attributes attached.
|
int |
open()
Opens an existing object such as a dataset or group for access.
|
void |
removeMetadata(Object info)
Deletes an existing metadata from this data object.
|
void |
setName(String newName)
Sets the name of the object.
|
void |
updateMetadata(Object info)
Updates an existing metadata from this data object.
|
void |
writeMetadata(Object info)
Writes a specific metadata (such as attribute) into file.
|
debug, equals, equalsOID, getFID, getFile, getFileFormat, getFullName, getLinkTargetObjName, getName, getOID, getPath, setLinkTargetObjName, setPath, toString
public H5Link(FileFormat theFile, String name, 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, String theName, String thePath, long[] oid)
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 hdf.hdf5lib.H5.H5Gclose() method and closes the group resource specified by the group id.
public int open()
HObject
open
in class HObject
HObject.close(int)
public List getMetadata() throws Exception
DataFormat
Metadata such as attributes are stored in a List.
Exception
- if the metadata can not be retrievedpublic boolean hasAttribute()
DataFormat
public void removeMetadata(Object info) throws Exception
DataFormat
info
- the metadata to delete.Exception
- if the metadata can not be removedpublic void writeMetadata(Object info) throws Exception
DataFormat
info
- the metadata to write.Exception
- if the metadata can not be writtenpublic void updateMetadata(Object info) throws Exception
DataFormat
info
- the metadata to update.Exception
- if the metadata can not be updatedpublic List getMetadata(int... attrPropList) throws Exception
Exception
Copyright © 2017. All Rights Reserved.