APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.xml.crypto.dsig.spec

public Class XPathType

extends Object
Class Inheritance
Imports
java.util.Collections, .HashMap, .Map

The XML Schema Definition of the XPath element as defined in the W3C Recommendation for XML-Signature XPath Filter 2.0:

<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:xf="http://www.w3.org/2002/06/xmldsig-filter2"
        targetNamespace="http://www.w3.org/2002/06/xmldsig-filter2"
        version="0.1" elementFormDefault="qualified">

<element name="XPath"
         type="xf:XPathType"/>

<complexType name="XPathType">
  <simpleContent>
    <extension base="string">
      <attribute name="Filter">
        <simpleType>
          <restriction base="string">
            <enumeration value="intersect"/>
            <enumeration value="subtract"/>
            <enumeration value="union"/>
          </restriction>
        </simpleType>
      </attribute>
    </extension>
  </simpleContent>
</complexType>
Authors
Sean Mullan, JSR 105 Expert Group
Since
1.6
See Also
XPathFilter2ParameterSpec

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
XPathType.Filter

Represents the filter set operation.

Field Summary

Modifier and TypeField and Description
private final String
private final XPathType.Filter
private final Map<String, String>

Constructor Summary

AccessConstructor and Description
public
XPathType(String
the XPath expression to be evaluated
expression
,
XPathType.Filter
the filter operation (Filter#INTERSECT, Filter#SUBTRACT, or Filter#UNION)
filter
)

Creates an XPathType instance with the specified XPath expression and filter.

public
XPathType(String
the XPath expression to be evaluated
expression
,
XPathType.Filter
the filter operation (Filter#INTERSECT, Filter#SUBTRACT, or Filter#UNION)
filter
,
Map<String, String>
the map of namespace prefixes. Each key is a namespace prefix String that maps to a corresponding namespace URI String.
namespaceMap
)

Creates an XPathType instance with the specified XPath expression, filter, and namespace map.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the XPath expression to be evaluated
getExpression
()

Returns the XPath expression to be evaluated.

public XPathType.Filter

Returns:

the filter operation
getFilter
()

Returns the filter operation.

public Map<String, String>

Returns:

a Map of namespace prefixes to namespace URIs (may be empty, but never null)
getNamespaceMap
()

Returns a map of namespace prefixes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

expressionback to summary
private final String expression
filterback to summary
private final XPathType.Filter filter
nsMapback to summary
private final Map<String, String> nsMap

Constructor Detail

XPathTypeback to summary
public XPathType(String expression, XPathType.Filter filter)

Creates an XPathType instance with the specified XPath expression and filter.

Parameters
expression:String

the XPath expression to be evaluated

filter:XPathType.Filter

the filter operation (Filter#INTERSECT, Filter#SUBTRACT, or Filter#UNION)

Exceptions
NullPointerException:
if expression or filter is null
XPathTypeback to summary
public XPathType(String expression, XPathType.Filter filter, Map<String, String> namespaceMap)

Creates an XPathType instance with the specified XPath expression, filter, and namespace map. The map is copied to protect against subsequent modification.

Parameters
expression:String

the XPath expression to be evaluated

filter:XPathType.Filter

the filter operation (Filter#INTERSECT, Filter#SUBTRACT, or Filter#UNION)

namespaceMap:Map<String, String>

the map of namespace prefixes. Each key is a namespace prefix String that maps to a corresponding namespace URI String.

Exceptions
NullPointerException:
if expression, filter or namespaceMap are null
ClassCastException:
if any of the map's keys or entries are not of type String

Method Detail

getExpressionback to summary
public String getExpression()

Returns the XPath expression to be evaluated.

Returns:String

the XPath expression to be evaluated

getFilterback to summary
public XPathType.Filter getFilter()

Returns the filter operation.

Returns:XPathType.Filter

the filter operation

getNamespaceMapback to summary
public Map<String, String> getNamespaceMap()

Returns a map of namespace prefixes. Each key is a namespace prefix String that maps to a corresponding namespace URI String.

This implementation returns an unmodifiable map.

Returns:Map<String, String>

a Map of namespace prefixes to namespace URIs (may be empty, but never null)

javax.xml.crypto.dsig.spec back to summary

public Class XPathType.Filter

extends Object
Class Inheritance

Represents the filter set operation.

Field Summary

Modifier and TypeField and Description
public static final XPathType.Filter
INTERSECT

The intersect filter operation.

private final String
public static final XPathType.Filter
SUBTRACT

The subtract filter operation.

public static final XPathType.Filter
UNION

The union filter operation.

Constructor Summary

AccessConstructor and Description
private
Filter(String operation)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the string form of the operation
toString
()

Overrides java.lang.Object.toString.

Returns the string form of the operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

INTERSECTback to summary
public static final XPathType.Filter INTERSECT

The intersect filter operation.

operationback to summary
private final String operation
SUBTRACTback to summary
public static final XPathType.Filter SUBTRACT

The subtract filter operation.

UNIONback to summary
public static final XPathType.Filter UNION

The union filter operation.

Constructor Detail

Filterback to summary
private Filter(String operation)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns the string form of the operation.

Returns:String

the string form of the operation