|
|||||||||||
| 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 |
DOCUMENT_NODE
|
static int |
TAG_NODE
|
static int |
TEXT_NODE
|
| Constructor Summary | |
SimpleNode(int type,
java.lang.String content)
|
|
SimpleNode(com.japisoft.fastparser.node.SimpleNode parent,
int type,
java.lang.String content)
|
|
SimpleNode(java.lang.String content)
Create a tag node |
|
| Method Summary | |
void |
addChildNode(com.japisoft.fastparser.node.SimpleNode node)
Insert a new node |
void |
addNameSpaceDeclaration(java.lang.String prefix,
java.lang.String uri)
Add a declaration for nameSpace |
void |
addNode(com.japisoft.fastparser.node.MutableNode node)
Reset the children |
com.japisoft.fastparser.node.SimpleNode |
childAt(int index)
|
int |
childCount()
|
int |
childNodeIndex(com.japisoft.fastparser.node.SimpleNode node)
|
com.japisoft.fastparser.node.SimpleNode |
clone(boolean deep)
Clone the current node, include subchild if deep is true |
java.lang.String |
closeDeclaration()
|
java.util.Enumeration |
getAllChild()
Get all child |
java.lang.Object |
getApplicationObject()
|
java.lang.String |
getAttribute(java.lang.String qname)
|
java.lang.String |
getAttribute(java.lang.String qname,
java.lang.String defaultValue)
|
java.lang.String |
getCachedXPathLocation()
|
java.lang.String |
getContent()
|
java.lang.String |
getDefaultNamespace()
|
com.japisoft.fastparser.document.Document |
getDocument()
|
java.lang.String |
getFirstAttributeValue()
|
java.util.Enumeration |
getNameSpaceDeclaration()
|
java.lang.String |
getNameSpaceDeclarationURI(java.lang.String prefix)
|
java.util.Enumeration |
getNamespaceDeclared()
|
java.lang.String |
getNameSpacePrefix()
|
java.lang.String |
getNameSpaceURI()
|
java.util.Enumeration |
getNodeByCriteria(com.japisoft.fastparser.walker.ValidCriteria criteria,
boolean deep)
Sample of criteria : new OrCriteria( new NodeNameCriteria( "aa" ), new NodeNameCriteria( "bb" ) ) for
returning 'aa' or 'bb' node. |
java.util.Enumeration |
getNodeByName(java.lang.String name,
boolean deep)
|
java.lang.String |
getNodeContent()
|
com.japisoft.fastparser.node.SimpleNode |
getNodeForXPathLocation(java.lang.String xpath,
boolean resolveAlways)
This feature is limited to a subset of the XPath set : /tag1[ location ]/tag2... |
java.lang.String |
getQualifiedContent()
|
java.lang.String |
getRawXML()
|
com.japisoft.fastparser.node.SimpleNode |
getSimpleParent()
|
int |
getStartingLine()
|
int |
getStartingOffset()
|
int |
getStoppingLine()
|
int |
getStoppingOffset()
|
int |
getType()
|
java.lang.String |
getViewAttribute(java.lang.String name)
|
java.lang.String |
getViewAttributeAt(int index)
|
int |
getViewAttributeCount()
|
java.util.Enumeration |
getViewAttributes()
|
com.japisoft.fastparser.node.ViewableNode |
getViewChildAt(int i)
|
int |
getViewChildCount()
|
java.lang.String |
getViewContent()
|
java.lang.String |
getXPathLocation()
|
java.lang.String |
getXPathLocation(com.japisoft.fastparser.node.SimpleNode node)
|
boolean |
hasAttribute(java.lang.String qname)
|
void |
insertChildNode(int index,
com.japisoft.fastparser.node.SimpleNode node)
Insert a childnode at the index location |
boolean |
isClosedLeaf()
Particular way to know the tag declaration is in the <A/> form rather than <A></A> |
boolean |
isComment()
|
boolean |
isLeaf()
|
boolean |
isNamespaceDeclared(java.lang.String prefix)
|
boolean |
isRoot()
|
boolean |
isTag()
|
boolean |
isText()
|
boolean |
isViewComment()
|
boolean |
isViewLeaf()
|
boolean |
isViewText()
|
boolean |
matchContent(java.lang.String val)
|
java.lang.String |
openDeclaration()
|
void |
removeAllNameSpaceDeclaration()
Remove all the nameSpace declaration |
void |
removeChildNode(com.japisoft.fastparser.node.SimpleNode node)
Remove the following node |
void |
removeChildNodeAt(int index)
|
void |
removeChildrenNodes()
Remove all the children |
void |
removeNameSpaceDeclaration(java.lang.String prefix)
Remove a nameSpace prefix declaration |
void |
replaceChildNode(com.japisoft.fastparser.node.SimpleNode oldNode,
com.japisoft.fastparser.node.SimpleNode newNode)
Replace this oldNode by this newOne |
void |
setApplicationObject(java.lang.Object obj)
Store an application object in this node |
void |
setAttribute(java.lang.String qname,
boolean value)
Reset the attribute value |
void |
setAttribute(java.lang.String qname,
double value)
Reset the attribute value |
void |
setAttribute(java.lang.String qname,
int value)
Reset the attribute value |
void |
setAttribute(java.lang.String qname,
java.lang.String value)
Set the attribute value. |
void |
setClosedLeaf(boolean closedLeaf)
Particular way to know the tag declaration is in the <A/> form rather than <A></A> |
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 |
setDefaultNamespace(java.lang.String namespaceURI)
Reset the default namespace |
void |
setDocument(com.japisoft.fastparser.document.Document doc)
Owner document for this node |
void |
setNameSpace(java.lang.String name,
java.lang.String nameSpaceURI)
Set the namespace |
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(com.japisoft.fastparser.node.MutableNode node)
Reset the node parent |
void |
setSimpleParent(com.japisoft.fastparser.node.SimpleNode node)
reset the parent node |
void |
setStartingLine(int line)
Set the node line location |
void |
setStartingOffset(int i)
|
void |
setStoppingLine(int i)
|
void |
setStoppingOffset(int i)
|
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 |
equals, 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
public static final int DOCUMENT_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(java.lang.String content)
public SimpleNode(com.japisoft.fastparser.node.SimpleNode parent,
int type,
java.lang.String content)
type - Node type : TEXT_NODE, TAG_NODE or COMMENT_NODEcontent - the tag content| Method Detail |
public int getStartingOffset()
getStartingOffset in interface com.japisoft.fastparser.node.ViewableNodepublic int getStoppingOffset()
getStoppingOffset in interface com.japisoft.fastparser.node.ViewableNodepublic void setStartingOffset(int i)
setStartingOffset in interface com.japisoft.fastparser.node.MutableNodei - the current tag starting offsetpublic void setStoppingOffset(int i)
setStoppingOffset in interface com.japisoft.fastparser.node.MutableNodei - the current tag stopping offsetpublic void setStartingLine(int line)
setStartingLine in interface com.japisoft.fastparser.node.MutableNodepublic int getStartingLine()
getStartingLine in interface com.japisoft.fastparser.node.ViewableNodepublic int getStoppingLine()
getStoppingLine in interface com.japisoft.fastparser.node.ViewableNodepublic void setStoppingLine(int i)
setStoppingLine in interface com.japisoft.fastparser.node.MutableNodei - reset the stopping line
public void addNameSpaceDeclaration(java.lang.String prefix,
java.lang.String uri)
addNameSpaceDeclaration in interface com.japisoft.fastparser.node.MutableNodeprefix - NameSpace prefixuri - NameSpace URIpublic void removeNameSpaceDeclaration(java.lang.String prefix)
removeNameSpaceDeclaration in interface com.japisoft.fastparser.node.MutableNodepublic void removeAllNameSpaceDeclaration()
public java.util.Enumeration getNameSpaceDeclaration()
getNameSpaceDeclaration in interface com.japisoft.fastparser.node.ViewableNodepublic java.lang.String getNameSpaceDeclarationURI(java.lang.String prefix)
getNameSpaceDeclarationURI in interface com.japisoft.fastparser.node.ViewableNodepublic boolean isNamespaceDeclared(java.lang.String prefix)
isNamespaceDeclared in interface com.japisoft.fastparser.node.MutableNodepublic java.util.Enumeration getNamespaceDeclared()
getNamespaceDeclared in interface com.japisoft.fastparser.node.MutableNode
public void setNameSpace(java.lang.String name,
java.lang.String nameSpaceURI)
setNameSpace in interface com.japisoft.fastparser.node.MutableNodename - Namespace prefixpublic java.lang.String getNameSpacePrefix()
getNameSpacePrefix in interface com.japisoft.fastparser.node.MutableNodepublic java.lang.String getNameSpaceURI()
getNameSpaceURI in interface com.japisoft.fastparser.node.MutableNodepublic void setDefaultNamespace(java.lang.String namespaceURI)
setDefaultNamespace in interface com.japisoft.fastparser.node.MutableNodepublic java.lang.String getDefaultNamespace()
getDefaultNamespace in interface com.japisoft.fastparser.node.MutableNodepublic void setDocument(com.japisoft.fastparser.document.Document doc)
public com.japisoft.fastparser.document.Document getDocument()
public com.japisoft.fastparser.node.SimpleNode clone(boolean deep)
true
public void setSimpleParent(com.japisoft.fastparser.node.SimpleNode node)
public com.japisoft.fastparser.node.SimpleNode getSimpleParent()
public boolean isRoot()
public void setContent(java.lang.String content)
public java.lang.String getContent()
public boolean matchContent(java.lang.String val)
public java.lang.String getQualifiedContent()
public void setType(int type)
public int getType()
public boolean isText()
public boolean isTag()
public boolean isComment()
public void insertChildNode(int index,
com.japisoft.fastparser.node.SimpleNode node)
public void replaceChildNode(com.japisoft.fastparser.node.SimpleNode oldNode,
com.japisoft.fastparser.node.SimpleNode newNode)
public void addChildNode(com.japisoft.fastparser.node.SimpleNode node)
public void removeChildrenNodes()
public void removeChildNode(com.japisoft.fastparser.node.SimpleNode node)
public void removeChildNodeAt(int index)
public int childNodeIndex(com.japisoft.fastparser.node.SimpleNode node)
public int childCount()
public java.util.Enumeration getAllChild()
public com.japisoft.fastparser.node.SimpleNode childAt(int index)
public boolean isLeaf()
public void setAttribute(java.lang.String qname,
java.lang.String value)
qname - Qualified name (namespace prefix + local name )value - value for this attribute
public void setAttribute(java.lang.String qname,
int value)
public void setAttribute(java.lang.String qname,
double value)
public void setAttribute(java.lang.String qname,
boolean value)
public java.lang.String getAttribute(java.lang.String qname,
java.lang.String defaultValue)
public java.lang.String getFirstAttributeValue()
public java.util.Enumeration getNodeByName(java.lang.String name,
boolean deep)
public java.util.Enumeration getNodeByCriteria(com.japisoft.fastparser.walker.ValidCriteria criteria,
boolean deep)
new OrCriteria( new NodeNameCriteria( "aa" ), new NodeNameCriteria( "bb" ) ) for
returning 'aa' or 'bb' node.
public java.lang.String getAttribute(java.lang.String qname)
public boolean hasAttribute(java.lang.String qname)
public java.lang.String toString()
toString in class java.lang.Objectpublic void setNodeContent(java.lang.String content)
setNodeContent in interface com.japisoft.fastparser.node.MutableNodepublic java.lang.String getNodeContent()
getNodeContent in interface com.japisoft.fastparser.node.MutableNodepublic void setNodeParent(com.japisoft.fastparser.node.MutableNode node)
setNodeParent in interface com.japisoft.fastparser.node.MutableNode
public void setNodeAttribute(java.lang.String name,
java.lang.String value)
setNodeAttribute in interface com.japisoft.fastparser.node.MutableNodepublic void addNode(com.japisoft.fastparser.node.MutableNode node)
addNode in interface com.japisoft.fastparser.node.MutableNodepublic java.util.Enumeration getViewAttributes()
getViewAttributes in interface com.japisoft.fastparser.node.ViewableNodepublic java.lang.String getViewAttributeAt(int index)
public int getViewAttributeCount()
public java.lang.String getViewAttribute(java.lang.String name)
getViewAttribute in interface com.japisoft.fastparser.node.ViewableNodepublic java.lang.String getViewContent()
getViewContent in interface com.japisoft.fastparser.node.ViewableNodepublic boolean isViewLeaf()
isViewLeaf in interface com.japisoft.fastparser.node.ViewableNodepublic int getViewChildCount()
getViewChildCount in interface com.japisoft.fastparser.node.ViewableNodepublic com.japisoft.fastparser.node.ViewableNode getViewChildAt(int i)
getViewChildAt in interface com.japisoft.fastparser.node.ViewableNodepublic boolean isViewText()
isViewText in interface com.japisoft.fastparser.node.ViewableNodepublic boolean isViewComment()
isViewComment in interface com.japisoft.fastparser.node.ViewableNode
public com.japisoft.fastparser.node.SimpleNode getNodeForXPathLocation(java.lang.String xpath,
boolean resolveAlways)
public java.lang.String getXPathLocation()
public java.lang.String getCachedXPathLocation()
public java.lang.String getXPathLocation(com.japisoft.fastparser.node.SimpleNode node)
public java.lang.String getRawXML()
public java.lang.String openDeclaration()
public java.lang.String closeDeclaration()
public void setClosedLeaf(boolean closedLeaf)
setClosedLeaf in interface com.japisoft.fastparser.node.MutableNodepublic boolean isClosedLeaf()
public void setApplicationObject(java.lang.Object obj)
public java.lang.Object getApplicationObject()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||