com.infoengine.connector
Class Element

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

public class Element
extends Data

represents Info*Engine element data.
Elements contain Attributes.
Elements are contained within Groups

See Also:
Attribute, Group, Serialized Form

Constructor Summary
Element()
           
 
Method Summary
 void addAttribute(Attribute a)
          add an attribute to this element
 void addAttribute(java.lang.String name, java.lang.Object value)
          add and create a new attribute to this element
 boolean equals(java.lang.Object other)
          compare this element with another for equality
 Attribute getAttribute(java.lang.String name)
          get an attribute by name
 int getAttributeCount()
          get the number of attributes contained by this element
 java.util.Enumeration getAttributes()
          get an Enumeration of all attributes contained by this element
 java.lang.Object getAttributeValue(java.lang.String name)
          get an attribute's value by name
if attribute is multi-valued then the first value is returned.
 java.util.Enumeration getAttributeValues(java.lang.String name)
          get an attribute's values by name.
 int hashCode()
          generate this Element's hashCode
value is based on all attributes and metadata.
 java.lang.String toString()
          return a String representation of this Element (resembles XML useful for deugging 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

Element

public Element()
Method Detail

addAttribute

public void addAttribute(Attribute a)
add an attribute to this element

Parameters:
a - the attribute to add

addAttribute

public void addAttribute(java.lang.String name,
                         java.lang.Object value)
add and create a new attribute to this element

Parameters:
name - attribute name
value - attribute value

getAttributes

public java.util.Enumeration getAttributes()
get an Enumeration of all attributes contained by this element

Returns:
Enumeration

getAttributeCount

public int getAttributeCount()
get the number of attributes contained by this element

Returns:
The number of attributes.

getAttribute

public Attribute getAttribute(java.lang.String name)
get an attribute by name

Parameters:
name - the attribute name
Returns:
Attribute or null if named attribute not found

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String name)
get an attribute's value by name
if attribute is multi-valued then the first value is returned.

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

getAttributeValues

public java.util.Enumeration getAttributeValues(java.lang.String name)
get an attribute's values by name.

Parameters:
name - the attribute name
Returns:
Enumeration the attributes values or null if named attribute not found

equals

public boolean equals(java.lang.Object other)
compare this element with another for equality

Overrides:
equals in class Data
Returns:
boolean

hashCode

public int hashCode()
generate this Element's hashCode
value is based on all attributes and metadata.

Overrides:
hashCode in class Data
Returns:
int

toString

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

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