|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AntNode
Represents a generic node encapsulating common behaviour
AntAttribute| Method Summary | |
|---|---|
void |
addAttribute(AntAttribute attribute)
Adds an attribute to the end of this node |
void |
addAttribute(AntAttribute attribute,
int position)
Adds an attribute to this node |
void |
addNode(AntNode node)
Adds a node to this node |
void |
addNode(AntNode node,
int position)
Adds a node to this node |
void |
changeAttribute(AntAttribute attribute)
Changes an attribute in the list |
AntNode |
cloneNode(IDPool idPool)
Gets a clone of this node |
AntAttribute |
getAttribute(int position)
Gets an attribute from this node |
AntAttribute |
getAttribute(String name)
Gets the attribute with the required name |
int |
getAttributeSize()
Gets the number of attributes held by this node |
String |
getData()
Gets any character data stored in this node |
String |
getDescription()
Gets the description of this node |
IDPool |
getIDPool()
Gets the ID pool used by this node |
String |
getName()
Gets the name of this node |
AntNode |
getNode(int position)
Gets a node from this node |
long |
getNodeID()
Gets the ID of this node |
int |
getNodeSize()
Gets tthe number of nested elements held by thsi node |
AntNodeText |
getNodeText()
Gets the text node in this one, if any |
AntNode |
getParent()
Gets the parent of this node |
int |
getType()
Gets the type of this node |
int |
getTypeAt(int position)
Gets the type of the node at the specified position |
int |
indexOfAttribute(AntAttribute attribute)
Gets the index of an attribute in this node |
int |
indexOfNode(AntNode node)
Gets the index of a node nested in this node |
void |
moveAttribute(int fromPosition,
int toPosition)
Moves an attribute in this node |
void |
moveNode(int fromPosition,
int toPosition)
Moves a node to a new position |
void |
removeAttribute(AntAttribute attribute)
Removes an attribute from this node |
void |
removeAttribute(int position)
Removes an attribute from this node |
void |
removeNode(AntNode node)
Removes a node from this node |
void |
removeNode(int position)
Removes a node from this node |
void |
setData(String data)
Sets the character data stored in this node |
void |
setDescription(String description)
Sets the description of this node |
void |
setIDPool(IDPool idPool)
Sets the ID pool used by this node |
void |
setName(String name)
Sets the name of this node |
void |
setNodeID(long id)
Sets the ID of this node |
void |
setParent(AntNode parent)
Sets the parent of this node |
| Method Detail |
|---|
String getName()
void setName(String name)
name - the new nameAntNode getParent()
void setParent(AntNode parent)
parent - the new parentString getDescription()
void setDescription(String description)
description - the new descriptionint getType()
AntAttribute getAttribute(int position)
position - the index of the attribute required
AntAttribute getAttribute(String name)
name - the required attribute's name
void addAttribute(AntAttribute attribute,
int position)
attribute - the attribute to addposition - the index to place the attributevoid addAttribute(AntAttribute attribute)
attribute - the attribute to addvoid changeAttribute(AntAttribute attribute)
attribute - the new version of an attributevoid removeAttribute(AntAttribute attribute)
attribute - the attribute to removevoid removeAttribute(int position)
position - the position of the attribute to remove
void moveAttribute(int fromPosition,
int toPosition)
fromPosition - the index of the attribute to movetoPosition - the index to move the attribute toint indexOfAttribute(AntAttribute attribute)
attribute - the specified attribute
AntNode getNode(int position)
position - the position of the required node
void addNode(AntNode node,
int position)
throws CannotAddNodeException
node - the node to addposition - the the index where to place the node
CannotAddNodeException - if the node is not allowed to be added
void addNode(AntNode node)
throws CannotAddNodeException
node - the node to add
CannotAddNodeException - if the node is not allowed to be addedvoid removeNode(AntNode node)
node - the node to removevoid removeNode(int position)
position - the index of the node to removeint indexOfNode(AntNode node)
node - the specified node
int getTypeAt(int position)
position - the index of the required node type
int getAttributeSize()
int getNodeSize()
String getData()
void setData(String data)
data - the new character datavoid setIDPool(IDPool idPool)
idPool - the ID pool to useIDPool getIDPool()
void setNodeID(long id)
id - the ID of this nodelong getNodeID()
void moveNode(int fromPosition,
int toPosition)
throws CannotAddNodeException
fromPosition - the position the node is moving fromtoPosition - the position the node is moving to
CannotAddNodeException - if the node is not allowed to be addedAntNodeText getNodeText()
AntNode cloneNode(IDPool idPool)
idPool - an ID pool to use
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||