com.infoengine.connector
Class Collection

java.lang.Object
  extended by com.infoengine.connector.Data
      extended by com.infoengine.connector.Collection
All Implemented Interfaces:
java.io.Serializable

public class Collection
extends Data

represents Info*Engine collection data.
Collections contain Groups.

See Also:
Serialized Form

Constructor Summary
Collection()
          create a new unnamed Collection
Collection(java.lang.String name)
          create a new named Collection
 
Method Summary
 void addGroup(Group g)
          add a group to the collection
 Group getGroup(java.lang.String name)
          get a group by name
 int getGroupCount()
          get the number of groups in this collection
 java.util.Enumeration getGroups()
          get a enumeration of all groups in this collection
 java.lang.String getName()
          get this collection's name
 void removeGroup(java.lang.String name)
          remove a group from the collection by name
 void setName(java.lang.String name)
          set this collection's name
 java.lang.String toString()
           
 
Methods inherited from class com.infoengine.connector.Data
addMetaValue, equals, getMetaNames, getMetaValue, getMetaValues, hashCode, removeMetaValues, setMetaValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Collection

public Collection()
create a new unnamed Collection


Collection

public Collection(java.lang.String name)
create a new named Collection

Method Detail

setName

public void setName(java.lang.String name)
set this collection's name

Parameters:
name - - new collection name

getName

public java.lang.String getName()
get this collection's name


getGroup

public Group getGroup(java.lang.String name)
get a group by name

Parameters:
name - - the group name
Returns:
the group corresponding to name or null if not found

addGroup

public void addGroup(Group g)
add a group to the collection

Parameters:
g - the group to add (does nothing if null)

removeGroup

public void removeGroup(java.lang.String name)
remove a group from the collection by name

Parameters:
name - - the name of the group to remove

getGroups

public java.util.Enumeration getGroups()
get a enumeration of all groups in this collection

Returns:
group Enumeration

getGroupCount

public int getGroupCount()
get the number of groups in this collection

Returns:
The number of groups.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object