public class JaxbDataFormat
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.DataFormat, org.apache.camel.CamelContextAware
DataFormat
)
using JAXB2 to marshal to and from XMLConstructor and Description |
---|
JaxbDataFormat() |
JaxbDataFormat(JAXBContext context) |
JaxbDataFormat(String contextPath) |
public JaxbDataFormat()
public JaxbDataFormat(JAXBContext context)
public JaxbDataFormat(String contextPath)
public void marshal(org.apache.camel.Exchange exchange, Object graph, OutputStream stream) throws IOException, SAXException
marshal
in interface org.apache.camel.spi.DataFormat
IOException
SAXException
public Object unmarshal(org.apache.camel.Exchange exchange, InputStream stream) throws IOException, SAXException
unmarshal
in interface org.apache.camel.spi.DataFormat
IOException
SAXException
protected boolean needFiltering(org.apache.camel.Exchange exchange)
public boolean isIgnoreJAXBElement()
public void setIgnoreJAXBElement(boolean flag)
public boolean isMustBeJAXBElement()
public void setMustBeJAXBElement(boolean mustBeJAXBElement)
public JAXBContext getContext()
public void setContext(JAXBContext context)
public String getContextPath()
public void setContextPath(String contextPath)
public SchemaFactory getSchemaFactory()
public void setSchemaFactory(SchemaFactory schemaFactory)
public String getSchema()
public void setSchema(String schema)
public boolean isPrettyPrint()
public void setPrettyPrint(boolean prettyPrint)
public boolean isFragment()
public void setFragment(boolean fragment)
public boolean isFilterNonXmlChars()
public void setFilterNonXmlChars(boolean filterNonXmlChars)
public String getEncoding()
public void setEncoding(String encoding)
public QName getPartNamespace()
public void setPartNamespace(QName partNamespace)
public String getPartClass()
public void setPartClass(String partClass)
public String getNamespacePrefixRef()
public void setNamespacePrefixRef(String namespacePrefixRef)
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
public JaxbXmlStreamWriterWrapper getXmlStreamWriterWrapper()
public void setXmlStreamWriterWrapper(JaxbXmlStreamWriterWrapper xmlStreamWriterWrapper)
public String getSchemaLocation()
public void setSchemaLocation(String schemaLocation)
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.ServiceSupport
Exception
protected JAXBContext createContext() throws JAXBException
JAXBException
protected Unmarshaller createUnmarshaller() throws JAXBException, SAXException, FileNotFoundException, MalformedURLException
protected Marshaller createMarshaller() throws JAXBException, SAXException, FileNotFoundException, MalformedURLException
public static SchemaFactory createSchemaFactory()
Apache Camel