Class JaxbDataFormat.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • contextPathIsClassName

        public JaxbDataFormat.Builder contextPathIsClassName​(String contextPathIsClassName)
        This can be set to true to mark that the contextPath is referring to a classname and not a package name.
      • contextPathIsClassName

        public JaxbDataFormat.Builder contextPathIsClassName​(boolean contextPathIsClassName)
        This can be set to true to mark that the contextPath is referring to a classname and not a package name.
      • schema

        public JaxbDataFormat.Builder schema​(String schema)
        To validate against an existing schema. Your can use the prefix classpath:, file:* or *http: to specify how the resource should be resolved. You can separate multiple schema files by using the ',' character.
      • schemaSeverityLevel

        public JaxbDataFormat.Builder schemaSeverityLevel​(String schemaSeverityLevel)
        Sets the schema severity level to use when validating against a schema. This level determines the minimum severity error that triggers JAXB to stop continue parsing. The default value of 0 (warning) means that any error (warning, error or fatal error) will trigger JAXB to stop. There are the following three levels: 0=warning, 1=error, 2=fatal error.
      • schemaSeverityLevel

        public JaxbDataFormat.Builder schemaSeverityLevel​(int schemaSeverityLevel)
        Sets the schema severity level to use when validating against a schema. This level determines the minimum severity error that triggers JAXB to stop continue parsing. The default value of 0 (warning) means that any error (warning, error or fatal error) will trigger JAXB to stop. There are the following three levels: 0=warning, 1=error, 2=fatal error.
      • prettyPrint

        public JaxbDataFormat.Builder prettyPrint​(String prettyPrint)
        To enable pretty printing output nicely formatted.

        Is by default false.

      • prettyPrint

        public JaxbDataFormat.Builder prettyPrint​(boolean prettyPrint)
        To enable pretty printing output nicely formatted.

        Is by default false.

      • objectFactory

        public JaxbDataFormat.Builder objectFactory​(String objectFactory)
        Whether to allow using ObjectFactory classes to create the POJO classes during marshalling. This only applies to POJO classes that has not been annotated with JAXB and providing jaxb.index descriptor files.
      • objectFactory

        public JaxbDataFormat.Builder objectFactory​(boolean objectFactory)
        Whether to allow using ObjectFactory classes to create the POJO classes during marshalling. This only applies to POJO classes that has not been annotated with JAXB and providing jaxb.index descriptor files.
      • ignoreJAXBElement

        public JaxbDataFormat.Builder ignoreJAXBElement​(String ignoreJAXBElement)
        Whether to ignore JAXBElement elements - only needed to be set to false in very special use-cases.
      • ignoreJAXBElement

        public JaxbDataFormat.Builder ignoreJAXBElement​(boolean ignoreJAXBElement)
        Whether to ignore JAXBElement elements - only needed to be set to false in very special use-cases.
      • mustBeJAXBElement

        public JaxbDataFormat.Builder mustBeJAXBElement​(String mustBeJAXBElement)
        Whether marhsalling must be java objects with JAXB annotations. And if not then it fails. This option can be set to false to relax that, such as when the data is already in XML format.
      • mustBeJAXBElement

        public JaxbDataFormat.Builder mustBeJAXBElement​(boolean mustBeJAXBElement)
        Whether marhsalling must be java objects with JAXB annotations. And if not then it fails. This option can be set to false to relax that, such as when the data is already in XML format.
      • fragment

        public JaxbDataFormat.Builder fragment​(String fragment)
        To turn on marshalling XML fragment trees. By default JAXB looks for @XmlRootElement annotation on given class to operate on whole XML tree. This is useful but not always - sometimes generated code does not have @XmlRootElement annotation, sometimes you need unmarshall only part of tree. In that case you can use partial unmarshalling. To enable this behaviours you need set property partClass. Camel will pass this class to JAXB's unmarshaler.
      • fragment

        public JaxbDataFormat.Builder fragment​(boolean fragment)
        To turn on marshalling XML fragment trees. By default JAXB looks for @XmlRootElement annotation on given class to operate on whole XML tree. This is useful but not always - sometimes generated code does not have @XmlRootElement annotation, sometimes you need unmarshall only part of tree. In that case you can use partial unmarshalling. To enable this behaviours you need set property partClass. Camel will pass this class to JAXB's unmarshaler.
      • filterNonXmlChars

        public JaxbDataFormat.Builder filterNonXmlChars​(String filterNonXmlChars)
        To ignore non xml characters and replace them with an empty space.
      • filterNonXmlChars

        public JaxbDataFormat.Builder filterNonXmlChars​(boolean filterNonXmlChars)
        To ignore non xml characters and replace them with an empty space.
      • partClass

        public JaxbDataFormat.Builder partClass​(String partClass)
        Name of class used for fragment parsing.

        See more details at the fragment option.

      • partNamespace

        public JaxbDataFormat.Builder partNamespace​(String partNamespace)
        XML namespace to use for fragment parsing.

        See more details at the fragment option.

      • namespacePrefixRef

        public JaxbDataFormat.Builder namespacePrefixRef​(String namespacePrefixRef)
        When marshalling using JAXB or SOAP then the JAXB implementation will automatically assign namespace prefixes, such as ns2, ns3, ns4 etc. To control this mapping, Camel allows you to refer to a map which contains the desired mapping.
      • xmlStreamWriterWrapper

        public JaxbDataFormat.Builder xmlStreamWriterWrapper​(String xmlStreamWriterWrapperRef)
        To use a custom xml stream writer.
      • noNamespaceSchemaLocation

        public JaxbDataFormat.Builder noNamespaceSchemaLocation​(String schemaLocation)
        To define the location of the namespaceless schema
      • jaxbProviderProperties

        public JaxbDataFormat.Builder jaxbProviderProperties​(String jaxbProviderProperties)
        Refers to a custom java.util.Map to lookup in the registry containing custom JAXB provider properties to be used with the JAXB marshaller.