public class JaxbDataFormatHelper extends Object
JaxbDataFormat
used for marshalling and unmarshalling.Constructor and Description |
---|
JaxbDataFormatHelper() |
Modifier and Type | Method and Description |
---|---|
static org.apache.camel.model.dataformat.JaxbDataFormat |
jaxb(Class<?> xmlClass)
Creates a JAXB data format for marshalling and unmarshalling
the specified class to/from its native XML representation.
|
static org.apache.camel.model.dataformat.JaxbDataFormat |
jaxb(Class<?> xmlClass,
QName rootQName)
Creates a JAXB data format for marshalling and unmarshalling the specified class
to/from its native XML representation.
|
static org.apache.camel.model.dataformat.JaxbDataFormat |
jaxbFragment(Class<?> xmlClass)
Creates a JAXB data format for unmarshalling (only)
the specified class to/from its native XML representation.
|
static org.apache.camel.model.dataformat.JaxbDataFormat |
jaxbFragment(Class<?> xmlClass,
String partNamespace)
Creates a JAXB data format for marshalling and unmarshalling
the specified class to/from its native XML representation.
|
public static org.apache.camel.model.dataformat.JaxbDataFormat jaxb(Class<?> xmlClass)
xmlClass
- the class that this data format will be able to marshal and unmarshalDataFormatDefinition
instance for use in routespublic static org.apache.camel.model.dataformat.JaxbDataFormat jaxb(Class<?> xmlClass, @Nullable QName rootQName)
If rootQName is provided, this data format will work with classes that are not root elements
(not annotated with XmlRootElement
).
xmlClass
- the class that this data format will be able to marshal and unmarshalrootQName
- the QName (optional) of the root element in XML,
which is necessary for marshalling classes without XmlRootElement to XMLDataFormatDefinition
instance for use in routespublic static org.apache.camel.model.dataformat.JaxbDataFormat jaxbFragment(Class<?> xmlClass)
jaxb(Class)
,
this data format works with classes that are not root elements
(e.g., not annotated with XmlRootElement
).xmlClass
- the class that this data format will be able to marshal and unmarshalDataFormatDefinition
instance for use in routesfor marshalling fragments (as this one can only unmarshal)
public static org.apache.camel.model.dataformat.JaxbDataFormat jaxbFragment(Class<?> xmlClass, String partNamespace)
jaxb(Class)
,
this data format works with classes that are not root elements
(e.g., not annotated with XmlRootElement
).xmlClass
- the class that this data format will be able to marshal and unmarshalpartNamespace
- the namespace (optional) with the name of the root element
(name in XML, not its Java class name),
which is necessary for marshalling the class to XMLDataFormatDefinition
instance for use in routesCopyright © 2018 Pivotal Software, Inc.. All rights reserved.