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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringField _ATT_FILTERprivate static final StringField _ATT_FILTER_VALUE_INTERSECTprivate static final StringField _ATT_FILTER_VALUE_SUBTRACTprivate static final StringField _ATT_FILTER_VALUE_UNIONstatic final StringField _TAG_XPATH2static final StringField INTERSECTstatic final StringField SUBTRACTstatic final StringField UNIONstatic final StringField XPathFiler2NSFields inherited from class ElementProxy
baseURI, LOG -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstructor XPath2FilterContainerprivateXPath2FilterContainer(Document doc, String xpath2filter, String filterType) Constructor XPath2FilterContainerprivateXPath2FilterContainer(Element element, String baseURI) Constructor XPath2FilterContainer -
Method Summary
Modifier and TypeMethodDescriptionfinal StringMethod getBaseLocalNamefinal StringMethod getBaseNamespaceReturns the XPath 2 Filter StringReturns the first Text node which contains information from the XPath 2 Filter String.booleanReturnstrueif theFilterattribute has value "intersect".booleanReturnstrueif theFilterattribute has value "subtract".booleanisUnion()Returnstrueif theFilterattribute has value "union".static XPath2FilterContainernewInstance(Element element, String baseURI) Creates a XPath2FilterContainer from an existing Element; needed for verification.static XPath2FilterContainernewInstanceIntersect(Document doc, String xpath2filter) Creates a new XPath2FilterContainer with the filter type "intersect".static NodeListnewInstances(Document doc, String[][] params) Method newInstancesstatic XPath2FilterContainernewInstanceSubtract(Document doc, String xpath2filter) Creates a new XPath2FilterContainer with the filter type "subtract".static XPath2FilterContainernewInstanceUnion(Document doc, String xpath2filter) Creates a new XPath2FilterContainer with the filter type "union".Methods inherited from class ElementProxy
addBase64Element, addBase64Text, addBigIntegerElement, addReturnToSelf, addText, addTextElement, appendOther, appendSelf, appendSelf, createElementForFamily, createElementForFamilyLocal, createText, getBaseURI, getBigIntegerFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getFirstChild, getLocalAttribute, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setDocument, setElement, setElement, setLocalAttribute, setLocalIdAttribute, setXPathNamespaceContext
-
Field Details
-
_ATT_FILTER
-
_ATT_FILTER_VALUE_INTERSECT
-
_ATT_FILTER_VALUE_SUBTRACT
-
_ATT_FILTER_VALUE_UNION
-
INTERSECT
-
SUBTRACT
-
UNION
-
_TAG_XPATH2
-
XPathFilter2NS
-
-
Constructor Details
-
XPath2FilterContainer
private XPath2FilterContainer()Constructor XPath2FilterContainer -
XPath2FilterContainer
-
XPath2FilterContainer
Constructor XPath2FilterContainer- Parameters:
element-baseURI-- Throws:
XMLSecurityException
-
-
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
-
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()Returnstrueif theFilterattribute has value "intersect".- Returns:
trueif theFilterattribute has value "intersect".
-
isSubtract
public boolean isSubtract()Returnstrueif theFilterattribute has value "subtract".- Returns:
trueif theFilterattribute has value "subtract".
-
isUnion
public boolean isUnion()Returnstrueif theFilterattribute has value "union".- Returns:
trueif theFilterattribute 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.- Returns:
- the first Text node which contains information from the XPath 2 Filter String
-
getBaseLocalName
Method getBaseLocalName- Specified by:
getBaseLocalNamein classElementProxy- Returns:
- the XPATH2 tag
-
getBaseNamespace
Method getBaseNamespace- Specified by:
getBaseNamespacein classElementProxy- Returns:
- XPATH2 tag namespace
-