org.owasp.orizon.mirage.parser
Class BaseNode
java.lang.Object
org.owasp.orizon.mirage.parser.BaseNode
- All Implemented Interfaces:
- Node
- Direct Known Subclasses:
- Command, DumpCommand, InfoCommand, ListCommand, ModelCommand, NoCommand, OpenCommand, QuitCommand, SearchCommand, ShowCommand
public class BaseNode
- extends java.lang.Object
- implements Node
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
id
public final int id
parent
protected Node parent
children
protected java.util.List<Node> children
BaseNode
public BaseNode(int id)
setListClass
public static void setListClass(java.lang.Class<? extends java.util.List> listClass)
getId
public int getId()
- Specified by:
getId
in interface Node
open
public void open()
- Description copied from interface:
Node
- Life-cycle hook method called after the node has been made the current
node
- Specified by:
open
in interface Node
close
public void close()
- Description copied from interface:
Node
- Life-cycle hook method called after all the child nodes have been
added.
- Specified by:
close
in interface Node
setParent
public void setParent(Node n)
- Specified by:
setParent
in interface Node
getParent
public Node getParent()
- Specified by:
getParent
in interface Node
addChild
public void addChild(Node n)
- Specified by:
addChild
in interface Node
addChild
public void addChild(int i,
Node n)
- Specified by:
addChild
in interface Node
getChild
public Node getChild(int i)
- Specified by:
getChild
in interface Node
setChild
public void setChild(int i,
Node n)
- Specified by:
setChild
in interface Node
removeChild
public Node removeChild(int i)
- Specified by:
removeChild
in interface Node
removeChild
public boolean removeChild(Node n)
- Specified by:
removeChild
in interface Node
indexOf
public int indexOf(Node n)
- Specified by:
indexOf
in interface Node
clearChildren
public void clearChildren()
- Specified by:
clearChildren
in interface Node
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interface Node
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
- Specified by:
getAttribute
in interface Node
setAttribute
public void setAttribute(java.lang.String name,
java.lang.Object value)
- Specified by:
setAttribute
in interface Node
hasAttribute
public boolean hasAttribute(java.lang.String name)
- Specified by:
hasAttribute
in interface Node
getAttributeNames
public java.util.Set<java.lang.String> getAttributeNames()
- Specified by:
getAttributeNames
in interface Node
setInputSource
public void setInputSource(java.lang.String inputSource)
- Specified by:
setInputSource
in interface Node
getInputSource
public java.lang.String getInputSource()
- Specified by:
getInputSource
in interface Node
- Returns:
- A string that says where the input came from. Typically a file name, though
it could be a URL or something else, of course.
getBeginLine
public int getBeginLine()
- Specified by:
getBeginLine
in interface Node
getEndLine
public int getEndLine()
- Specified by:
getEndLine
in interface Node
getBeginColumn
public int getBeginColumn()
- Specified by:
getBeginColumn
in interface Node
getEndColumn
public int getEndColumn()
- Specified by:
getEndColumn
in interface Node
setBeginLine
public void setBeginLine(int beginLine)
- Specified by:
setBeginLine
in interface Node
setEndLine
public void setEndLine(int endLine)
- Specified by:
setEndLine
in interface Node
setBeginColumn
public void setBeginColumn(int beginColumn)
- Specified by:
setBeginColumn
in interface Node
setEndColumn
public void setEndColumn(int endColumn)
- Specified by:
setEndColumn
in interface Node
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object