APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal.jaxp

public Class XPathFactoryImpl

extends XPathFactory
Class Inheritance
Imports
com.sun.org.apache.xalan.internal.res.XSLMessages, com.sun.org.apache.xpath.internal.res.XPATHErrorResources, javax.xml.XMLConstants, javax.xml.xpath.XPathFactory, .XPathFactoryConfigurationException, .XPathFunctionResolver, .XPathVariableResolver, jdk.xml.internal.*

The XPathFactory builds XPaths.
Author
Ramesh Mandava

Field Summary

Modifier and TypeField and Description
private final JdkXmlFeatures
_featureManager

XML Features manager

private boolean
_isNotSecureProcessing

State of secure processing feature.

private boolean
_isSecureMode

State of secure mode.

private XMLSecurityManager
_xmlSecMgr

The XML security manager

private XMLSecurityPropertyManager
private static final String
CLASS_NAME

Name of class as a constant to use for debugging.

private XPathFunctionResolver
xPathFunctionResolver

XPathFunctionResolver for this XPathFactory and created XPaths.

private XPathVariableResolver
xPathVariableResolver

XPathVariableResolver for this XPathFactory and created XPaths

Inherited from javax.xml.xpath.XPathFactory:
DEFAULT_OBJECT_MODEL_URIDEFAULT_PROPERTY_NAME

Constructor Summary

AccessConstructor and Description
public
XPathFactoryImpl()

javax.xml.xpath.XPathFactory implementation.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

State of the named feature.
getFeature
(String
Feature name.
name
)

Implements abstract javax.xml.xpath.XPathFactory.getFeature.

Get the state of the named feature.

public String

Returns:

the value of the property.
getProperty
(String
the property name
name
)

Overrides javax.xml.xpath.XPathFactory.getProperty.

Returns the value of the specified property.

public boolean

Returns:

true if XPathFactory supports objectModel, else false.
isObjectModelSupported
(String
Specifies the object model which the returned XPathFactory will understand.
objectModel
)

Implements abstract javax.xml.xpath.XPathFactory.isObjectModelSupported.

Is specified object model supported by this XPathFactory?

public XPath

Returns:

New XPath
newXPath
()

Implements abstract javax.xml.xpath.XPathFactory.newXPath.

Returns a new XPath object using the underlying object model determined when the factory was instantiated.

public void
setFeature(String
Feature name.
name
,
boolean
Is feature state true or false.
value
)

Implements abstract javax.xml.xpath.XPathFactory.setFeature.

Set a feature for this XPathFactory and XPaths created by this factory.

public void
setProperty(String
the property name
name
,
String
the value for the property
value
)

Overrides javax.xml.xpath.XPathFactory.setProperty.

Sets a property for the XPathFactory.

public void
setXPathFunctionResolver(XPathFunctionResolver
XPath function resolver.
resolver
)

Implements abstract javax.xml.xpath.XPathFactory.setXPathFunctionResolver.

Establish a default function resolver.

public void
setXPathVariableResolver(XPathVariableResolver
Variable resolver.
resolver
)

Implements abstract javax.xml.xpath.XPathFactory.setXPathVariableResolver.

Establish a default variable resolver.

Inherited from javax.xml.xpath.XPathFactory:
newDefaultInstancenewInstancenewInstancenewInstance

Field Detail

_featureManagerback to summary
private final JdkXmlFeatures _featureManager

XML Features manager

_isNotSecureProcessingback to summary
private boolean _isNotSecureProcessing

State of secure processing feature.

_isSecureModeback to summary
private boolean _isSecureMode

State of secure mode.

_xmlSecMgrback to summary
private XMLSecurityManager _xmlSecMgr

The XML security manager

_xmlSecPropMgrback to summary
private XMLSecurityPropertyManager _xmlSecPropMgr
CLASS_NAMEback to summary
private static final String CLASS_NAME

Name of class as a constant to use for debugging.

xPathFunctionResolverback to summary
private XPathFunctionResolver xPathFunctionResolver

XPathFunctionResolver for this XPathFactory and created XPaths.

xPathVariableResolverback to summary
private XPathVariableResolver xPathVariableResolver

XPathVariableResolver for this XPathFactory and created XPaths

Constructor Detail

