Package com.helger.schematron.pure.xpath
Class XPathConfigBuilder
java.lang.Object
com.helger.schematron.pure.xpath.XPathConfigBuilder
Builder class for
IXPathConfig.- Since:
- 5.5.0
- Author:
- Thomas Pasch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()final Stringfinal XPathFactoryfinal Class<? extends XPathFactory>final XPathFunctionResolverfinal XPathVariableResolverfinal XPathConfigBuildersetGlobalXPathFactory(String sGlobalXPathFactory) With Java 11+ module path system, you can't accesscom.sun.org.apache.xpath.internal.jaxp.XPathFactoryImplas packagecom.sun.org.apache.xpath.internal.jaxpis declared in module java.xml, which does not export it.
The only way to use it, is to set/alter thejavax.xml.xpath.XPathFactorysystem property.final XPathConfigBuildersetXPathFactory(XPathFactory aXPathFactory) Set theXPathFactoryto use.final XPathConfigBuildersetXPathFactoryClass(Class<? extends XPathFactory> aXPathFactoryClass) Set theXPathFactoryclass to instantiate.final XPathConfigBuildersetXPathFunctionResolver(XPathFunctionResolver xPathFunctionResolver) final XPathConfigBuildersetXPathVariableResolver(XPathVariableResolver xPathVariableResolver) toString()
-
Field Details
-
XPATH_FACTORY_SAXON_FIRST
-
DEFAULT
-
-
Constructor Details
-
XPathConfigBuilder
public XPathConfigBuilder()
-
-
Method Details
-
getXPathFactory
-
setXPathFactory
Set theXPathFactoryto use. This instance always has priority 1.- Parameters:
aXPathFactory- The factory to use. May not benull.- Returns:
- this for chaining.
-
getXPathFactoryClass
-
setXPathFactoryClass
@Nonnull public final XPathConfigBuilder setXPathFactoryClass(@Nonnull Class<? extends XPathFactory> aXPathFactoryClass) Set theXPathFactoryclass to instantiate. This has priority 2 and is only used ifgetXPathFactory()isnull.- Parameters:
aXPathFactoryClass- The factory to use. May not benull.- Returns:
- this for chaining.
- See Also:
-
getGlobalXPathFactory
-
setGlobalXPathFactory
@Nonnull public final XPathConfigBuilder setGlobalXPathFactory(@Nullable String sGlobalXPathFactory) With Java 11+ module path system, you can't accesscom.sun.org.apache.xpath.internal.jaxp.XPathFactoryImplas packagecom.sun.org.apache.xpath.internal.jaxpis declared in module java.xml, which does not export it.
The only way to use it, is to set/alter thejavax.xml.xpath.XPathFactorysystem property. However, this change is global to the application.- Parameters:
sGlobalXPathFactory- Fully qualified class name of the 'default'XPathFactory. Most commonly set to 'com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl'.- Returns:
- this for chaining
- See Also:
-
getXPathVariableResolver
-
setXPathVariableResolver
@Nonnull public final XPathConfigBuilder setXPathVariableResolver(@Nullable XPathVariableResolver xPathVariableResolver) -
getXPathFunctionResolver
-
setXPathFunctionResolver
@Nonnull public final XPathConfigBuilder setXPathFunctionResolver(@Nullable XPathFunctionResolver xPathFunctionResolver) -
build
-
toString
-