com.infoengine.object
Class IeCollection

java.lang.Object
  extended bycom.infoengine.object.IeObject
      extended bycom.infoengine.object.IeCollection
All Implemented Interfaces:
Cloneable, Externalizable, Serializable

public class IeCollection
extends IeObject
implements Cloneable

See Also:
Serialized Form

Field Summary
static String COLLECTION_STATE
           
static String ERROR
           
static String SOAP_RETURN
           
static String SOAP_RETURN_SUBSTITUTION
           
static String SOAP_RETURN_TYPE
           
static String STATUS
           
 
Fields inherited from class com.infoengine.object.IeObject
_attributes, _children, _hasChanged, _meta, _name, _type, INITIAL_LIST_SIZE, INITIAL_MAP_SIZE, USE_COLLECTIONS
 
Constructor Summary
IeCollection()
          Constructs a new IeCollection
IeCollection(String name)
          Constructs a new IeCollection and sets the collection name to the given String.
 
Method Summary
 void addError(String message)
          Adds an error message to this collection.
 void addGroup(IeGroup group)
          Adds a group to the collection.
 void clearGroups()
          Disassociates all of the groups from the collection, leaving the collection empty of groups.
 Object deepClone()
          Returns a deep copy of the collection.
 IeGroup firstGroup()
          Returns the first group contained in the collection.
 Enumeration getErrors()
          Returns an Enumeration of all error messages set on this collection
 IeGroup getGroup(String name)
          Returns a group by name.
 IeGroup getGroupAt(int index)
          Returns the group located at a specified index.
 int getGroupCount()
          Returns the number of groups contained in the collection.
 Enumeration getGroups()
          Returns all of the groups contained in the collection.
 String getNodeName()
          Returns the DOM node name of this object.
 Enumeration getRecordedState()
           
 Object getSOAPReturn()
           
 String getSOAPReturnSubstitution()
           
 String getSOAPReturnType()
           
 int getStatus()
          Returns the integer status value associated with the collection.
 IeGroup lastGroup()
          Returns the last group contained in the collection.
 void recordState()
           
 void removeAllGroups()
          Removes all of the groups contained in the collection.
 void removeGroup(IeGroup group)
          Removes a specified group from the collection.
 void removeGroup(String name)
          Removes a group by name.
 void setGroupAt(IeGroup group, int index)
          Sets the group at a specified index.
 void setSOAPReturn(Object o)
           
 void setSOAPReturnSubstitution(String subs)
           
 void setSOAPReturnType(String type)
           
 void setStatus(int status)
          Sets an integer status on this collection.
 Object shallowClone()
          Returns a shallow copy of the collection.
 String toXML()
          Renders the collection as an XML string.
 void toXML(Writer writer)
          Writes the collection as an XML string to a Writer.
 
Methods inherited from class com.infoengine.object.IeObject
_addChild, _addMeta, _getMeta, _removeChild, _setMeta, addAtt, addChild, addMeta, addMeta, addMeta, addMeta, addMetaDatum, addMetaValue, addMetaValues, appendMetaDatum, canonicalize, canonicalize, clearChildren, clone, containsChild, containsMetaValue, deepCopy, findChild, firstAtt, firstChild, firstMetaValue, getAtt, getAttAt, getAttByMeta, getAttCount, getAttribute, getAtts, getChildAt, getChildCount, getChildren, getHasChanged, getMeta, getMetaNames, getMetaValue, getMetaValueAt, getMetaValueCount, getMetaValues, getName, getTagName, getType, hasChildren, indexOfChild, indexOfMetaValue, lastAtt, lastChild, lastMetaValue, newList, newList, newMap, newMap, readExternal, removeAllAtts, removeAllChildren, removeAllMeta, removeAllMetaValues, removeAtt, removeAtt, removeAttAt, removeAttribute, removeChild, removeChildAt, removeMeta, removeMetaValue, removeMetaValueAt, removeName, removeType, replaceChild, setAttAt, setAttribute, setChildAt, setHasChanged, setMeta, setMeta, setMeta, setMeta, setMetaValue, setMetaValueAt, setName, setType, shallowCopy, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOAP_RETURN

public static final String SOAP_RETURN
See Also:
Constant Field Values

SOAP_RETURN_TYPE

