visad.data.hdf5.hdf5objects
Class HDF5Group

java.lang.Object
  extended by visad.data.hdf5.hdf5objects.HDF5Object
      extended by visad.data.hdf5.hdf5objects.HDF5Group
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HDF5GroupAdapted

public class HDF5Group
extends HDF5Object

This class is a container for the parameters to the HDF5 Group Object.

HDF5 group is a grouping structure containing instances of zero or more groups or datasets, together with supporting metadata.

Working with groups and group members is similar in many ways to working with directories and files in UNIX. As with UNIX directories and files, objects in an HDF5 file are often described by giving their full (or absolute) path names

For details of the HDF5 libraries, see the HDF5 Documentation at: http://hdf.ncsa.uiuc.edu/HDF5/doc/

See Also:
Serialized Form

Field Summary
protected  Vector members
          members of the group
protected  HDF5Group parent
          the parent group
 
Fields inherited from class visad.data.hdf5.hdf5objects.HDF5Object
ATTRIBUTE, DATASET, DATASPACE, DATATYPE, description, GROUP, HDF5FILE, id, LINK, name, shortName, type, UNKNOWN
 
Constructor Summary
HDF5Group()
          Constructs an HDF5Group
HDF5Group(int loc_id, String name)
          Opens an existing HDF5 Group.
HDF5Group(int loc_id, String gname, int name_length)
          Creates a new HDF5 Group.
 
Method Summary
 void addMember(Object member)
          Adds a new member to the group.
 boolean contains(Object member)
          Tests if the specified object is a member of this group.
protected  void finalize()
          finalize() is called by the garbage collector on the object when garbage collection determines that there are no more references to the object.
 Object getMemberAt(int memberIndex)
          Returns the member at index memberIndex
 int getMemberCount()
          Returns the number of members the HDF5Group contains
 Vector getMembers()
          Returns the members of the group
 HDF5Group getParent()
          Returns the parent of the group
 boolean isEmpty()
          Returns true if the HDF5Group has no member
 boolean isRoot()
          Returns true if the HDF5Group is the root group
 boolean removeMember(Object member)
          Removes the member from this group
 void removeMemberAt(int index)
          Deletes the component at the specified index.
 void setParent(HDF5Group p)
          Sets the parent of this group
 String toString()
          Converts this object to a String representation.
 
Methods inherited from class visad.data.hdf5.hdf5objects.HDF5Object
getDescription, getID, getName, getShortName, getType, init, setID, setShortName, setType
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

members

protected Vector members
members of the group


parent

protected HDF5Group parent
the parent group

Constructor Detail

HDF5Group

public HDF5Group()
Constructs an HDF5Group


HDF5Group

public HDF5Group(int loc_id,
                 String gname,
                 int name_length)
Creates a new HDF5 Group.

Parameters:
loc_id - The file or group identifier.
gname - The absolute or relative name of the new group.
name_length - The maximum length of the name.

HDF5Group

public HDF5Group(int loc_id,
                 String name)
Opens an existing HDF5 Group.

Parameters:
loc_id - The file or group identifier..
name - The absolute or relative name of the new group..
Method Detail

setParent

public void setParent(HDF5Group p)
Sets the parent of this group

Parameters:
p - the parent of the HDF5Group

contains

public boolean contains(Object member)
Tests if the specified object is a member of this group.

Parameters:
member - a member
Returns:
true if the specified object is a member of the group; false otherwise.

addMember

public void addMember(Object member)
Adds a new member to the group.

Parameters:
member - the new member to be added to the group

removeMemberAt

public void removeMemberAt(int index)
Deletes the component at the specified index.


removeMember

public boolean removeMember(Object member)
Removes the member from this group

Parameters:
member - the member to be removed.
Returns:
true if the member was a component of this vector; false otherwise.

getMembers

public Vector getMembers()
Returns the members of the group


getParent

public HDF5Group getParent()
Returns the parent of the group


getMemberAt

public Object getMemberAt(int memberIndex)
Returns the member at index memberIndex

Parameters:
memberIndex - the index of the group member

getMemberCount

public int getMemberCount()
Returns the number of members the HDF5Group contains


isEmpty

public boolean isEmpty()
Returns true if the HDF5Group has no member


isRoot

public boolean isRoot()
Returns true if the HDF5Group is the root group


toString

public String toString()
Converts this object to a String representation.

Overrides:
toString in class HDF5Object
Returns:
a string representation of this object

finalize

protected void finalize()
                 throws Throwable
finalize() is called by the garbage collector on the object when garbage collection determines that there are no more references to the object. It is used to dispose of system resources or to perform other cleanup as C++ destructors

Overrides:
finalize in class Object
Throws:
Throwable