public class XPathType extends Object
XPath
中的定义,元件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>
XPathFilter2ParameterSpec
Modifier and Type | Class and Description |
---|---|
static class |
XPathType.Filter
表示过滤器设置操作。
|
Constructor and Description |
---|
XPathType(String expression, XPathType.Filter filter)
使用指定的XPath表达式和过滤器创建一个
XPathType 实例。
|
XPathType(String expression, XPathType.Filter filter, Map namespaceMap)
使用指定的XPath表达式,过滤器和命名空间映射创建一个
XPathType 实例。
|
Modifier and Type | Method and Description |
---|---|
String |
getExpression()
返回要评估的XPath表达式。
|
XPathType.Filter |
getFilter()
返回过滤器操作。
|
Map |
getNamespaceMap()
返回名称空间前缀的映射。
|
public XPathType(String expression, XPathType.Filter filter)
XPathType
实例。
expression
- 要评估的XPath表达式
filter
-过滤操作(
XPathType.Filter.INTERSECT
,
XPathType.Filter.SUBTRACT
,或
XPathType.Filter.UNION
)
NullPointerException
- 如果
expression
或
filter
是
null
public XPathType(String expression, XPathType.Filter filter, Map namespaceMap)
XPathType
实例。
复制地图以防止后续修改。
expression
- 要评估的XPath表达式
filter
-过滤操作(
XPathType.Filter.INTERSECT
,
XPathType.Filter.SUBTRACT
,或
XPathType.Filter.UNION
)
namespaceMap
- 命名空间前缀的映射。
每个键都是一个命名空间前缀String
映射到相应的命名空间URI String
。
NullPointerException
-如果
expression
,
filter
或
namespaceMap
是
null
ClassCastException
- 如果任何地图的键或条目不是类型
String
public String getExpression()
public XPathType.Filter getFilter()
public Map getNamespaceMap()
Map
of namespace prefixes to namespace URIs (may be empty, but never
null
)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.