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: 834590 $

Constructor Summary
JaxbDataFormat()
           
JaxbDataFormat(JAXBContext context)
           
JaxbDataFormat(String contextPath)
           
 
Method Summary
protected  JAXBContext createContext()
           
 JAXBContext getContext()
           
 String getContextPath()
           
 String getEncoding()
           
 boolean isIgnoreJAXBElement()
           
 boolean isPrettyPrint()
           
 void marshal(Exchange exchange, Object graph, OutputStream stream)
           
 void setContext(JAXBContext context)
           
 void setContextPath(String contextPath)
           
 void setEncoding(String encoding)
           
 void setIgnoreJAXBElement(boolean flag)
           
 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,
                        ClassNotFoundException
Specified by:
unmarshal in interface DataFormat
Throws:
IOException
ClassNotFoundException

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)

getEncoding

public String getEncoding()

setEncoding

public void setEncoding(String encoding)

createContext

protected JAXBContext createContext()
                             throws JAXBException
Throws:
JAXBException


Copyright © 2007-2009 The Apache Software Foundation. All Rights Reserved.