| java.lang.Object org.enhydra.xml.NodeImpl org.enhydra.xml.ElementImpl org.enhydra.xml.HashMapElement
All known Subclasses: org.enhydra.xml.SearchElement,
Constructor Summary | |
public | HashMapElement() Constructs an empty HashMapElement . | public | HashMapElement(HashMapElement element) Constructs a HashMapElement from the given node,
without creating entire children subtree. | public | HashMapElement(Document ownerDoc, String name) Constructs an HashMapElement with the given
document owner and node name. | protected | HashMapElement(Document ownerDoc, String nodeName, short type, String value) Constructs an HashMapElement with the given
document owner, node name, node type and node value. | public | HashMapElement(Node node) | public | HashMapElement(Node node, boolean deep) Constructs an HashMapElement from a given node,
as a Node , and deep as boolean . |
Method Summary | |
public Node | cloneNode(boolean deep) Returns a duplicate of this node. | public NodeList | getChildrenByTagName(String name) Returns the list of all children nodes with the given tag name.
Parameters: name - tag name. | public NodeList | getElementsByTagName(String name) Returns all Element nodes with given name,
searching by all sub nodes from this node.
Parameters: name - tag name. | public Element | getFirstChildByTagName(String name) Returns the first child Element with the given tag name.
Parameters: name - tag name. | public Element | getNextSameNameNode() Returns the next Element node (if exists) with the same tag name. | public String | getText() Returns the concatenation of values of all text type children. | public boolean | hasElementChildNodes() Returns true if this node has child nodes. | public Node | insertBefore(Node newChild, Node refChild) Inserts the node newChild before the existing
child node refChild . | protected Node | newElementInstance(Node node) Creates new instance of the HashMapElement class from the given Node .
node, as a Node . | public static Element | newInstance(Document document) Creates new instance of HashMapElement from a given document
as a Document .
Parameters: document - document. | public Node | removeChild(Node oldChild) Removes the child node indicated by oldChild from
the list of children, and returns it.
Parameters: oldChild - the Node to be removed. | public Node | replaceChild(Node newChild, Node oldChild) Replaces the child node oldChild with
newChild in the list of children, and returns the
oldChild node.
Parameters: newChild - the Node to insert. Parameters: oldChild - the Node to be replaced. | public void | setText(String text) Set the value of the first text child node to the given text,
and remove all other text child nodes. |
children | protected HashMap children(Code) | | All Element type children of this Element
|
HashMapElement | public HashMapElement()(Code) | | Constructs an empty HashMapElement .
|
HashMapElement | public HashMapElement(HashMapElement element)(Code) | | Constructs a HashMapElement from the given node,
without creating entire children subtree.
element, as a HashMapElement . |
HashMapElement | public HashMapElement(Document ownerDoc, String name)(Code) | | Constructs an HashMapElement with the given
document owner and node name.
Parameters: ownerDoc - the document owner of the node, as a Document . Parameters: nodeName - the name of the node, as a String . |
HashMapElement | protected HashMapElement(Document ownerDoc, String nodeName, short type, String value)(Code) | | Constructs an HashMapElement with the given
document owner, node name, node type and node value.
Parameters: ownerDoc - the document owner of the node, as a Document . Parameters: nodeName - the name of the node, as a String . Parameters: type - the type of the node, as a short . Parameters: value - the value of the node, as a String . |
HashMapElement | public HashMapElement(Node node)(Code) | | Constructs an HashMapElement from a given node
(creates the children subtree too), as a Node
node, as a Node . |
HashMapElement | public HashMapElement(Node node, boolean deep)(Code) | | Constructs an HashMapElement from a given node,
as a Node , and deep as boolean .
node, as a Node . Parameters: deep - if true , recursively clone the subtreeunder the specified node; if false , clone only thenode itself. |
cloneNode | public Node cloneNode(boolean deep)(Code) | | Returns a duplicate of this node. The duplicate node has no
parent (getParentNode returns null ).
If a shallow clone is being performed (deep is
false ), the new node will not have any children or
siblings. If a deep clone is being performed, the new node
will form the root of a complete cloned subtree.
Parameters: deep - if true , recursively clone the subtreeunder the specified node; if false , clone only thenode itself. the duplicate node. |
getChildrenByTagName | public NodeList getChildrenByTagName(String name)(Code) | | Returns the list of all children nodes with the given tag name.
Parameters: name - tag name. the list of all children nodes with the given tag name. |
getElementsByTagName | public NodeList getElementsByTagName(String name)(Code) | | Returns all Element nodes with given name,
searching by all sub nodes from this node.
Parameters: name - tag name. all Element vith given name as NodeList . |
getFirstChildByTagName | public Element getFirstChildByTagName(String name)(Code) | | Returns the first child Element with the given tag name.
Parameters: name - tag name. the first child Element with the given tag name. |
getNextSameNameNode | public Element getNextSameNameNode()(Code) | | Returns the next Element node (if exists) with the same tag name.
the next Element node (if exists) with the same tag name. |
getText | public String getText()(Code) | | Returns the concatenation of values of all text type children.
the concatenation of values of all text type children. |
hasElementChildNodes | public boolean hasElementChildNodes()(Code) | | Returns true if this node has child nodes.
true if this node has children. |
insertBefore | public Node insertBefore(Node newChild, Node refChild)(Code) | | Inserts the node newChild before the existing
child node refChild . If refChild is
null , insert newChild at the end of
the list of children.
Parameters: newChild - the Node to insert. Parameters: refChild - the reference Node . the node being inserted. exception: IllegalArgumentException - if newChild isnull . |
newElementInstance | protected Node newElementInstance(Node node)(Code) | | Creates new instance of the HashMapElement class from the given Node .
node, as a Node . new instance of the HashMapElement class. |
newInstance | public static Element newInstance(Document document)(Code) | | Creates new instance of HashMapElement from a given document
as a Document .
Parameters: document - document. new Element node as a root of the Document . |
removeChild | public Node removeChild(Node oldChild)(Code) | | Removes the child node indicated by oldChild from
the list of children, and returns it.
Parameters: oldChild - the Node to be removed. the node removed. exception: IllegalArgumentException - if oldChild isnull . |
replaceChild | public Node replaceChild(Node newChild, Node oldChild)(Code) | | Replaces the child node oldChild with
newChild in the list of children, and returns the
oldChild node.
Parameters: newChild - the Node to insert. Parameters: oldChild - the Node to be replaced. the node replaced. exception: IllegalArgumentException - if newChild isnull . |
setText | public void setText(String text)(Code) | | Set the value of the first text child node to the given text,
and remove all other text child nodes.
Parameters: text - new text. |
Methods inherited from org.enhydra.xml.ElementImpl | protected void beginToString(StringBuffer sb, Indent indent)(Code)(Java Doc) public Node cloneNode(boolean deep)(Code)(Java Doc) public short compareDocumentPosition(Node arg0) throws DOMException(Code)(Java Doc) protected void endToString(StringBuffer sb, Indent indent)(Code)(Java Doc) public String getAttribute(String name)(Code)(Java Doc) public String getAttributeNS(String namespaceURI, String localName)(Code)(Java Doc) public Attr getAttributeNode(String name)(Code)(Java Doc) public Attr getAttributeNodeNS(String namespaceURI, String localName)(Code)(Java Doc) public NamedNodeMap getAttributes()(Code)(Java Doc) public String getBaseURI()(Code)(Java Doc) public NodeList getElementsByTagName(String name)(Code)(Java Doc) public NodeList getElementsByTagNameNS(String namespaceURI, String localName)(Code)(Java Doc) public Object getFeature(String arg0, String arg1)(Code)(Java Doc) public String getNamespaceURI()(Code)(Java Doc) public TypeInfo getSchemaTypeInfo()(Code)(Java Doc) public String getTagName()(Code)(Java Doc) public String getTextContent() throws DOMException(Code)(Java Doc) public Object getUserData(String arg0)(Code)(Java Doc) public boolean hasAttribute(String name)(Code)(Java Doc) public boolean hasAttributeNS(String namespaceURI, String localName)(Code)(Java Doc) public boolean hasAttributes()(Code)(Java Doc) public boolean hasElementChildNodes()(Code)(Java Doc) public Node insertBefore(Node newChild, Node refChild)(Code)(Java Doc) public boolean isDefaultNamespace(String arg0)(Code)(Java Doc) public boolean isEqualNode(Node arg0)(Code)(Java Doc) public boolean isSameNode(Node arg0)(Code)(Java Doc) public static boolean isValidName(String name)(Code)(Java Doc) public String lookupNamespaceURI(String arg0)(Code)(Java Doc) public String lookupPrefix(String arg0)(Code)(Java Doc) public static Element newInstance(Document document)(Code)(Java Doc) public void removeAttribute(String name)(Code)(Java Doc) public void removeAttributeNS(String namespaceURI, String localName)(Code)(Java Doc) public Attr removeAttributeNode(Attr oldAttr)(Code)(Java Doc) public Node removeChild(Node oldChild)(Code)(Java Doc) public Node replaceChild(Node newChild, Node oldChild)(Code)(Java Doc) public void setAttribute(String name, String value)(Code)(Java Doc) public void setAttributeNS(String namespaceURI, String qualifiedName, String value)(Code)(Java Doc) public Attr setAttributeNode(Attr newAttr) throws DOMException(Code)(Java Doc) public Attr setAttributeNodeNS(Attr newAttr)(Code)(Java Doc) public void setIdAttribute(String arg0, boolean arg1) throws DOMException(Code)(Java Doc) public void setIdAttributeNS(String arg0, String arg1, boolean arg2) throws DOMException(Code)(Java Doc) public void setIdAttributeNode(Attr arg0, boolean arg1) throws DOMException(Code)(Java Doc) public void setTextContent(String arg0) throws DOMException(Code)(Java Doc) public Object setUserData(String arg0, Object arg1, UserDataHandler arg2)(Code)(Java Doc)
|
|
|