|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.japisoft.fastparser.node.SimpleNode
Simple node.
Field Summary | |
static int |
COMMENT_NODE
|
static int |
TAG_NODE
|
static int |
TEXT_NODE
|
Constructor Summary | |
SimpleNode(int type,
java.lang.String content)
|
|
SimpleNode(SimpleNode parent,
int type,
java.lang.String content)
|
Method Summary | |
void |
addChildNode(SimpleNode node)
Insert a new node |
void |
addNode(MutableNode node)
Reset the children |
SimpleNode |
childAt(int index)
|
int |
childCount()
|
int |
childNodeIndex(SimpleNode node)
|
SimpleNode |
clone(boolean deep)
Clone the current node, include subchild if deep is true |
java.util.Enumeration |
getAllChild()
Get all child |
java.lang.String |
getAttribute(java.lang.String name)
|
java.lang.String |
getContent()
|
Document |
getDocument()
|
java.lang.String |
getNodeContent()
|
SimpleNode |
getSimpleParent()
|
int |
getType()
|
java.lang.String |
getViewAttribute(java.lang.String name)
|
java.util.Enumeration |
getViewAttributes()
|
ViewableNode |
getViewChildAt(int i)
|
int |
getViewChildCount()
|
java.lang.String |
getViewContent()
|
boolean |
hasAttribute(java.lang.String name)
|
void |
insertChildNode(int index,
SimpleNode node)
Insert a childnode at the index location |
boolean |
isComment()
|
boolean |
isLeaf()
|
boolean |
isRoot()
|
boolean |
isTag()
|
boolean |
isText()
|
boolean |
isViewComment()
|
boolean |
isViewLeaf()
|
boolean |
isViewText()
|
void |
removeChildNode(SimpleNode node)
Remove the following node |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Set the attribute value. |
void |
setContent(java.lang.String content)
Update the node content, for tag this is the tag name, for text this is the content, for comment this is the content |
void |
setDocument(Document doc)
Owner document for this node |
void |
setNodeAttribute(java.lang.String name,
java.lang.String value)
Reset the node attribute |
void |
setNodeContent(java.lang.String content)
Reset the node content |
void |
setNodeParent(MutableNode node)
Reset the node parent |
void |
setSimpleParent(SimpleNode node)
reset the parent node |
void |
setType(int type)
Update the node type, this is TEXT_NODE, TAG_NODE or COMMENT_NODE |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TEXT_NODE
public static final int TAG_NODE
public static final int COMMENT_NODE
Constructor Detail |
public SimpleNode(int type, java.lang.String content)
type
- Node type : TEXT_NODE, TAG_NODE or COMMENT_NODEcontent
- the tag contentpublic SimpleNode(SimpleNode parent, int type, java.lang.String content)
type
- Node type : TEXT_NODE, TAG_NODE or COMMENT_NODEcontent
- the tag contentMethod Detail |
public void setDocument(Document doc)
public Document getDocument()
public SimpleNode clone(boolean deep)
true
public void setSimpleParent(SimpleNode node)
public SimpleNode getSimpleParent()
public boolean isRoot()
public void setContent(java.lang.String content)
public java.lang.String getContent()
public void setType(int type)
public int getType()
public boolean isText()
public boolean isTag()
public boolean isComment()
public void insertChildNode(int index, SimpleNode node)
public void addChildNode(SimpleNode node)
public void removeChildNode(SimpleNode node)
public int childNodeIndex(SimpleNode node)
public int childCount()
public java.util.Enumeration getAllChild()
public SimpleNode childAt(int index)
public boolean isLeaf()
public void setAttribute(java.lang.String name, java.lang.String value)
public java.lang.String getAttribute(java.lang.String name)
public boolean hasAttribute(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
public void setNodeContent(java.lang.String content)
setNodeContent
in interface MutableNode
public java.lang.String getNodeContent()
getNodeContent
in interface MutableNode
public void setNodeParent(MutableNode node)
setNodeParent
in interface MutableNode
public void setNodeAttribute(java.lang.String name, java.lang.String value)
setNodeAttribute
in interface MutableNode
public void addNode(MutableNode node)
addNode
in interface MutableNode
public java.util.Enumeration getViewAttributes()
getViewAttributes
in interface ViewableNode
public java.lang.String getViewAttribute(java.lang.String name)
getViewAttribute
in interface ViewableNode
public java.lang.String getViewContent()
getViewContent
in interface ViewableNode
public boolean isViewLeaf()
isViewLeaf
in interface ViewableNode
public int getViewChildCount()
getViewChildCount
in interface ViewableNode
public ViewableNode getViewChildAt(int i)
getViewChildAt
in interface ViewableNode
public boolean isViewText()
isViewText
in interface ViewableNode
public boolean isViewComment()
isViewComment
in interface ViewableNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |