Class XPathFactoryImpl
- java.lang.Object
-
- javax.xml.xpath.XPathFactory
-
- org.apache.xpath.jaxp.XPathFactoryImpl
-
public class XPathFactoryImpl extends javax.xml.xpath.XPathFactoryThe XPathFactory builds XPaths.- Version:
- $Revision: 1225277 $
- Author:
- Ramesh Mandava
-
-
Constructor Summary
Constructors Constructor Description XPathFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetFeature(java.lang.String name)Get the state of the named feature.booleanisObjectModelSupported(java.lang.String objectModel)Is specified object model supported by thisXPathFactory?javax.xml.xpath.XPathnewXPath()Returns a newXPathobject using the underlying object model determined when the factory was instantiated.voidsetFeature(java.lang.String name, boolean value)Set a feature for thisXPathFactoryandXPaths created by this factory.voidsetXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver resolver)Establish a default function resolver.voidsetXPathVariableResolver(javax.xml.xpath.XPathVariableResolver resolver)Establish a default variable resolver.
-
-
-
Method Detail
-
isObjectModelSupported
public boolean isObjectModelSupported(java.lang.String objectModel)
Is specified object model supported by this
XPathFactory?- Specified by:
isObjectModelSupportedin classjavax.xml.xpath.XPathFactory- Parameters:
objectModel- Specifies the object model which the returnedXPathFactorywill understand.- Returns:
trueifXPathFactorysupportsobjectModel, elsefalse.- Throws:
java.lang.NullPointerException- IfobjectModelisnull.java.lang.IllegalArgumentException- IfobjectModel.length() == 0.
-
newXPath
public javax.xml.xpath.XPath newXPath()
Returns a new
XPathobject using the underlying object model determined when the factory was instantiated.- Specified by:
newXPathin classjavax.xml.xpath.XPathFactory- Returns:
- New
XPath
-
setFeature
public void setFeature(java.lang.String name, boolean value) throws javax.xml.xpath.XPathFactoryConfigurationExceptionSet 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 classjavax.xml.xpath.XPathFactory- Parameters:
name- Feature name.value- Is feature statetrueorfalse.- Throws:
javax.xml.xpath.XPathFactoryConfigurationException- if thisXPathFactoryor theXPaths it creates cannot support this feature.java.lang.NullPointerException- ifnameisnull.
-
getFeature
public boolean getFeature(java.lang.String name) throws javax.xml.xpath.XPathFactoryConfigurationExceptionGet 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 classjavax.xml.xpath.XPathFactory- Parameters:
name- Feature name.- Returns:
- State of the named feature.
- Throws:
javax.xml.xpath.XPathFactoryConfigurationException- if thisXPathFactoryor theXPaths it creates cannot support this feature.java.lang.NullPointerException- ifnameisnull.
-
setXPathFunctionResolver
public void setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver resolver)
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 classjavax.xml.xpath.XPathFactory- Parameters:
resolver- XPath function resolver.- Throws:
java.lang.NullPointerException- Ifresolverisnull.
-
setXPathVariableResolver
public void setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver resolver)
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 classjavax.xml.xpath.XPathFactory- Parameters:
resolver- Variable resolver.- Throws:
java.lang.NullPointerException- Ifresolverisnull.
-
-