public class H4Group extends Group
CRT_ORDER_INDEXED, CRT_ORDER_TRACKED, LINK_TYPE_EXTERNAL, LINK_TYPE_HARD, LINK_TYPE_SOFT, nMembersInFile, parentfileFormat, linkTargetObjName, oid, separator| Constructor and Description |
|---|
H4Group(FileFormat theFile,
java.lang.String name,
java.lang.String path,
Group parent) |
H4Group(FileFormat theFile,
java.lang.String name,
java.lang.String path,
Group parent,
long[] oid)
Creates a group object with specific name, path, and parent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(int vgid)
close group access.
|
static H4Group |
create(java.lang.String name,
Group pgroup)
Creates a new group.
|
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 |
updateMetadata(java.lang.Object info)
Updates an existing metadata from this data object.
|
void |
writeMetadata(java.lang.Object info)
Writes a specific metadata (such as attribute) into file.
|
addToMemberList, clear, getMemberList, getNumberOfMembersInFile, getParent, isRoot, removeFromMemberList, setNamedebug, equalsOID, getFID, getFile, getFileFormat, getFullName, getLinkTargetObjName, getName, getOID, getPath, setLinkTargetObjName, setPath, toStringpublic H4Group(FileFormat theFile, java.lang.String name, java.lang.String path, Group parent)
public H4Group(FileFormat theFile, java.lang.String name, java.lang.String path, Group parent, long[] oid)
theFile - the HDF file.name - the name of this group.path - the full path of this group.parent - the parent of this group.oid - the unique identifier of this data object.public boolean hasAttribute()
DataFormatpublic java.util.List getMetadata()
throws HDFException
DataFormatMetadata such as attributes are stored in a List.
HDFExceptionpublic void writeMetadata(java.lang.Object info)
throws java.lang.Exception
DataFormatIf 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.Exceptionpublic void removeMetadata(java.lang.Object info)
throws HDFException
DataFormatinfo - the metadata to delete.HDFExceptionpublic void updateMetadata(java.lang.Object info)
throws java.lang.Exception
DataFormatinfo - the metadata to update.java.lang.Exceptionpublic int open()
HObjectopen in class HObjectHObject.close(int)public void close(int vgid)
public static H4Group create(java.lang.String name, Group pgroup) throws java.lang.Exception
name - the name of the group to create.pgroup - the parent group of the new group.java.lang.Exceptionpublic java.util.List getMetadata(int... attrPropList)
throws java.lang.Exception
java.lang.Exception