org.apache.xml.security.transforms.params
Class XPath2FilterContainer

java.lang.Object
  extended by org.apache.xml.security.utils.ElementProxy
      extended by 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.

Author:
$Author: coheigea $
See Also:
XPath Filter v2.0 (TR)

Field Summary
static String _TAG_XPATH2
          Field _TAG_XPATH2
static String INTERSECT
          Field INTERSECT
static String SUBTRACT
          Field SUBTRACT
static String UNION
          Field UNION
static String XPathFilter2NS
          Field XPathFiler2NS
 
Fields inherited from class org.apache.xml.security.utils.ElementProxy
baseURI, log
 
Method Summary
 String getBaseLocalName()
          Method getBaseLocalName
 String getBaseNamespace()
          Method getBaseNamespace
 String getXPathFilterStr()
          Returns the XPath 2 Filter String
 Node getXPathFilterTextNode()
          Returns the first Text node which contains information from the XPath 2 Filter String.
 boolean isIntersect()
          Returns true if the Filter attribute has value "intersect".
 boolean isSubtract()
          Returns true if the Filter attribute has value "subtract".
 boolean isUnion()
          Returns true if the Filter 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 newInstances
static 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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERSECT

public static final String INTERSECT
Field INTERSECT

See Also:
Constant Field Values

SUBTRACT

public static final String SUBTRACT
Field SUBTRACT

See Also:
Constant Field Values

UNION

public static final String UNION
Field UNION

See Also:
Constant Field Values

_TAG_XPATH2

public static final String _TAG_XPATH2
Field _TAG_XPATH2

See Also:
Constant Field Values

XPathFilter2NS

public static final String XPathFilter2NS
Field XPathFiler2NS

See Also:
Constant Field Values
Method Detail

newInstanceIntersect

public static XPath2FilterContainer newInstanceIntersect(Document doc,
                                                         String xpath2filter)
Creates a new XPath2FilterContainer with the filter type "intersect".

Parameters:
doc -
xpath2filter -
Returns:
the filter.

newInstanceSubtract

public static XPath2FilterContainer newInstanceSubtract(Document doc,
                                                        String xpath2filter)
Creates a new XPath2FilterContainer with the filter type "subtract".

Parameters:
doc -
xpath2filter -
Returns:
the filter.

newInstanceUnion

public static XPath2FilterContainer newInstanceUnion(Document doc,
                                                     String xpath2filter)
Creates a new XPath2FilterContainer with the filter type "union".

Parameters:
doc -
xpath2filter -
Returns:
the filter

newInstances

public static NodeList newInstances(Document doc,
                                    String[][] params)
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()
Returns true if the Filter attribute has value "intersect".

Returns:
true if the Filter attribute has value "intersect".

isSubtract

public boolean isSubtract()
Returns true if the Filter attribute has value "subtract".

Returns:
true if the Filter attribute has value "subtract".

isUnion

public boolean isUnion()
Returns true if the Filter attribute has value "union".

Returns:
true if the Filter attribute has value "union".

getXPathFilterStr

public String getXPathFilterStr()
Returns the XPath 2 Filter String

Returns:
the XPath 2 Filter String

getXPathFilterTextNode

public 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. $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

public final String getBaseLocalName()
Method getBaseLocalName

Specified by:
getBaseLocalName in class ElementProxy
Returns:
the XPATH2 tag

getBaseNamespace

public final String getBaseNamespace()
Method getBaseNamespace

Specified by:
getBaseNamespace in class ElementProxy
Returns:
XPATH2 tag namespace


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.