org.apache.camel.converter.jaxb
Class JaxbDataFormat

java.lang.Object
  extended by org.apache.camel.converter.jaxb.JaxbDataFormat
All Implemented Interfaces:
DataFormat

public class JaxbDataFormat
extends Object
implements DataFormat

A data format (DataFormat) using JAXB2 to marshal to and from XML

Version:
$Revision: 901192 $

Constructor Summary
JaxbDataFormat()
           
JaxbDataFormat(JAXBContext context)
           
JaxbDataFormat(String contextPath)
           
 
Method Summary
protected  JAXBContext createContext()
           
 JAXBContext getContext()
           
 String getContextPath()
           
 String getEncoding()
           
 String getPartClass()
           
 QName getPartNamespace()
           
 boolean isFilterNonXmlChars()
           
 boolean isIgnoreJAXBElement()
           
 boolean isPrettyPrint()
           
 void marshal(Exchange exchange, Object graph, OutputStream stream)
           
protected  boolean needFiltering(Exchange exchange)
           
 void setContext(JAXBContext context)
           
 void setContextPath(String contextPath)
           
 void setEncoding(String encoding)
           
 void setFilterNonXmlChars(boolean filterNonXmlChars)
           
 void setIgnoreJAXBElement(boolean flag)
           
 void setPartClass(String partClass)
           
 void setPartNamespace(QName partNamespace)
           
 void setPrettyPrint(boolean prettyPrint)
           
 Object unmarshal(Exchange exchange, InputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxbDataFormat

public JaxbDataFormat()

JaxbDataFormat

public JaxbDataFormat(JAXBContext context)

JaxbDataFormat

public JaxbDataFormat(String contextPath)
Method Detail

marshal

public void marshal(Exchange exchange,
                    Object graph,
                    OutputStream stream)
             throws IOException
Specified by:
marshal in interface DataFormat
Throws:
IOException

unmarshal

public Object unmarshal(Exchange exchange,
                        InputStream stream)
                 throws IOException
Specified by:
unmarshal in interface DataFormat
Throws:
IOException

needFiltering

protected boolean needFiltering(Exchange exchange)

isIgnoreJAXBElement

public boolean isIgnoreJAXBElement()

setIgnoreJAXBElement

public void setIgnoreJAXBElement(boolean flag)

getContext

public JAXBContext getContext()
                       throws JAXBException
Throws:
JAXBException

setContext

public void setContext(JAXBContext context)

getContextPath

public String getContextPath()

setContextPath

public void setContextPath(String contextPath)

isPrettyPrint

public boolean isPrettyPrint()

setPrettyPrint

public void setPrettyPrint(boolean prettyPrint)

isFilterNonXmlChars

public boolean isFilterNonXmlChars()

setFilterNonXmlChars

public void setFilterNonXmlChars(boolean filterNonXmlChars)

getEncoding

public String getEncoding()

setEncoding

public void setEncoding(String encoding)

getPartNamespace

public final QName getPartNamespace()

setPartNamespace

public final void setPartNamespace(QName partNamespace)

getPartClass

public final String getPartClass()

setPartClass

public final void setPartClass(String partClass)

createContext

protected JAXBContext createContext()
                             throws JAXBException
Throws:
JAXBException


Apache CAMEL