Class XPath2NodeFilter

java.lang.Object
org.apache.xml.security.transforms.implementations.XPath2NodeFilter
All Implemented Interfaces:
NodeFilter

class XPath2NodeFilter extends Object implements NodeFilter
  • Field Details

    • hasUnionFilter

      boolean hasUnionFilter
    • hasSubtractFilter

      boolean hasSubtractFilter
    • hasIntersectFilter

      boolean hasIntersectFilter
    • unionNodes

      Set<Node> unionNodes
    • subtractNodes

      Set<Node> subtractNodes
    • intersectNodes

      Set<Node> intersectNodes
    • inSubtract

      int inSubtract
    • inIntersect

      int inIntersect
    • inUnion

      int inUnion
  • Constructor Details

  • Method Details

    • isNodeInclude

      public int isNodeInclude(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:
    • isNodeIncludeDO

      public int isNodeIncludeDO(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(Node currentNode, Set<Node> nodeList)
      Method rooted
      Parameters:
      currentNode -
      nodeList -
      Returns:
      if rooted bye the rootnodes
    • inList

      static boolean inList(Node currentNode, Set<Node> nodeList)
      Method rooted
      Parameters:
      currentNode -
      nodeList -
      Returns:
      if rooted bye the rootnodes
    • convertNodeListToSet

      private static Set<Node> convertNodeListToSet(List<NodeList> l)