|
||||||||||
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.Group
public abstract class Group
Group is an abstract class. Current implementing classes are the H4Group and H5Group. This class includes general information of a group object such as members of a group and common operations on groups.
Members of a group may include other groups, datasets or links.
Field Summary | |
---|---|
static int |
CRT_ORDER_INDEXED
|
static int |
CRT_ORDER_TRACKED
|
static int |
LINK_TYPE_EXTERNAL
|
static int |
LINK_TYPE_HARD
|
static int |
LINK_TYPE_SOFT
|
Fields inherited from class ncsa.hdf.object.HObject |
---|
separator |
Constructor Summary | |
---|---|
Group(FileFormat theFile,
java.lang.String name,
java.lang.String path,
Group parent)
Constructs an instance of the group with specific name, path and parent group. |
|
Group(FileFormat theFile,
java.lang.String name,
java.lang.String path,
Group parent,
long[] oid)
Deprecated. Not for public use in the future. Using Group(FileFormat, String, String, Group) |
Method Summary | |
---|---|
void |
addToMemberList(HObject object)
Adds an object to the member list of this group in memory. |
void |
clear()
Clears up member list and other resources in memory for the group. |
java.util.List<HObject> |
getMemberList()
Returns the list of members of this group. |
int |
getNumberOfMembersInFile()
Returns the total number of members of this group in file. |
Group |
getParent()
Returns the parent group. |
boolean |
isRoot()
Checks if it is a root group. |
void |
removeFromMemberList(HObject object)
Removes an object from the member list of this group in memory. |
void |
setName(java.lang.String newName)
Sets the name of the group. |
Methods inherited from class ncsa.hdf.object.HObject |
---|
close, equalsOID, getFID, getFile, getFileFormat, getFullName, getLinkTargetObjName, getName, getOID, getPath, open, setLinkTargetObjName, setPath, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ncsa.hdf.object.DataFormat |
---|
getMetadata, hasAttribute, removeMetadata, writeMetadata |
Field Detail |
---|
public static final int LINK_TYPE_HARD
public static final int LINK_TYPE_SOFT
public static final int LINK_TYPE_EXTERNAL
public static final int CRT_ORDER_TRACKED
public static final int CRT_ORDER_INDEXED
Constructor Detail |
---|
public Group(FileFormat theFile, java.lang.String name, java.lang.String path, Group parent)
For example, in H5Group(h5file, "grp", "/groups/", pgroup), "grp" is the name of the group, "/groups/" is the group path of the group, and pgroup the group where "grp" is located.
theFile
- the file which containing the group.name
- the name of this group, e.g. "grp01".path
- the full path of this group, e.g. "/groups/".parent
- the parent of this group.@Deprecated public Group(FileFormat theFile, java.lang.String name, java.lang.String path, Group parent, long[] oid)
Group(FileFormat, String, String, Group)
Method Detail |
---|
public void clear()
public void addToMemberList(HObject object)
object
- the HObject (Group or Dataset) to be added to the member list.public void removeFromMemberList(HObject object)
object
- the HObject (Group or Dataset) to be removed from the member
list.public java.util.List<HObject> getMemberList()
public void setName(java.lang.String newName) throws java.lang.Exception
setName (String newName) changes the name of the group in memory and file.
setName() updates the path in memory for all the objects that are under the group with the new name.
setName
in class HObject
newName
- The new name of the group.
java.lang.Exception
public final Group getParent()
public final boolean isRoot()
public int getNumberOfMembersInFile()
getNumberOfMembersInFile() returns the number of objects in this group. The number of objects in memory is obtained by getMemberList().size().
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |