Package org.apache.camel.model.language
Class XPathExpression.Builder
java.lang.Object
org.apache.camel.model.language.ExpressionDefinition.AbstractBuilder<XPathExpression.Builder,XPathExpression>
org.apache.camel.model.language.TypedExpressionDefinition.AbstractBuilder<XPathExpression.Builder,XPathExpression>
org.apache.camel.model.language.SingleInputTypedExpressionDefinition.AbstractBuilder<XPathExpression.Builder,XPathExpression>
org.apache.camel.model.language.NamespaceAwareExpression.AbstractNamespaceAwareBuilder<XPathExpression.Builder,XPathExpression>
org.apache.camel.model.language.XPathExpression.Builder
- All Implemented Interfaces:
LanguageBuilder<XPathExpression>
- Enclosing class:
XPathExpression
public static class XPathExpression.Builder
extends NamespaceAwareExpression.AbstractNamespaceAwareBuilder<XPathExpression.Builder,XPathExpression>
Builder is a specific builder for XPathExpression.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondocumentType(Class<?> documentType) Class for document type to usedocumentTypeName(String documentTypeName) Name of class for document typeend()Ends the build of an expression.factoryRef(String factoryRef) References to a custom XPathFactory to lookup in the registrylogNamespaces(boolean logNamespaces) Whether to log namespaces which can assist during troubleshootinglogNamespaces(String logNamespaces) Whether to log namespaces which can assist during troubleshootingobjectModel(String objectModel) The XPath object model to usepreCompile(boolean preCompile) Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile is enabled by default.preCompile(String preCompile) Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile is enabled by default.resultQName(String resultQName) Sets the class name of the result type (type from output)resultQName(XPathExpression.ResultQName resultQName) Sets the class name of the result type (type from output)saxon(boolean saxon) Whether to use Saxon.Whether to use Saxon.threadSafety(boolean threadSafety) Whether to enable thread-safety for the returned result of the xpath expression.threadSafety(String threadSafety) Whether to enable thread-safety for the returned result of the xpath expression.xpathFactory(XPathFactory xpathFactory) Methods inherited from class org.apache.camel.model.language.NamespaceAwareExpression.AbstractNamespaceAwareBuilder
namespace, namespaces, namespacesMethods inherited from class org.apache.camel.model.language.SingleInputTypedExpressionDefinition.AbstractBuilder
headerName, propertyName, source, variableNameMethods inherited from class org.apache.camel.model.language.TypedExpressionDefinition.AbstractBuilder
resultType, resultTypeNameMethods inherited from class org.apache.camel.model.language.ExpressionDefinition.AbstractBuilder
expression, id, predicate, trim, trim
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
documentType
Class for document type to use The default value is org.w3c.dom.Document -
xpathFactory
-
documentTypeName
Name of class for document type The default value is org.w3c.dom.Document -
resultQName
Sets the class name of the result type (type from output) The default result type is NodeSet -
resultQName
Sets the class name of the result type (type from output) The default result type is NodeSet -
saxon
Whether to use Saxon. -
saxon
Whether to use Saxon. -
factoryRef
References to a custom XPathFactory to lookup in the registry -
objectModel
The XPath object model to use -
logNamespaces
Whether to log namespaces which can assist during troubleshooting -
logNamespaces
Whether to log namespaces which can assist during troubleshooting -
threadSafety
Whether to enable thread-safety for the returned result of the xpath expression. This applies to when using NODESET as the result type, and the returned set has multiple elements. In this situation there can be thread-safety issues if you process the NODESET concurrently such as from a Camel Splitter EIP in parallel processing mode. This option prevents concurrency issues by doing defensive copies of the nodes. It is recommended to turn this option on if you are using camel-saxon or Saxon in your application. Saxon has thread-safety issues which can be prevented by turning this option on. -
threadSafety
Whether to enable thread-safety for the returned result of the xpath expression. This applies to when using NODESET as the result type, and the returned set has multiple elements. In this situation there can be thread-safety issues if you process the NODESET concurrently such as from a Camel Splitter EIP in parallel processing mode. This option prevents concurrency issues by doing defensive copies of the nodes. It is recommended to turn this option on if you are using camel-saxon or Saxon in your application. Saxon has thread-safety issues which can be prevented by turning this option on. -
preCompile
Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile is enabled by default.This can be used to turn off, for example in cases the compilation phase is desired at the starting phase, such as if the application is ahead of time compiled (for example with camel-quarkus) which would then load the xpath factory of the built operating system, and not a JVM runtime.
-
preCompile
Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile is enabled by default.This can be used to turn off, for example in cases the compilation phase is desired at the starting phase, such as if the application is ahead of time compiled (for example with camel-quarkus) which would then load the xpath factory of the built operating system, and not a JVM runtime.
-
end
Description copied from interface:LanguageBuilderEnds the build of an expression.- Returns:
- the expression fully built.
-