Class AbstractNodeTester

  • All Implemented Interfaces:
    NodeTester

    public abstract class AbstractNodeTester
    extends java.lang.Object
    implements NodeTester
    Helper class. Abstract interface implementation that performs Node-type checks and delegates testNode() processing to subclass.
    See Also:
    NodeTest
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void noMoreNodes​(NodeTest forTest)
      Validate that the Nodes validated one-by-one in the isValid method were all the Nodes expected.
      void testAttribute​(org.w3c.dom.Attr attribute)
      Template delegator for testNode() method.
      void testCDATASection​(org.w3c.dom.CDATASection cdata)
      Template delegator for testNode() method.
      void testComment​(org.w3c.dom.Comment comment)
      Template delegator for testNode() method.
      void testDocumentType​(org.w3c.dom.DocumentType doctype)
      Template delegator for testNode() method.
      void testElement​(org.w3c.dom.Element element)
      Template delegator for testNode() method.
      void testEntity​(org.w3c.dom.Entity entity)
      Template delegator for testNode() method.
      void testEntityReference​(org.w3c.dom.EntityReference reference)
      Template delegator for testNode() method.
      void testNode​(org.w3c.dom.Node aNode, NodeTest forTest)
      Validate a single Node by delegating to node type specific methods.
      void testNotation​(org.w3c.dom.Notation notation)
      Template delegator for testNode() method.
      void testProcessingInstruction​(org.w3c.dom.ProcessingInstruction instr)
      Template delegator for testNode() method.
      void testText​(org.w3c.dom.Text text)
      Template delegator for testNode() method.
      private void unhandled​(org.w3c.dom.Node aNode)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractNodeTester

        public AbstractNodeTester()
    • Method Detail

      • testAttribute

        public void testAttribute​(org.w3c.dom.Attr attribute)
                           throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        attribute - the attribute to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testCDATASection

        public void testCDATASection​(org.w3c.dom.CDATASection cdata)
                              throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        cdata - the CDATA section to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testComment

        public void testComment​(org.w3c.dom.Comment comment)
                         throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        comment - the comment to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testDocumentType

        public void testDocumentType​(org.w3c.dom.DocumentType doctype)
                              throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        doctype - the cofument type to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testElement

        public void testElement​(org.w3c.dom.Element element)
                         throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        element - the element to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testEntity

        public void testEntity​(org.w3c.dom.Entity entity)
                        throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        entity - the entity to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testEntityReference

        public void testEntityReference​(org.w3c.dom.EntityReference reference)
                                 throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        reference - the reference to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testNotation

        public void testNotation​(org.w3c.dom.Notation notation)
                          throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        notation - the notation to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testProcessingInstruction

        public void testProcessingInstruction​(org.w3c.dom.ProcessingInstruction instr)
                                       throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        instr - the processing instruction to test
        Throws:
        NodeTestException - always: override if required in subclass
      • testText

        public void testText​(org.w3c.dom.Text text)
                      throws NodeTestException
        Template delegator for testNode() method. OVERRIDE to add custom logic
        Parameters:
        text - the text to test
        Throws:
        NodeTestException - always: override if required in subclass
      • noMoreNodes

        public void noMoreNodes​(NodeTest forTest)
                         throws NodeTestException
        Validate that the Nodes validated one-by-one in the isValid method were all the Nodes expected. By default do nothing: can override to add custom logic
        Specified by:
        noMoreNodes in interface NodeTester
        Parameters:
        forTest - the test to perform
        Throws:
        NodeTestException - if mode Nodes were expected