Class XPath2FilterContainer
java.lang.Object
org.apache.xml.security.utils.ElementProxy
org.apache.xml.security.transforms.params.XPath2FilterContainer
- All Implemented Interfaces:
TransformParam
Implements the parameters for the XPath Filter v2.0.
- Author:
- $Author$
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Field _TAG_XPATH2static final String
Field INTERSECTstatic final String
Field SUBTRACTstatic final String
Field UNIONstatic final String
Field XPathFiler2NSFields inherited from class org.apache.xml.security.utils.ElementProxy
_baseURI, _constructionElement, _doc, _state, MODE_CREATE, MODE_DECRYPT, MODE_ENCRYPT, MODE_PROCESS, MODE_SIGN, MODE_UNKNOWN, MODE_VERIFY
-
Method Summary
Modifier and TypeMethodDescriptionfinal String
Method getBaseLocalNamefinal String
Method getBaseNamespaceReturns the XPath 2 Filter StringReturns the first Text node which contains information from the XPath 2 Filter String.boolean
Returnstrue
if theFilter
attribute has value "intersect".boolean
Returnstrue
if theFilter
attribute has value "subtract".boolean
isUnion()
Returnstrue
if theFilter
attribute has value "union".static XPath2FilterContainer
newInstance
(Element element, String BaseURI) Creates a XPath2FilterContainer from an existing Element; needed for verification.static XPath2FilterContainer
newInstanceIntersect
(Document doc, String xpath2filter) Creates a new XPath2FilterContainer with the filter type "intersect".static NodeList
newInstances
(Document doc, String[][] params) Method newInstancesstatic XPath2FilterContainer
newInstanceSubtract
(Document doc, String xpath2filter) Creates a new XPath2FilterContainer with the filter type "subtract".static XPath2FilterContainer
newInstanceUnion
(Document doc, String xpath2filter) Creates a new XPath2FilterContainer with the filter type "union".Methods inherited from class org.apache.xml.security.utils.ElementProxy
addBase64Element, addBase64Text, addBigIntegerElement, addText, addTextElement, createElementForFamily, getBaseURI, getBigIntegerFromChildElement, getBytesFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getTextFromChildElement, getTextFromTextChild, guaranteeThatElementInCorrectSpace, length, setDefaultPrefix, setElement, setXPathNamespaceContext
-
Field Details
-
INTERSECT
Field INTERSECT- See Also:
-
SUBTRACT
Field SUBTRACT- See Also:
-
UNION
Field UNION- See Also:
-
_TAG_XPATH2
Field _TAG_XPATH2- See Also:
-
XPathFilter2NS
Field XPathFiler2NS- See Also:
-
-
Method Details
-
newInstanceIntersect
Creates a new XPath2FilterContainer with the filter type "intersect".- Parameters:
doc
-xpath2filter
-- Returns:
- the filter.
-
newInstanceSubtract
Creates a new XPath2FilterContainer with the filter type "subtract".- Parameters:
doc
-xpath2filter
-- Returns:
- the filter.
-
newInstanceUnion
Creates a new XPath2FilterContainer with the filter type "union".- Parameters:
doc
-xpath2filter
-- Returns:
- the filter
-
newInstances
Method newInstances- Parameters:
doc
-params
-- Returns:
- the nodelist with the data
-
newInstance
public static XPath2FilterContainer newInstance(Element element, String BaseURI) throws XMLSecurityException Creates a XPath2FilterContainer from an existing Element; needed for verification.- Parameters:
element
-BaseURI
-- Returns:
- the filter
- Throws:
XMLSecurityException
-
isIntersect
public boolean isIntersect()Returnstrue
if theFilter
attribute has value "intersect".- Returns:
true
if theFilter
attribute has value "intersect".
-
isSubtract
public boolean isSubtract()Returnstrue
if theFilter
attribute has value "subtract".- Returns:
true
if theFilter
attribute has value "subtract".
-
isUnion
public boolean isUnion()Returnstrue
if theFilter
attribute has value "union".- Returns:
true
if theFilter
attribute has value "union".
-
getXPathFilterStr
Returns the XPath 2 Filter String- Returns:
- the XPath 2 Filter String
-
getXPathFilterTextNode
Returns the first Text node which contains information from the XPath 2 Filter String. We must use this stupid hook to enable the here() function to work. $todo$ I dunno whether this crashes:here()/ds:Signature[1] - Returns:
- the first Text node which contains information from the XPath 2 Filter String
-
getBaseLocalName
Method getBaseLocalName- Specified by:
getBaseLocalName
in classElementProxy
- Returns:
- the XPATH2 tag
-
getBaseNamespace
Method getBaseNamespace- Specified by:
getBaseNamespace
in classElementProxy
- Returns:
- XPATH2 tag namespace
-