|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.object.factory.Group
Field Summary | |
private static int |
counter
|
static int |
EXCEPTION
|
static String |
EXCEPTION_OBJECT_KEY
|
private IeGroup |
myGroup
|
static int |
OBJECT
|
static int |
STATUS
|
static int |
STREAM
|
static boolean |
TOP_LEVEL
|
static String[] |
TYPES
|
static int |
UNKNOWN
|
Constructor Summary | |
Group()
Constructs an unnamed Group. |
|
Group(Group grp)
Constructs a new Group from an existing lightweight connector Group. |
|
Group(IeGroup group)
Constructs a Group wrapper around an existing IeGroup. |
|
Group(String name)
Constructs a named Group. |
|
Group(URL locator)
Contructs a group read from a URL. |
Method Summary | |
void |
addAttributeValue(int index,
String attName,
Object attValue)
add an attribute value |
void |
addElement(Element element)
Adds an element to the elements contained in the group. |
void |
addElement(TypeInstance typeInstance)
Adds a type instance to the elements contained in the group. |
void |
addElementByUfid(Element element)
Adds an element to the elements contained in the group and removes any other elements from the group that have the same UFID (Unique Federation Identifier) as the element being added. |
void |
addMessage(String message)
Adds a message to this group. |
Object |
clone()
Returns a shallow copy of this group. |
private Att |
copyConnectorAttribute(Attribute att)
|
private Element |
copyConnectorElement(Element elem)
|
private void |
copyConnectorMeta(IeObject ieObj,
Data data)
|
Group |
deepClone()
Returns a deep copy of this group. |
Enumeration |
getAllElementsWithMetaValue(String meta,
String value)
Returns an enumeration of all elements of the group that have a meta value with a specified name and value. |
Object |
getAttributeValue(int index,
String name)
Returns the value of a named attribute within an element at a specific location. |
Object |
getAttributeValueByMeta(int index,
String name,
Object value)
Locates an element by index, then returns the value of the attribute within that element having a specific metadata name/value pair. |
String |
getClassName()
Returns this group's class name. |
Element[] |
getElementArray()
Returns all of the elements of this group as an array. |
Element |
getElementAt(int index)
Returns the element at a specific location. |
Element |
getElementByUfid(String ufid)
Returns the element of the group that has a UFID (Unique Federation Identifier) with a specific value. |
Element |
getElementByUfidWithAttributes(String ufid,
AttributeIdentifier[] attrIds)
Returns the element of the group that has a UFID (Unique Federation Identifier) with a specific value and that also contains a specific set of attributes identified by attribute identifier. |
Element |
getElementByUfidWithAttributes(String ufid,
AttributeTypeIdentifier[] attrTypeIds)
Returns the element of the group that has a UFID (Unique Federation Identifier) with a specific value and that also contains a specific set of attributes identified by attribute type identifier. |
Element |
getElementByUfidWithAttributes(String ufid,
String[] names)
Returns the element of the group that has a UFID (Unique Federation Identifier) with a specific value and that also contains a specific set of attributes identified by name. |
int |
getElementCount()
Returns the nummber of elements contained in the group. |
Enumeration |
getElements()
Returns all of the elements of this group. |
Element |
getElementWithMetaValue(String meta,
String value)
Returns the element of the group that has a meta value with a specified name and value. |
IeGroup |
getGroup()
Returns the group's internal IeGroup object. |
boolean |
getHasChanged()
Returns this group's change indicator. |
String |
getMessage()
Returns this group's message. |
Enumeration |
getMessages()
Returns all of this group's messages. |
String |
getName()
Returns this group's name. |
int |
getStatus()
Returns this group's current status. |
String |
getSuccess()
Returns the current value of this group's SUCCESS meta. |
int |
getType()
Returns this group's currently assigned type. |
String |
getTypeString()
Returns this group's currently assigned type as a string. |
static Group |
newExceptionGroup(String name,
Throwable t)
Creates an exception group with name and throwable. |
static Group |
newExceptionGroup(String name,
Throwable t,
boolean storeException)
Creates an exception group with name and throwable. |
static Group |
newStatusGroup(String name,
String message,
int status)
Creates a status group with a specified status and message. |
protected static IeGroup |
newStructure()
Builds an empty group structure. |
private static int |
nextSeqNo()
|
void |
printTree()
Prints the structure of this group on System.out. |
void |
removeElement(Element element)
Removes a specific element from the group. |
void |
removeElement(String name)
Removes an element from the group by name. |
void |
removeElementByUfid(String ufid)
Removes the element of the group that has a UFID (Unique Federation Identifier) with a specific value. |
void |
removeElements()
Removes all Elements from the group |
void |
setAttributeValue(int index,
String attName,
Object attValue)
set an attribute value |
void |
setClassName(String name)
Sets this group's class name. |
void |
setElement(Element element)
Sets the group such that it contains the specified element only. |
void |
setElementAt(Element element,
int index)
Sets the element at a specific location. |
protected void |
setGroup(IeGroup group)
Sets the group's internal IeGroup object. |
void |
setHasChanged(boolean hasChanged)
Sets this group's change indicator. |
void |
setMessage(String message)
Sets this group's message. |
void |
setName(String name)
Sets this group's name. |
void |
setStatus(int status)
Sets this group's status. |
void |
setSuccess(String value)
Sets this group's SUCCESS meta to a specified value. |
void |
setType(int type)
Sets this group's type. |
static String |
toXML(IeCollection collection)
Renders a collection of groups to an XML string. |
static String |
toXML(IeCollection collection,
boolean includeMeta)
Renders a collection of groups to an XML string. |
static void |
toXML(IeCollection collection,
Writer writer)
Writes the XML representation of a collection of groups. |
static void |
toXML(IeCollection collection,
Writer writer,
boolean includeMeta)
Writes the XML representation of a collection of groups. |
void |
toXML(PrintWriter output,
boolean topLevel)
Writes the XML representation of this group. |
void |
toXML(PrintWriter output,
boolean topLevel,
boolean includeMeta)
Writes the XML representation of this group. |
static int |
type2Int(String type)
Converts a string to an integer group type. |
private void |
updateAttributeValue(int index,
String attName,
Object attValue,
boolean set)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static String[] TYPES
public static final int UNKNOWN
public static final int OBJECT
public static final int STATUS
public static final int STREAM
public static final int EXCEPTION
public static final String EXCEPTION_OBJECT_KEY
public static final boolean TOP_LEVEL
private IeGroup myGroup
private static int counter
Constructor Detail |
public Group()
public Group(String name)
name
- The name to be assigned to the group.public Group(URL locator)
locator
- The URL of the resource from which to read the group.public Group(IeGroup group)
group
- The IeGroup object to be wrapped.public Group(Group grp)
grp
- the connector group ojectMethod Detail |
private Element copyConnectorElement(Element elem)
private Att copyConnectorAttribute(Attribute att)
private void copyConnectorMeta(IeObject ieObj, Data data)
public void toXML(PrintWriter output, boolean topLevel)
output
- The PrintWriter on which to write the XML text.topLevel
- true if this group is at the top level of a nested
group hierarchy.public void toXML(PrintWriter output, boolean topLevel, boolean includeMeta)
output
- The PrintWriter on which to write the XML text.topLevel
- true if this group is at the top level of a nested
group hierarchy.includeMeta
- Specify true to include meta-information in the XML
representation.public static void toXML(IeCollection collection, Writer writer)
collection
- The IeCollection to render to XML.writer
- The Writer on which to write the XML text.public static void toXML(IeCollection collection, Writer writer, boolean includeMeta)
collection
- The IeCollection to render to XML.writer
- The Writer on which to write the XML text.includeMeta
- Specify true to include meta-information in the XML
representation.public static String toXML(IeCollection collection)
collection
- The IeCollection to render to XML.
public static String toXML(IeCollection collection, boolean includeMeta)
collection
- The IeCollection to render to XML.includeMeta
- Specify true to include meta-information in the XML
representation.
public Object clone()
public Group deepClone()
public void printTree()
public String getName()
public void setName(String name)
name
- The group's new name.public void setSuccess(String value)
value
- The value to which to set the SUCCESS meta.public String getSuccess()
public String getClassName()
public void setClassName(String name)
name
- The group's new class name.public int getStatus()
public void setStatus(int status)
status
- The group's new status.public void setMessage(String message)
message
- The group's new message.public void addMessage(String message)
message
- The message to add.public String getMessage()
public Enumeration getMessages()
public int getType()
public String getTypeString()
public static int type2Int(String type)
type
- The group type as a string.
public void setType(int type)
type
- The group's new type.public boolean getHasChanged()
public void setHasChanged(boolean hasChanged)
hasChanged
- The group's new change indicator value.public Enumeration getElements()
public Element[] getElementArray()
public Element getElementWithMetaValue(String meta, String value)
meta
- The name of the meta.value
- The value of the meta.
public Enumeration getAllElementsWithMetaValue(String meta, String value)
meta
- The name of the meta.value
- The value of the meta.
public Element getElementAt(int index)
index
- The location of the element.
public void setElementAt(Element element, int index)
element
- The element to set.index
- The location at which to set the element.public Element getElementByUfid(String ufid)
ufid
- The UFID (Unique Federation Identifier)
public Element getElementByUfidWithAttributes(String ufid, String[] names)
ufid
- The UFID (Unique Federation Identifier)names
- The attribute names
public Element getElementByUfidWithAttributes(String ufid, AttributeTypeIdentifier[] attrTypeIds)
ufid
- The UFID (Unique Federation Identifier)attrTypeIds
- The attribute type identifiers
public Element getElementByUfidWithAttributes(String ufid, AttributeIdentifier[] attrIds)
ufid
- The UFID (Unique Federation Identifier)attrIds
- The attribute identifiers
public void removeElementByUfid(String ufid)
ufid
- The UFID (Unique Federation Identifier)public void addElementByUfid(Element element)
element
- The element to add to the group.public int getElementCount()
public void setElement(Element element)
element
- The element to set in the group.public void addElement(Element element)
element
- The element to add to the group.public void addElement(TypeInstance typeInstance)
typeInstance
- The type instance to add to the group.public void removeElement(Element element)
element
- The element to be removed.public void removeElement(String name)
name
- The name of the element to be removed.public void removeElements()
public Object getAttributeValue(int index, String name)
index
- The location of the element.name
- The name of the attribute
public Object getAttributeValueByMeta(int index, String name, Object value)
index
- The location of the element.name
- The name of the metadata to match.value
- The value of the metadata to match.
public static Group newStatusGroup(String name, String message, int status)
name
- The name to be assigned to the status group.message
- The message to place in the group.status
- The status assign to the group.
public static Group newExceptionGroup(String name, Throwable t)
name
- The name to be assigned to the exception group.t
- The exception.
public static Group newExceptionGroup(String name, Throwable t, boolean storeException)
name
- The name to be assigned to the exception group.t
- The exception.storeException
- specifies whether or not the exception object
should be stored as meta-data on the group.
private static int nextSeqNo()
protected static IeGroup newStructure()
public IeGroup getGroup()
protected void setGroup(IeGroup group)
group
- The new internal IeGroup object.public void setAttributeValue(int index, String attName, Object attValue)
index
- - the element index to set the attribute inattName
- - the name of the attribute to setattValue
- - the attribute valuepublic void addAttributeValue(int index, String attName, Object attValue)
index
- - the element index to add the attribute inattName
- - the name of the attribute to setattValue
- - the attribute valueprivate void updateAttributeValue(int index, String attName, Object attValue, boolean set)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |