com.redspr.beanldom.stree
Class ElementForBean

java.lang.Object
  |
  +--com.redspr.beanldom.stree.NodeImpl
        |
        +--com.redspr.beanldom.stree.ChildNode
              |
              +--com.redspr.beanldom.stree.ElementBase
                    |
                    +--com.redspr.beanldom.stree.ElementForBean
All Implemented Interfaces:
Element, NamedNodeMap, Node

public final class ElementForBean
extends ElementBase
implements NamedNodeMap

ldom node maps to a java bean. Strangely it gets its name from its parent.

Author:
Sam Hough

Field Summary
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Method Summary
 NamedNodeMap getAttributes()
           
 Node getFirstChild()
          return all the indexed/list getters
 Node getLastChild()
           
 int getLength()
          return number of attributes
 boolean hasChildNodes()
           
 Node item(int index)
          Get a child Node by its index XXX must be a way to make this simpler/quicker it gets called a LOT
 
Methods inherited from class com.redspr.beanldom.stree.ElementBase
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getNamedItem, getNamedItemNS, getNodeName, getNodeType, getOwnerDocument, getTagName, hasAttribute, hasAttributeNS, hasAttributes, removeAttribute, removeAttributeNode, removeAttributeNS, removeNamedItem, removeNamedItemNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setNamedItem, setNamedItemNS
 
Methods inherited from class com.redspr.beanldom.stree.ChildNode
getNextSibling, getParentNode, getPreviousSibling, setNextSibling, setPreviousSibling
 
Methods inherited from class com.redspr.beanldom.stree.NodeImpl
appendChild, cloneNode, getChildNodes, getLocalName, getNamespaceURI, getNodeValue, getPrefix, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.NamedNodeMap
getNamedItem, getNamedItemNS, removeNamedItem, removeNamedItemNS, setNamedItem, setNamedItemNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getChildNodes, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Method Detail

getFirstChild

public Node getFirstChild()
return all the indexed/list getters

Specified by:
getFirstChild in interface Node
Overrides:
getFirstChild in class NodeImpl

getLastChild

public Node getLastChild()
Specified by:
getLastChild in interface Node
Overrides:
getLastChild in class NodeImpl

hasChildNodes

public boolean hasChildNodes()
Specified by:
hasChildNodes in interface Node
Overrides:
hasChildNodes in class NodeImpl

getAttributes

public NamedNodeMap getAttributes()
Specified by:
getAttributes in interface Node
Overrides:
getAttributes in class NodeImpl

item

public Node item(int index)
Get a child Node by its index XXX must be a way to make this simpler/quicker it gets called a LOT

Specified by:
item in interface NamedNodeMap

getLength

public int getLength()
return number of attributes

Specified by:
getLength in interface NamedNodeMap