Class XPathFactoryImpl
public class XPathFactoryImpl extends XPathFactory
- Version:
- $Revision: 468655 $
- Author:
- Ramesh Mandava
-
Field Summary
Fields inherited from class javax.xml.xpath.XPathFactory
DEFAULT_OBJECT_MODEL_URI, DEFAULT_PROPERTY_NAME -
Constructor Summary
Constructors Constructor Description XPathFactoryImpl() -
Method Summary
Modifier and Type Method Description booleangetFeature(String name)Get the state of the named feature.booleanisObjectModelSupported(String objectModel)Is specified object model supported by thisXPathFactory?XPathnewXPath()Returns a newXPathobject using the underlying object model determined when the factory was instantiated.voidsetFeature(String name, boolean value)Set a feature for thisXPathFactoryandXPaths created by this factory.voidsetXPathFunctionResolver(XPathFunctionResolver resolver)Establish a default function resolver.voidsetXPathVariableResolver(XPathVariableResolver resolver)Establish a default variable resolver.Methods inherited from class javax.xml.xpath.XPathFactory
newInstance, newInstance, newInstance
-
Constructor Details
-
XPathFactoryImpl
public XPathFactoryImpl()
-
-
Method Details
-
isObjectModelSupported
Is specified object model supported by this
XPathFactory?- Specified by:
isObjectModelSupportedin classXPathFactory- Parameters:
objectModel- Specifies the object model which the returnedXPathFactorywill understand.- Returns:
trueifXPathFactorysupportsobjectModel, elsefalse.- Throws:
NullPointerException- IfobjectModelisnull.IllegalArgumentException- IfobjectModel.length() == 0.
-
newXPath
Returns a new
XPathobject using the underlying object model determined when the factory was instantiated.- Specified by:
newXPathin classXPathFactory- Returns:
- New
XPath
-
setFeature
Set a feature for this
XPathFactoryandXPaths created by this factory.Feature names are fully qualified
URIs. Implementations may define their own features. AnXPathFactoryConfigurationExceptionis thrown if thisXPathFactoryor theXPaths it creates cannot support the feature. It is possible for anXPathFactoryto expose a feature value but be unable to change its state.See
XPathFactoryfor full documentation of specific features.- Specified by:
setFeaturein classXPathFactory- Parameters:
name- Feature name.value- Is feature statetrueorfalse.- Throws:
XPathFactoryConfigurationException- if thisXPathFactoryor theXPaths it creates cannot support this feature.NullPointerException- ifnameisnull.
-
getFeature
Get the state of the named feature.
Feature names are fully qualified
URIs. Implementations may define their own features. AnXPathFactoryConfigurationExceptionis thrown if thisXPathFactoryor theXPaths it creates cannot support the feature. It is possible for anXPathFactoryto expose a feature value but be unable to change its state.- Specified by:
getFeaturein classXPathFactory- Parameters:
name- Feature name.- Returns:
- State of the named feature.
- Throws:
XPathFactoryConfigurationException- if thisXPathFactoryor theXPaths it creates cannot support this feature.NullPointerException- ifnameisnull.
-
setXPathFunctionResolver
Establish a default function resolver.
Any
XPathobjects constructed from this factory will use the specified resolver by default.A
NullPointerExceptionis thrown ifresolverisnull.- Specified by:
setXPathFunctionResolverin classXPathFactory- Parameters:
resolver- XPath function resolver.- Throws:
NullPointerException- Ifresolverisnull.
-
setXPathVariableResolver
Establish a default variable resolver.
Any
XPathobjects constructed from this factory will use the specified resolver by default.A
NullPointerExceptionis thrown ifresolverisnull.- Specified by:
setXPathVariableResolverin classXPathFactory- Parameters:
resolver- Variable resolver.- Throws:
NullPointerException- Ifresolverisnull.
-