Class XPathFactoryImpl
- Version:
- $Revision: 1225277 $
- Author:
- Ramesh Mandava
-
Field Summary
Fields inherited from class javax.xml.xpath.XPathFactory
DEFAULT_OBJECT_MODEL_URI, DEFAULT_PROPERTY_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getFeature
(String name) Get the state of the named feature.boolean
isObjectModelSupported
(String objectModel) Is specified object model supported by thisXPathFactory
?newXPath()
Returns a newXPath
object using the underlying object model determined when the factory was instantiated.void
setFeature
(String name, boolean value) Set a feature for thisXPathFactory
andXPath
s created by this factory.void
Establish a default function resolver.void
Establish a default variable resolver.Methods inherited from class javax.xml.xpath.XPathFactory
newDefaultInstance, newInstance, newInstance, newInstance
-
Constructor Details
-
XPathFactoryImpl
public XPathFactoryImpl()
-
-
Method Details
-
isObjectModelSupported
Is specified object model supported by this
XPathFactory
?- Specified by:
isObjectModelSupported
in classXPathFactory
- Parameters:
objectModel
- Specifies the object model which the returnedXPathFactory
will understand.- Returns:
true
ifXPathFactory
supportsobjectModel
, elsefalse
.- Throws:
NullPointerException
- IfobjectModel
isnull
.IllegalArgumentException
- IfobjectModel.length() == 0
.
-
newXPath
Returns a new
XPath
object using the underlying object model determined when the factory was instantiated.- Specified by:
newXPath
in classXPathFactory
- Returns:
- New
XPath
-
setFeature
Set a feature for this
XPathFactory
andXPath
s created by this factory.Feature names are fully qualified
URI
s. Implementations may define their own features. AnXPathFactoryConfigurationException
is thrown if thisXPathFactory
or theXPath
s it creates cannot support the feature. It is possible for anXPathFactory
to expose a feature value but be unable to change its state.See
XPathFactory
for full documentation of specific features.- Specified by:
setFeature
in classXPathFactory
- Parameters:
name
- Feature name.value
- Is feature statetrue
orfalse
.- Throws:
XPathFactoryConfigurationException
- if thisXPathFactory
or theXPath
s it creates cannot support this feature.NullPointerException
- ifname
isnull
.
-
getFeature
Get the state of the named feature.
Feature names are fully qualified
URI
s. Implementations may define their own features. AnXPathFactoryConfigurationException
is thrown if thisXPathFactory
or theXPath
s it creates cannot support the feature. It is possible for anXPathFactory
to expose a feature value but be unable to change its state.- Specified by:
getFeature
in classXPathFactory
- Parameters:
name
- Feature name.- Returns:
- State of the named feature.
- Throws:
XPathFactoryConfigurationException
- if thisXPathFactory
or theXPath
s it creates cannot support this feature.NullPointerException
- ifname
isnull
.
-
setXPathFunctionResolver
Establish a default function resolver.
Any
XPath
objects constructed from this factory will use the specified resolver by default.A
NullPointerException
is thrown ifresolver
isnull
.- Specified by:
setXPathFunctionResolver
in classXPathFactory
- Parameters:
resolver
- XPath function resolver.- Throws:
NullPointerException
- Ifresolver
isnull
.
-
setXPathVariableResolver
Establish a default variable resolver.
Any
XPath
objects constructed from this factory will use the specified resolver by default.A
NullPointerException
is thrown ifresolver
isnull
.- Specified by:
setXPathVariableResolver
in classXPathFactory
- Parameters:
resolver
- Variable resolver.- Throws:
NullPointerException
- Ifresolver
isnull
.
-