com.infoengine.connector
Class Element

java.lang.Object
  extended bycom.infoengine.connector.Data
      extended bycom.infoengine.connector.Element
All Implemented Interfaces:
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

Field Summary
private  Vector _attributes
           
 
Fields inherited from class com.infoengine.connector.Data
_meta
 
Constructor Summary
Element()
           
 
Method Summary
 void addAttribute(Attribute a)
          add an attribute to this element
 void addAttribute(String name, Object value)
          add and create a new attribute to this element
 boolean equals(Object other)
          compare this element with another for equality
 Attribute getAttribute(String name)
          get an attribute by name
 int getAttributeCount()
          get the number of attributes contained by this element
 Enumeration getAttributes()
          get an Enumeration of all attributes contained by this element
 Object getAttributeValue(String name)
          get an attribute's value by name
if attribute is multi-valued then the first value is returned.
 Enumeration getAttributeValues(String name)
          get an attribute's values by name.
 int hashCode()
          generate this Element's hashCode
value is based on all attributes and metadata.
 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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_attributes

private Vector _attributes
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(String name,
                         Object value)
add and create a new attribute to this element

Parameters:
name - attribute name
value - attribute value

getAttributes

public 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(String name)
get an attribute by name

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

getAttributeValue

public Object getAttributeValue(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 Enumeration getAttributeValues(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(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 String toString()
return a String representation of this Element (resembles XML useful for deugging only)

Returns:
String