Class XPath2FilterContainer
- java.lang.Object
-
- org.apache.xml.security.utils.ElementProxy
-
- org.apache.xml.security.transforms.params.XPath2FilterContainer
-
- All Implemented Interfaces:
TransformParam
public class XPath2FilterContainer extends ElementProxy implements TransformParam
Implements the parameters for the XPath Filter v2.0.- See Also:
- XPath Filter v2.0 (TR)
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String_ATT_FILTERField _ATT_FILTERprivate static java.lang.String_ATT_FILTER_VALUE_INTERSECTField _ATT_FILTER_VALUE_INTERSECTprivate static java.lang.String_ATT_FILTER_VALUE_SUBTRACTField _ATT_FILTER_VALUE_SUBTRACTprivate static java.lang.String_ATT_FILTER_VALUE_UNIONField _ATT_FILTER_VALUE_UNIONstatic java.lang.String_TAG_XPATH2Field _TAG_XPATH2static java.lang.StringINTERSECTField INTERSECTstatic java.lang.StringSUBTRACTField SUBTRACTstatic java.lang.StringUNIONField UNIONstatic java.lang.StringXPathFilter2NSField XPathFiler2NS-
Fields inherited from class org.apache.xml.security.utils.ElementProxy
baseURI, LOG
-
-
Constructor Summary
Constructors Modifier Constructor Description privateXPath2FilterContainer()Constructor XPath2FilterContainerprivateXPath2FilterContainer(org.w3c.dom.Document doc, java.lang.String xpath2filter, java.lang.String filterType)Constructor XPath2FilterContainerprivateXPath2FilterContainer(org.w3c.dom.Element element, java.lang.String baseURI)Constructor XPath2FilterContainer
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBaseLocalName()Method getBaseLocalNamejava.lang.StringgetBaseNamespace()Method getBaseNamespacejava.lang.StringgetXPathFilterStr()Returns the XPath 2 Filter Stringorg.w3c.dom.NodegetXPathFilterTextNode()Returns the first Text node which contains information from the XPath 2 Filter String.booleanisIntersect()Returnstrueif theFilterattribute has value "intersect".booleanisSubtract()Returnstrueif theFilterattribute has value "subtract".booleanisUnion()Returnstrueif theFilterattribute has value "union".static XPath2FilterContainernewInstance(org.w3c.dom.Element element, java.lang.String baseURI)Creates a XPath2FilterContainer from an existing Element; needed for verification.static XPath2FilterContainernewInstanceIntersect(org.w3c.dom.Document doc, java.lang.String xpath2filter)Creates a new XPath2FilterContainer with the filter type "intersect".static org.w3c.dom.NodeListnewInstances(org.w3c.dom.Document doc, java.lang.String[][] params)Method newInstancesstatic XPath2FilterContainernewInstanceSubtract(org.w3c.dom.Document doc, java.lang.String xpath2filter)Creates a new XPath2FilterContainer with the filter type "subtract".static XPath2FilterContainernewInstanceUnion(org.w3c.dom.Document doc, java.lang.String xpath2filter)Creates a new XPath2FilterContainer with the filter type "union".-
Methods inherited from class org.apache.xml.security.utils.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 Detail
-
_ATT_FILTER
private static final java.lang.String _ATT_FILTER
Field _ATT_FILTER- See Also:
- Constant Field Values
-
_ATT_FILTER_VALUE_INTERSECT
private static final java.lang.String _ATT_FILTER_VALUE_INTERSECT
Field _ATT_FILTER_VALUE_INTERSECT- See Also:
- Constant Field Values
-
_ATT_FILTER_VALUE_SUBTRACT
private static final java.lang.String _ATT_FILTER_VALUE_SUBTRACT
Field _ATT_FILTER_VALUE_SUBTRACT- See Also:
- Constant Field Values
-
_ATT_FILTER_VALUE_UNION
private static final java.lang.String _ATT_FILTER_VALUE_UNION
Field _ATT_FILTER_VALUE_UNION- See Also:
- Constant Field Values
-
INTERSECT
public static final java.lang.String INTERSECT
Field INTERSECT- See Also:
- Constant Field Values
-
SUBTRACT
public static final java.lang.String SUBTRACT
Field SUBTRACT- See Also:
- Constant Field Values
-
UNION
public static final java.lang.String UNION
Field UNION- See Also:
- Constant Field Values
-
_TAG_XPATH2
public static final java.lang.String _TAG_XPATH2
Field _TAG_XPATH2- See Also:
- Constant Field Values
-
XPathFilter2NS
public static final java.lang.String XPathFilter2NS
Field XPathFiler2NS- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XPath2FilterContainer
private XPath2FilterContainer()
Constructor XPath2FilterContainer
-
XPath2FilterContainer
private XPath2FilterContainer(org.w3c.dom.Document doc, java.lang.String xpath2filter, java.lang.String filterType)Constructor XPath2FilterContainer- Parameters:
doc-xpath2filter-filterType-
-
XPath2FilterContainer
private XPath2FilterContainer(org.w3c.dom.Element element, java.lang.String baseURI) throws XMLSecurityExceptionConstructor XPath2FilterContainer- Parameters:
element-baseURI-- Throws:
XMLSecurityException
-
-
Method Detail
-
newInstanceIntersect
public static XPath2FilterContainer newInstanceIntersect(org.w3c.dom.Document doc, java.lang.String xpath2filter)
Creates a new XPath2FilterContainer with the filter type "intersect".- Parameters:
doc-xpath2filter-- Returns:
- the filter.
-
newInstanceSubtract
public static XPath2FilterContainer newInstanceSubtract(org.w3c.dom.Document doc, java.lang.String xpath2filter)
Creates a new XPath2FilterContainer with the filter type "subtract".- Parameters:
doc-xpath2filter-- Returns:
- the filter.
-
newInstanceUnion
public static XPath2FilterContainer newInstanceUnion(org.w3c.dom.Document doc, java.lang.String xpath2filter)
Creates a new XPath2FilterContainer with the filter type "union".- Parameters:
doc-xpath2filter-- Returns:
- the filter
-
newInstances
public static org.w3c.dom.NodeList newInstances(org.w3c.dom.Document doc, java.lang.String[][] params)Method newInstances- Parameters:
doc-params-- Returns:
- the nodelist with the data
-
newInstance
public static XPath2FilterContainer newInstance(org.w3c.dom.Element element, java.lang.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
public java.lang.String getXPathFilterStr()
Returns the XPath 2 Filter String- Returns:
- the XPath 2 Filter String
-
getXPathFilterTextNode
public org.w3c.dom.Node 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
public final java.lang.String getBaseLocalName()
Method getBaseLocalName- Specified by:
getBaseLocalNamein classElementProxy- Returns:
- the XPATH2 tag
-
getBaseNamespace
public final java.lang.String getBaseNamespace()
Method getBaseNamespace- Specified by:
getBaseNamespacein classElementProxy- Returns:
- XPATH2 tag namespace
-
-