ncsa.hdf.object
Class Group

java.lang.Object
  extended byncsa.hdf.object.HObject
      extended byncsa.hdf.object.Group
All Implemented Interfaces:
DataFormat, java.io.Serializable
Direct Known Subclasses:
H4Group, H5Group

public abstract class Group
extends HObject

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 operation on groups for both HDF4 and HDF5.

Members of a group may include other groups, datasets or links.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ncsa.hdf.object.HObject
hasAttribute, oid, separator
 
Constructor Summary
Group(FileFormat fileFormat, java.lang.String name, java.lang.String path, Group parent)
           
Group(FileFormat fileFormat, java.lang.String name, java.lang.String path, Group parent, long[] oid)
          Creates a group object with specific name, path, and parent.
 
Method Summary
 void addToMemberList(HObject object)
          Adds an HObject to the member list of this group.
 java.util.List getMemberList()
          Returns the list of members of this group.
 int getNumberOfMembersInFile()
           
 Group getParent()
          Returns the parent group.
 boolean isRoot()
          Checks if it is a root group.
 void removeFromMemberList(HObject object)
          Removes an HObject from the member list of this group.
 void setNumberOfMembersInFile(int n)
          sets total number of members of this group in file.
 
Methods inherited from class ncsa.hdf.object.HObject
close, equalsOID, getFID, getFile, getFileFormat, getName, getOID, getPath, hasAttribute, open, setName, setPath, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ncsa.hdf.object.DataFormat
getMetadata, removeMetadata, writeMetadata
 

Constructor Detail

Group

public Group(FileFormat fileFormat,
             java.lang.String name,
             java.lang.String path,
             Group parent)

Group

public Group(FileFormat fileFormat,
             java.lang.String name,
             java.lang.String path,
             Group parent,
             long[] oid)
Creates a group object with specific name, path, and parent.

Parameters:
fileFormat - the file which containing the group.
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.
Method Detail

addToMemberList

public void addToMemberList(HObject object)
Adds an HObject to the member list of this group.

Parameters:
object - the HObject to be added to the member list.

removeFromMemberList

public void removeFromMemberList(HObject object)
Removes an HObject from the member list of this group.

Parameters:
object - the HObject to be removed from the member list.

getMemberList

public java.util.List getMemberList()
Returns the list of members of this group.


isRoot

public final boolean isRoot()
Checks if it is a root group.


getParent

public final Group getParent()
Returns the parent group.


getNumberOfMembersInFile

public int getNumberOfMembersInFile()
Returns:
total number of members of this group in file.

setNumberOfMembersInFile

public void setNumberOfMembersInFile(int n)
sets total number of members of this group in file.

Parameters:
n - total number of members of this group in file.