Class XPathExpression.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • documentType

        public XPathExpression.Builder documentType​(Class<?> documentType)
        Class for document type to use

        The default value is org.w3c.dom.Document

      • resultType

        public XPathExpression.Builder resultType​(Class<?> resultType)
        Sets the class of the result type (type from output).

        The default result type is NodeSet

      • documentTypeName

        public XPathExpression.Builder documentTypeName​(String documentTypeName)
        Name of class for document type

        The default value is org.w3c.dom.Document

      • resultTypeName

        public XPathExpression.Builder resultTypeName​(String resultTypeName)
        Sets the class name of the result type (type from output)

        The default result type is NodeSet

      • logNamespaces

        public XPathExpression.Builder logNamespaces​(String logNamespaces)
        Whether to log namespaces which can assist during troubleshooting
      • logNamespaces

        public XPathExpression.Builder logNamespaces​(boolean logNamespaces)
        Whether to log namespaces which can assist during troubleshooting
      • threadSafety

        public XPathExpression.Builder threadSafety​(String 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

        public XPathExpression.Builder threadSafety​(boolean 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

        public XPathExpression.Builder preCompile​(String 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

        public XPathExpression.Builder preCompile​(boolean 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

        public XPathExpression end()
        Description copied from interface: LanguageBuilder
        Ends the build of an expression.
        Returns:
        the expression fully built.
      • namespaces

        public T namespaces​(org.apache.camel.support.builder.Namespaces namespaces)
        Injects the XML Namespaces of prefix -> uri mappings
        Parameters:
        namespaces - the XML namespaces
      • namespaces

        public T namespaces​(Map<String,​String> namespaces)
        Injects the XML Namespaces of prefix -> uri mappings
        Parameters:
        namespaces - the XML namespaces with the key of prefixes and the value the URIs
      • namespace

        public T namespace​(List<PropertyDefinition> namespace)
        Injects the XML Namespaces of prefix -> uri mappings
      • id

        public T id​(String id)
        Sets the id of this node
      • trim

        public T trim​(String trim)
        Whether to trim the value to remove leading and trailing whitespaces and line breaks
      • trim

        public T trim​(boolean trim)
        Whether to trim the value to remove leading and trailing whitespaces and line breaks
      • expression

        public T expression​(String expression)
        The expression value in your chosen language syntax
      • predicate

        public T predicate​(org.apache.camel.Predicate predicate)