org.mozilla.javascript.xmlimpl
Class AxiomNode

java.lang.Object
  extended by org.mozilla.javascript.xmlimpl.AxiomNode

public class AxiomNode
extends Object

value of type XML represents an XML element, attribute, comment, processing-instruction or text node. EcmaScript - 357 specification. But in axiom element,comment,processing-instruction and text node implement the OMNode interface. attribute implements OMAttribute interface. AxiomNode is written to wrap those two types into a one class.


Field Summary
static int APPEND_CHILD
           
static String DESCENDEN_ATTRIBUTE_MATCHER
           
static String DESCENDENT_CHILDREN_MATCHER
           
static String INVALID_CHILD_INDEX
           
static HashMap matcherMap
           
static String NODE_MATCHER
           
static int PREPEND_CHILD
           
static String UNSUPPORTED_OP
           
 
Method Summary
 void addInScopeNamespace(Namespace value)
           
 AxiomNode childAt(int index)
          Retrieve the (index)th child of the current element and covered in an AxiomNode
 org.apache.axiom.om.OMNode cloneOMNode()
          Clone this OMNode.
 boolean detach()
          Detach this AxiomNode form the its Parent Elment
 XMLList getChildElements(XMLName xmlName, XMLList xmlList)
           
 int getChildIndex()
           
 XML getElemetFromText(XMLLibImpl lib, XMLName xmlName, String value)
           
 Object[] getInScopeNamespace(XMLLibImpl lib)
           
 org.apache.axiom.om.OMAttribute getOMAttribute()
           
 org.apache.axiom.om.OMComment getOMComment()
           
 org.apache.axiom.om.OMElement getOMElement()
           
 org.apache.axiom.om.OMFactory getOMFactory()
           
 org.apache.axiom.om.OMNode getOMNode()
           
 org.apache.axiom.om.OMProcessingInstruction getOMProcessingInstruction()
           
 org.apache.axiom.om.OMText getOMText()
           
 AxiomNode getParentNode()
           
 javax.xml.namespace.QName getQName()
          If this AxiomNode represents a Comment or a Text Node QName will be null;
 XML getXMLObject(XMLLibImpl lib)
           
 void insertChild(AxiomNode refNode, AxiomNode nodeToInsert, int mode)
           
 boolean isAttribute()
           
 boolean isComment()
           
 boolean isElement()
           
 boolean isNull()
           
 boolean isOMNode()
           
 boolean isProcessingInstruction()
           
 boolean isText()
           
 XMLList matchNodes(XMLName xmlName, XMLList xmlList, int type)
           
 void removeChild(AxiomNode axiomNode)
           
 void setNodeMatcher(String matcherName)
          Set the corresponding matcher inner class.
 void setParentNode(AxiomNode parentNode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPEND_CHILD

public static final int APPEND_CHILD
See Also:
Constant Field Values

PREPEND_CHILD

public static final int PREPEND_CHILD
See Also:
Constant Field Values

UNSUPPORTED_OP

public static final String UNSUPPORTED_OP
See Also:
Constant Field Values

INVALID_CHILD_INDEX

public static final String INVALID_CHILD_INDEX
See Also:
Constant Field Values

NODE_MATCHER

public static final String NODE_MATCHER
See Also:
Constant Field Values

DESCENDENT_CHILDREN_MATCHER

public static final String DESCENDENT_CHILDREN_MATCHER
See Also:
Constant Field Values

DESCENDEN_ATTRIBUTE_MATCHER

public static final String DESCENDEN_ATTRIBUTE_MATCHER
See Also:
Constant Field Values

matcherMap

public static final HashMap matcherMap
Method Detail

addInScopeNamespace

public void addInScopeNamespace(Namespace value)

childAt

public AxiomNode childAt(int index)
Retrieve the (index)th child of the current element and covered in an AxiomNode

Parameters:
index - (zero-based) of the child to retrieved
Returns:
the child element at index

cloneOMNode

public org.apache.axiom.om.OMNode cloneOMNode()
Clone this OMNode. Cloning depends on the type of the OMNode

Returns:
Cloned OMNode

detach

public boolean detach()
Detach this AxiomNode form the its Parent Elment

Returns:
whether this AxiomNode is detached from the parent Element

getChildElements

public XMLList getChildElements(XMLName xmlName,
                                XMLList xmlList)

getChildIndex

public int getChildIndex()

getElemetFromText

public XML getElemetFromText(XMLLibImpl lib,
                             XMLName xmlName,
                             String value)

getInScopeNamespace

public Object[] getInScopeNamespace(XMLLibImpl lib)

getOMAttribute

public org.apache.axiom.om.OMAttribute getOMAttribute()

getOMComment

public org.apache.axiom.om.OMComment getOMComment()

getOMElement

public org.apache.axiom.om.OMElement getOMElement()

getOMFactory

public org.apache.axiom.om.OMFactory getOMFactory()

getOMNode

public org.apache.axiom.om.OMNode getOMNode()

getOMProcessingInstruction

public org.apache.axiom.om.OMProcessingInstruction getOMProcessingInstruction()

getOMText

public org.apache.axiom.om.OMText getOMText()

getParentNode

public AxiomNode getParentNode()

getQName

public javax.xml.namespace.QName getQName()
If this AxiomNode represents a Comment or a Text Node QName will be null;

Returns:
QName of this AxiomNode

getXMLObject

public XML getXMLObject(XMLLibImpl lib)

insertChild

public void insertChild(AxiomNode refNode,
                        AxiomNode nodeToInsert,
                        int mode)

isAttribute

public boolean isAttribute()

isComment

public boolean isComment()

isElement

public boolean isElement()

isNull

public boolean isNull()

isOMNode

public boolean isOMNode()

isProcessingInstruction

public boolean isProcessingInstruction()

isText

public boolean isText()

matchNodes

public XMLList matchNodes(XMLName xmlName,
                          XMLList xmlList,
                          int type)

removeChild

public void removeChild(AxiomNode axiomNode)

setNodeMatcher

public void setNodeMatcher(String matcherName)
Set the corresponding matcher inner class. Instances of the inners classes are stored in a HashMap,

Parameters:
matcherName -

setParentNode

public void setParentNode(AxiomNode parentNode)


Copyright © 2012 WSO2. All Rights Reserved.