com.infoengine.connector
Class Group

java.lang.Object
  extended bycom.infoengine.connector.Data
      extended bycom.infoengine.connector.Group
All Implemented Interfaces:
Serializable

public class Group
extends Data

represents Info*Engine group data.
Groups contain Elements.

See Also:
Serialized Form

Field Summary
private  Vector _elements
           
private  String className
           
private  String name
           
private  String shortDesc
           
private  String type
           
 
Fields inherited from class com.infoengine.connector.Data
_meta
 
Constructor Summary
Group()
          create a new unnamed Group
Group(String name)
          create a new named Group
 
Method Summary
 void addElement(Element e)
          add an element to this group
 Object clone()
          clone this Group (cloning not supported)
use of this method results in CloneNotSupportedException being thrown.
 boolean equals(Object other)
          compare this group to another for equality
 Object getAttributeValue(String name, int index)
          get an attribute value by name and index
if the attribute is multi-valued the first value is returned
 Enumeration getAttributeValues(String name, int index)
          get an enumeration of attribute values by name and index
 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
 Enumeration getElements()
          get an Enumeration of this group's elements
 String getName()
          get this group's name
 String getRecordName()
          get this group's name
 String getRecordShortDescription()
          get this group's short description
 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(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(String name)
          set this group's name
 void setRecordName(String name)
          set this group's name
 void setRecordShortDescription(String desc)
          set this group's short description
 void setType(String type)
          set this group's type
 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
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private String name

shortDesc

private String shortDesc

className

private String className

type

private String type

_elements

private Vector _elements
Constructor Detail

Group

public Group()
create a new unnamed Group


Group

public Group(String name)
create a new named Group

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

clone

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

Returns:
Object
Throws:
CloneNotSupportedException

equals

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

Overrides:
equals in class Data
Returns:
boolean

getName

public String getName()
get this group's name

Returns:
String

getRecordName

public String getRecordName()
get this group's name

Returns:
String

getRecordShortDescription

public 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(String name)
set this group's name

Parameters:
name - the new name

setRecordName

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

Parameters:
name - the new name

setRecordShortDescription

public void setRecordShortDescription(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 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 Enumeration getAttributeValues(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 Object getAttributeValue(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(String cls)
set this group's class name

Parameters:
cls - the class name

getClassName

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

Returns:
String

setType

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

Parameters:
type - the new type

getType

public String getType()
get this group's type

Returns:
String

toString

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

Returns:
String