| 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 .
Parameters: 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.
Parameters: 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: name - is 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
Parameters: 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 .
Parameters: 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 .
Parameters: 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 | public Node appendChild(Node newChild)(Code)(Java Doc) protected void beginToString(StringBuffer sb, Indent indent)(Code)(Java Doc) protected void checkNode(Node node) throws DOMException(Code)(Java Doc) public Node cloneNode(boolean deep)(Code)(Java Doc) public short compareDocumentPosition(Node other) 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 getChildNodes()(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 feature, String version)(Code)(Java Doc) public Node getFirstChild()(Code)(Java Doc) public Node getLastChild()(Code)(Java Doc) public int getLength()(Code)(Java Doc) public String getLocalName()(Code)(Java Doc) public String getNamespaceURI() throws DOMException(Code)(Java Doc) public Node getNextSibling()(Code)(Java Doc) public String getNodeName()(Code)(Java Doc) public short getNodeType()(Code)(Java Doc) public String getNodeValue()(Code)(Java Doc) public Document getOwnerDocument()(Code)(Java Doc) public Node getParentNode()(Code)(Java Doc) public String getPrefix()(Code)(Java Doc) public Node getPreviousSibling()(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 key)(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 hasChildNodes()(Code)(Java Doc) public boolean hasElementChildNodes()(Code)(Java Doc) protected void initNodeImplChildren(Node node)(Code)(Java Doc) public Node insertBefore(Node newChild, Node refChild)(Code)(Java Doc) public boolean isDefaultNamespace(String namespaceURI)(Code)(Java Doc) public boolean isEqualNode(Node arg)(Code)(Java Doc) public boolean isSameNode(Node other)(Code)(Java Doc) public boolean isSupported(String feature, String version)(Code)(Java Doc) public Node item(int index)(Code)(Java Doc) public String lookupNamespaceURI(String prefix)(Code)(Java Doc) public String lookupPrefix(String namespaceURI)(Code)(Java Doc) protected Node newCommentInstance(Node node)(Code)(Java Doc) protected Node newDefaultInstance(Node node)(Code)(Java Doc) protected Node newElementInstance(Node node)(Code)(Java Doc) public static Element newInstance(Document document)(Code)(Java Doc) protected Node newTextInstance(Node node)(Code)(Java Doc) public void normalize()(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 name, boolean isId) throws DOMException(Code)(Java Doc) public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException(Code)(Java Doc) public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException(Code)(Java Doc) public void setNodeValue(String nodeValue)(Code)(Java Doc) public void setPrefix(String prefix)(Code)(Java Doc) public void setTextContent(String textContent) throws DOMException(Code)(Java Doc) public Object setUserData(String key, Object data, UserDataHandler handler)(Code)(Java Doc) public String toString()(Code)(Java Doc) public String toString(String tab)(Code)(Java Doc)
|
|
|