Class AbstractParentNode

    • Constructor Detail

      • AbstractParentNode

        public AbstractParentNode()
    • Method Detail

      • getChildNodes

        public org.w3c.dom.NodeList getChildNodes()
        DOM: Implements Node.getChildNodes().
        Specified by:
        getChildNodes in interface org.w3c.dom.Node
        Overrides:
        getChildNodes in class AbstractNode
        Returns:
        childNodes
      • getFirstChild

        public org.w3c.dom.Node getFirstChild()
        DOM: Implements Node.getFirstChild().
        Specified by:
        getFirstChild in interface org.w3c.dom.Node
        Overrides:
        getFirstChild in class AbstractNode
        Returns:
        childNodes.firstChild
      • getLastChild

        public org.w3c.dom.Node getLastChild()
        DOM: Implements Node.getLastChild().
        Specified by:
        getLastChild in interface org.w3c.dom.Node
        Overrides:
        getLastChild in class AbstractNode
        Returns:
        childNodes.lastChild
      • insertBefore

        public org.w3c.dom.Node insertBefore​(org.w3c.dom.Node newChild,
                                             org.w3c.dom.Node refChild)
                                      throws org.w3c.dom.DOMException
        DOM: Implements Node.insertBefore(Node, Node).
        Specified by:
        insertBefore in interface org.w3c.dom.Node
        Overrides:
        insertBefore in class AbstractNode
        Throws:
        org.w3c.dom.DOMException
      • replaceChild

        public org.w3c.dom.Node replaceChild​(org.w3c.dom.Node newChild,
                                             org.w3c.dom.Node oldChild)
                                      throws org.w3c.dom.DOMException
        DOM: Implements Node.replaceChild(Node, Node).
        Specified by:
        replaceChild in interface org.w3c.dom.Node
        Overrides:
        replaceChild in class AbstractNode
        Throws:
        org.w3c.dom.DOMException
      • removeChild

        public org.w3c.dom.Node removeChild​(org.w3c.dom.Node oldChild)
                                     throws org.w3c.dom.DOMException
        DOM: Implements Node.removeChild(Node).
        Specified by:
        removeChild in interface org.w3c.dom.Node
        Overrides:
        removeChild in class AbstractNode
        Throws:
        org.w3c.dom.DOMException
      • appendChild

        public org.w3c.dom.Node appendChild​(org.w3c.dom.Node newChild)
                                     throws org.w3c.dom.DOMException
        DOM: Implements Node.appendChild(Node).
        Specified by:
        appendChild in interface org.w3c.dom.Node
        Overrides:
        appendChild in class AbstractNode
        Throws:
        org.w3c.dom.DOMException
      • hasChildNodes

        public boolean hasChildNodes()
        DOM: Implements Node.hasChildNodes().
        Specified by:
        hasChildNodes in interface org.w3c.dom.Node
        Overrides:
        hasChildNodes in class AbstractNode
        Returns:
        true if this node has children, false otherwise.
      • normalize

        public void normalize()
        DOM: Implements Node.normalize().
        Specified by:
        normalize in interface org.w3c.dom.Node
        Overrides:
        normalize in class AbstractNode
      • getElementsByTagName

        public org.w3c.dom.NodeList getElementsByTagName​(java.lang.String name)
        DOM: Implements Element.getElementsByTagName(String).
      • getElementsByTagNameNS

        public org.w3c.dom.NodeList getElementsByTagNameNS​(java.lang.String namespaceURI,
                                                           java.lang.String localName)
        DOM: Implements Element.getElementsByTagNameNS(String,String).
      • getTextContent

        public java.lang.String getTextContent()
        DOM: Implements Node.getTextContent().
        Specified by:
        getTextContent in interface org.w3c.dom.Node
        Overrides:
        getTextContent in class AbstractNode
      • nodeAdded

        protected void nodeAdded​(org.w3c.dom.Node n)
        Called when a child node has been added.
      • nodeToBeRemoved

        protected void nodeToBeRemoved​(org.w3c.dom.Node n)
        Called when a child node is going to be removed.
      • deepExport

        protected org.w3c.dom.Node deepExport​(org.w3c.dom.Node n,
                                              AbstractDocument d)
        Deeply exports this node to the given document.
        Overrides:
        deepExport in class AbstractNode
      • deepCopyInto

        protected org.w3c.dom.Node deepCopyInto​(org.w3c.dom.Node n)
        Deeply copy the fields of the current node into the given node.
        Overrides:
        deepCopyInto in class AbstractNode
        Parameters:
        n - a node of the type of this.
      • fireDOMSubtreeModifiedEvent

        protected void fireDOMSubtreeModifiedEvent()
        Fires a DOMSubtreeModified event.
      • fireDOMNodeInsertedEvent

        protected void fireDOMNodeInsertedEvent​(org.w3c.dom.Node node)
        Fires a DOMNodeInserted event.
      • fireDOMNodeRemovedEvent

        protected void fireDOMNodeRemovedEvent​(org.w3c.dom.Node node)
        Fires a DOMNodeRemoved event.
      • checkAndRemove

        protected void checkAndRemove​(org.w3c.dom.Node n,
                                      boolean replace)
        Checks the validity of a node to be inserted, and removes it from the document if needed.