Class XPath2NodeFilter
- java.lang.Object
-
- org.apache.xml.security.transforms.implementations.XPath2NodeFilter
-
- All Implemented Interfaces:
NodeFilter
class XPath2NodeFilter extends java.lang.Object implements NodeFilter
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
hasIntersectFilter
(package private) boolean
hasSubtractFilter
(package private) boolean
hasUnionFilter
(package private) int
inIntersect
(package private) int
inSubtract
(package private) java.util.Set<org.w3c.dom.Node>
intersectNodes
(package private) int
inUnion
(package private) java.util.Set<org.w3c.dom.Node>
subtractNodes
(package private) java.util.Set<org.w3c.dom.Node>
unionNodes
-
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 rootedint
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
-
-
-
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
-
-
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 interfaceNodeFilter
- 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 interfaceNodeFilter
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)
-
-