public static final String SOAP_RETURN_TYPE
See Also:
Constant Field Values

SOAP_RETURN_SUBSTITUTION

public static final String SOAP_RETURN_SUBSTITUTION
See Also:
Constant Field Values

COLLECTION_STATE

public static final String COLLECTION_STATE
See Also:
Constant Field Values

STATUS

public static final String STATUS
See Also:
Constant Field Values

ERROR

public static final String ERROR
See Also:
Constant Field Values
Constructor Detail

IeCollection

public IeCollection()
Constructs a new IeCollection


IeCollection

public IeCollection(String name)
Constructs a new IeCollection and sets the collection name to the given String.

Parameters:
name - The name of the collection object
Method Detail

addGroup

public void addGroup(IeGroup group)
Adds a group to the collection.

Parameters:
group - the group to be added

firstGroup

public IeGroup firstGroup()
Returns the first group contained in the collection.

Returns:
The first group, or null if the collection does not contain any groups

getGroup

public IeGroup getGroup(String name)
Returns a group by name.

Parameters:
name - the name of the group to be returned
Returns:
The named group, or null if the collection does not contain the group

getGroups

public Enumeration getGroups()
Returns all of the groups contained in the collection.

Returns:
The groups contained in the collection

getGroupAt

public IeGroup getGroupAt(int index)
Returns the group located at a specified index.

Parameters:
index - the index of the group to be returned
Returns:
The group located at the specified index, or null if the index exceeds the number of groups contained in the collection

getGroupCount

public int getGroupCount()
Returns the number of groups contained in the collection.

Returns:
The number of groups in the collection

lastGroup

public IeGroup lastGroup()
Returns the last group contained in the collection.

Returns:
The last group, or null if the collection does not contain any groups

clearGroups

public void clearGroups()
Disassociates all of the groups from the collection, leaving the collection empty of groups. This differs from removeAllGroups in that if one collection is cloned from another without using deepClone, calling removeAllGroups against one of the clones will cause groups to be removed from both. clearGroups will affect only the clone against which it is called.


removeAllGroups

public void removeAllGroups()
Removes all of the groups contained in the collection. This differs from clearGroups in that if one collection is cloned from another without using deepClone, calling removeAllGroups against one of the clones will cause groups to be removed from both. clearGroups will affect only the clone against which it is called.


removeGroup

public void removeGroup(String name)
Removes a group by name.

Parameters:
name - the name of the group to be removed

removeGroup

public void removeGroup(IeGroup group)
Removes a specified group from the collection.

Parameters:
group - the group to be removed

setGroupAt

public void setGroupAt(IeGroup group,
                       int index)
Sets the group at a specified index.

Parameters:
group - the new group to be set
index - the index at which to set the new group

getNodeName

public String getNodeName()
Returns the DOM node name of this object.

Overrides:
getNodeName in class IeObject
Returns:
The DOM node name of this object.

setStatus

public void setStatus(int status)
Sets an integer status on this collection.

Parameters:
status - The new status value.

getStatus

public int getStatus()
Returns the integer status value associated with the collection.

Returns:
The current status value.

addError

public void addError(String message)
Adds an error message to this collection.

Parameters:
message - The error message to add.

getErrors

public Enumeration getErrors()
Returns an Enumeration of all error messages set on this collection


toXML

public String toXML()
Renders the collection as an XML string.

Returns:
The XML string representation of the collection.

toXML

public void toXML(Writer writer)
Writes the collection as an XML string to a Writer.

Parameters:
writer - The Writer object to which to write the XML string representation of the collection.

deepClone

public final Object deepClone()
Returns a deep copy of the collection.

Overrides:
deepClone in class IeObject
Returns:
The deep copy

shallowClone

public final Object shallowClone()
Returns a shallow copy of the collection.

Returns:
The shallow copy

setSOAPReturn

public void setSOAPReturn(Object o)

getSOAPReturn

public Object getSOAPReturn()

setSOAPReturnType

public void setSOAPReturnType(String type)

getSOAPReturnType

public String getSOAPReturnType()

setSOAPReturnSubstitution

public void setSOAPReturnSubstitution(String subs)

getSOAPReturnSubstitution

public String getSOAPReturnSubstitution()

recordState

public void recordState()

getRecordedState

public Enumeration getRecordedState()