Class XPath2NodeFilter

  • All Implemented Interfaces:
    NodeFilter

    class XPath2NodeFilter
    extends java.lang.Object
    implements NodeFilter
    • Constructor Summary

      Constructors 
      Constructor Description
      XPath2NodeFilter​(java.util.List<org.w3c.dom.NodeList> unionNodes, java.util.List<org.w3c.dom.NodeList> subtractNodes, java.util.List<org.w3c.dom.NodeList> intersectNodes)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.util.Set<org.w3c.dom.Node> convertNodeListToSet​(java.util.List<org.w3c.dom.NodeList> l)  
      (package private) static boolean inList​(org.w3c.dom.Node currentNode, java.util.Set<org.w3c.dom.Node> nodeList)
      Method rooted
      int isNodeInclude​(org.w3c.dom.Node currentNode)
      Tells if a node must be output in c14n.
      int isNodeIncludeDO​(org.w3c.dom.Node n, int level)
      Tells if a node must be output in a c14n.
      (package private) static boolean rooted​(org.w3c.dom.Node currentNode, java.util.Set<org.w3c.dom.Node> nodeList)
      Method rooted
      • Methods inherited from class java.lang.Object

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

      • hasUnionFilter

        boolean hasUnionFilter
      • hasSubtractFilter

        boolean hasSubtractFilter
      • hasIntersectFilter

        boolean hasIntersectFilter
      • unionNodes

        java.util.Set<org.w3c.dom.Node> unionNodes
      • subtractNodes

        java.util.Set<org.w3c.dom.Node> subtractNodes
      • intersectNodes

        java.util.Set<org.w3c.dom.Node> intersectNodes
      • inSubtract

        int inSubtract
      • inIntersect

        int inIntersect
      • inUnion

        int inUnion
    • Constructor Detail

      • XPath2NodeFilter

        XPath2NodeFilter​(java.util.List<org.w3c.dom.NodeList> unionNodes,
                         java.util.List<org.w3c.dom.NodeList> subtractNodes,
                         java.util.List<org.w3c.dom.NodeList> intersectNodes)
    • Method Detail

      • isNodeInclude

        public int isNodeInclude​(org.w3c.dom.Node currentNode)
        Description copied from interface: NodeFilter
        Tells if a node must be output in c14n.
        Specified by:
        isNodeInclude in interface NodeFilter
        Returns:
        1 if the node should be output. 0 if node must not be output, -1 if the node and all it's child must not be output.
        See Also:
        NodeFilter.isNodeInclude(org.w3c.dom.Node)
      • isNodeIncludeDO

        public int isNodeIncludeDO​(org.w3c.dom.Node n,
                                   int level)
        Description copied from interface: NodeFilter
        Tells if a node must be output in a c14n. The caller must assured that this method is always call in document order. The implementations can use this restriction to optimize the transformation.
        Specified by:
        isNodeIncludeDO in interface NodeFilter
        level - the relative level in the tree
        Returns:
        1 if the node should be output. 0 if node must not be output, -1 if the node and all it's child must not be output.
      • rooted

        static boolean rooted​(org.w3c.dom.Node currentNode,
                              java.util.Set<org.w3c.dom.Node> nodeList)
        Method rooted
        Parameters:
        currentNode -
        nodeList -
        Returns:
        if rooted bye the rootnodes
      • inList

        static boolean inList​(org.w3c.dom.Node currentNode,
                              java.util.Set<org.w3c.dom.Node> nodeList)
        Method rooted
        Parameters:
        currentNode -
        nodeList -
        Returns:
        if rooted bye the rootnodes
      • convertNodeListToSet

        private static java.util.Set<org.w3c.dom.Node> convertNodeListToSet​(java.util.List<org.w3c.dom.NodeList> l)