XPathFactoryImplback to summary
public XPathFactoryImpl()

javax.xml.xpath.XPathFactory implementation.

Method Detail

getFeatureback to summary
public boolean getFeature(String name) throws XPathFactoryConfigurationException

Implements abstract javax.xml.xpath.XPathFactory.getFeature.

Get the state of the named feature.

Feature names are fully qualified java.net.URIs. Implementations may define their own features. An XPathFactoryConfigurationException is thrown if this XPathFactory or the XPaths it creates cannot support the feature. It is possible for an XPathFactory to expose a feature value but be unable to change its state.

Parameters
name:String

Feature name.

Returns:boolean

State of the named feature.

Exceptions
XPathFactoryConfigurationException:
if this XPathFactory or the XPaths it creates cannot support this feature.
NullPointerException:
if name is null.
getPropertyback to summary
public String getProperty(String name)

Overrides javax.xml.xpath.XPathFactory.getProperty.

Returns the value of the specified property.

Parameters
name:String

the property name

Returns:String

the value of the property.

Exceptions
IllegalArgumentException:
if the property name is not recognized
UnsupportedOperationException:
if the implementation does not support the method
NullPointerException:
if the name is null
Since
18
isObjectModelSupportedback to summary
public boolean isObjectModelSupported(String objectModel)

Implements abstract javax.xml.xpath.XPathFactory.isObjectModelSupported.

Is specified object model supported by this XPathFactory?

Parameters
objectModel:String

Specifies the object model which the returned XPathFactory will understand.

Returns:boolean

true if XPathFactory supports objectModel, else false.

Exceptions
NullPointerException:
If objectModel is null.
IllegalArgumentException:
If objectModel.length() == 0.
newXPathback to summary
public XPath newXPath()

Implements abstract javax.xml.xpath.XPathFactory.newXPath.

Returns a new XPath object using the underlying object model determined when the factory was instantiated.

Returns:XPath

New XPath

setFeatureback to summary
public void setFeature(String name, boolean value) throws XPathFactoryConfigurationException

Implements abstract javax.xml.xpath.XPathFactory.setFeature.

Set a feature for this XPathFactory and XPaths created by this factory.

Feature names are fully qualified java.net.URIs. Implementations may define their own features. An XPathFactoryConfigurationException is thrown if this XPathFactory or the XPaths it creates cannot support the feature. It is possible for an XPathFactory to expose a feature value but be unable to change its state.

See javax.xml.xpath.XPathFactory for full documentation of specific features.

Parameters
name:String

Feature name.

value:boolean

Is feature state true or false.

Annotations
@SuppressWarnings:deprecation
Exceptions
XPathFactoryConfigurationException:
if this XPathFactory or the XPaths it creates cannot support this feature.
NullPointerException:
if name is null.
setPropertyback to summary
public void setProperty(String name, String value)

Overrides javax.xml.xpath.XPathFactory.setProperty.

Sets a property for the XPathFactory. The property applies to XPath objects that the XPathFactory creates. It has no impact on XPath objects that are already created.

A property can either be defined in the XPathFactory, or by the underlying implementation.

Parameters
name:String

the property name

value:String

the value for the property

Exceptions
IllegalArgumentException:
if the property name is not recognized, or the value can not be assigned
UnsupportedOperationException:
if the implementation does not support the method
NullPointerException:
if the name is null
setXPathFunctionResolverback to summary
public void setXPathFunctionResolver(XPathFunctionResolver resolver)

Implements abstract javax.xml.xpath.XPathFactory.setXPathFunctionResolver.

Establish a default function resolver.

Any XPath objects constructed from this factory will use the specified resolver by default.

A NullPointerException is thrown if resolver is null.

Parameters
resolver:XPathFunctionResolver

XPath function resolver.

Exceptions
NullPointerException:
If resolver is null.
setXPathVariableResolverback to summary
public void setXPathVariableResolver(XPathVariableResolver resolver)

Implements abstract javax.xml.xpath.XPathFactory.setXPathVariableResolver.

Establish a default variable resolver.

Any XPath objects constructed from this factory will use the specified resolver by default.

A NullPointerException is thrown if resolver is null.

Parameters
resolver:XPathVariableResolver

Variable resolver.

Exceptions
NullPointerException:
If resolver is null.