|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ninja.activeproxy.path.description.ElementDescription
Representation of an XML description. Somewhat simple representation of XML description (few public methods provided in ElementDescription) because the goal is to allow other classes to extend ElementDescription and implement runtime descriptions of different objects (operators, connectors, etc.), while abstracting away the fact that descriptions for these objects are written in XML. This class is abstract, which will force the instantiation of child classes.
Field Summary | |
private java.util.Hashtable |
attributes
|
private java.util.Vector |
children
|
private java.lang.String |
type
|
Fields inherited from interface ninja.activeproxy.path.description.Tags |
CLASSNAME,
CONNECTOR,
DATATYPE,
DESTINATION,
ID,
INPUT,
NAME,
OPERATOR,
OPERATOR_PATH_INDEX,
OPERATOR_SELECTED,
OUTPUT,
PATH,
PROTOCOL,
PROTOCOL_ORDERED,
PROTOCOL_RELIABLE,
PROTOCOL_TYPE,
RUNTIME,
RUNTIME_HOST,
SOURCE,
URL |
Constructor Summary | |
ElementDescription(java.lang.String type)
Constructs an empty element of the given type. |
Method Summary | |
protected void |
addChild(ElementDescription child)
Adds a child to this element. |
protected void |
addChildren(java.util.Vector children)
Adds children to this element. |
java.util.Enumeration |
getAllAttributes()
Returns an enumeration of all attribute names of this element. |
java.lang.String |
getAttr(java.lang.String name)
Returns the value of an attribute. |
protected java.util.Vector |
getChildren()
Returns all children of this element. |
protected java.util.Vector |
getChildrenByType(java.lang.String type)
Returns all children of the given type. |
java.lang.String |
getType()
Returns the type of this element. |
protected boolean |
removeChild(ElementDescription child)
Removes a child from this element. |
protected java.util.Vector |
removeChildrenByType(java.lang.String type)
Removes all children of the given type. |
void |
setAttr(java.lang.String name,
java.lang.String value)
Sets an attribute to the given value. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String type
private java.util.Hashtable attributes
private java.util.Vector children
Constructor Detail |
public ElementDescription(java.lang.String type)
type
- the type of the element.Method Detail |
public java.lang.String getType()
public void setAttr(java.lang.String name, java.lang.String value)
name
- the name of the attribute.value
- the value of the attribute.public java.lang.String getAttr(java.lang.String name)
name
- the name of the attribute.public java.util.Enumeration getAllAttributes()
protected void addChild(ElementDescription child)
child
- the child to be added.protected void addChildren(java.util.Vector children)
children
- a vector of children to be added to this element.protected boolean removeChild(ElementDescription child)
child
- the child to be removed.protected java.util.Vector removeChildrenByType(java.lang.String type)
type
- the type of children to be removed.protected java.util.Vector getChildren()
protected java.util.Vector getChildrenByType(java.lang.String type)
type
- the type of the children to be retrieved.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |