com.infoengine.connector
Class Group

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

public class Group
extends Data

represents Info*Engine group data.
Groups contain Elements.

See Also:
Serialized Form

Constructor Summary
Group()
          create a new unnamed Group
Group(java.lang.String name)
          create a new named Group
 
Method Summary
 void addElement(Element e)
          add an element to this group
 java.lang.Object clone()
          clone this Group (cloning not supported)
use of this method results in CloneNotSupportedException being thrown.
 boolean equals(java.lang.Object other)
          compare this group to another for equality
 java.lang.Object getAttributeValue(java.lang.String name, int index)
          get an attribute value by name and index
if the attribute is multi-valued the first value is returned
 java.util.Enumeration getAttributeValues(java.lang.String name, int index)
          get an enumeration of attribute values by name and index
 java.lang.String getClassName()
          get this group's class name
 Element getElementAt(int index)
          get an element by index
 int getElementCount()
          get the number of elements this group contains
 java.util.Enumeration getElements()
          get an Enumeration of this group's elements
 java.lang.String getName()
          get this group's name
 java.lang.String getRecordName()
          get this group's name
 java.lang.String getRecordShortDescription()
          get this group's short description
 java.lang.String getType()
          get this group's type
 int hashCode()
          generate this group's hashCode.
value is based on name, shortDescription, all elements and metadata
 void setClassName(java.lang.String cls)
          set this group's class name
 void setElementAt(Element e, int index)
          set an element by index
if an invalid index is supplied the result is the same as addElement
 void setName(java.lang.String name)
          set this group's name
 void setRecordName(java.lang.String name)
          set this group's name
 void setRecordShortDescription(java.lang.String desc)
          set this group's short description
 void setType(java.lang.String type)
          set this group's type
 java.lang.String toString()
          return a String representation of this Group (resembles XML useful for debugging only)
 
Methods inherited from class com.infoengine.connector.Data
addMetaValue, getMetaNames, getMetaValue, getMetaValues, removeMetaValues, setMetaValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Group

public Group()
create a new unnamed Group


Group

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

Parameters:
name - the new group's name
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
clone this Group (cloning not supported)
use of this method results in CloneNotSupportedException being thrown.

Overrides:
clone in class java.lang.Object
Returns:
Object
Throws:
java.lang.CloneNotSupportedException

equals

public boolean equals(java.lang.Object other)
compare this group to another for equality

Overrides:
equals in class Data
Returns:
boolean

getName

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

Returns:
String

getRecordName

public java.lang.String getRecordName()
get this group's name

Returns:
String

getRecordShortDescription

public java.lang.String getRecordShortDescription()
get this group's short description

Returns:
String

hashCode

public int hashCode()
generate this group's hashCode.
value is based on name, shortDescription, all elements and metadata

Overrides:
hashCode in class Data
Returns:
int

setName

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

Parameters:
name - the new name

setRecordName

public void setRecordName(java.lang.String name)
set this group's name

Parameters:
name - the new name

setRecordShortDescription

public void setRecordShortDescription(java.lang.String desc)
set this group's short description

Parameters:
desc - the new description

getElementCount

public int getElementCount()
get the number of elements this group contains

Returns:
int

getElements

public java.util.Enumeration getElements()
get an Enumeration of this group's elements

Returns:
Enumeration

addElement

public void addElement(Element e)
add an element to this group

Parameters:
e - the element to add

getElementAt

public Element getElementAt(int index)
get an element by index

Parameters:
index - the index of the element to retrieve
Returns:
Element or null if invalid index

setElementAt

public void setElementAt(Element e,
                         int index)
set an element by index
if an invalid index is supplied the result is the same as addElement

Parameters:
e - the element to set
index - the index to replace

getAttributeValues

public java.util.Enumeration getAttributeValues(java.lang.String name,
                                                int index)
get an enumeration of attribute values by name and index

Parameters:
name - the attribute name
index - the element index
Returns:
Enumeration or null if bad index or named attribute not found

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String name,
                                          int index)
get an attribute value by name and index
if the attribute is multi-valued the first value is returned

Parameters:
name - the attribute name
index - the element index
Returns:
Object or null if bad index or named attribute not found

setClassName

public void setClassName(java.lang.String cls)
set this group's class name

Parameters:
cls - the class name

getClassName

public java.lang.String getClassName()
get this group's class name

Returns:
String

setType

public void setType(java.lang.String type)
set this group's type

Parameters:
type - the new type

getType

public java.lang.String getType()
get this group's type

Returns:
String

toString

public java.lang.String toString()
return a String representation of this Group (resembles XML useful for debugging only)

Overrides:
toString in class java.lang.Object
Returns:
String