org.apache.camel.dataformat.castor
Class AbstractCastorDataFormat
java.lang.Object
org.apache.camel.dataformat.castor.AbstractCastorDataFormat
- All Implemented Interfaces:
- org.apache.camel.spi.DataFormat
- Direct Known Subclasses:
- CastorDataFormat
public abstract class AbstractCastorDataFormat
- extends Object
- implements org.apache.camel.spi.DataFormat
An abstract class which implement data format (DataFormat)
interface which leverage the Castor library for XML marshaling and
unmarshaling
- Version:
- $Revision$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_ENCODING
public static final String DEFAULT_ENCODING
- The default encoding used for stream access.
- See Also:
- Constant Field Values
AbstractCastorDataFormat
public AbstractCastorDataFormat()
AbstractCastorDataFormat
public AbstractCastorDataFormat(org.exolab.castor.xml.XMLContext xmlContext)
marshal
public void marshal(org.apache.camel.Exchange exchange,
Object body,
OutputStream outputStream)
throws Exception
- Specified by:
marshal in interface org.apache.camel.spi.DataFormat
- Throws:
Exception
unmarshal
public Object unmarshal(org.apache.camel.Exchange exchange,
InputStream inputStream)
throws Exception
- Specified by:
unmarshal in interface org.apache.camel.spi.DataFormat
- Throws:
Exception
getXmlContext
public org.exolab.castor.xml.XMLContext getXmlContext(org.apache.camel.spi.ClassResolver resolver)
throws Exception
- Throws:
Exception
getUnmarshaller
public org.exolab.castor.xml.Unmarshaller getUnmarshaller(org.apache.camel.Exchange exchange)
throws Exception
- Throws:
Exception
getMarshaller
public org.exolab.castor.xml.Marshaller getMarshaller(org.apache.camel.Exchange exchange)
throws Exception
- Throws:
Exception
setXmlContext
public void setXmlContext(org.exolab.castor.xml.XMLContext xmlContext)
getMappingFile
public String getMappingFile()
setMappingFile
public void setMappingFile(String mappingFile)
setMarshaller
public void setMarshaller(org.exolab.castor.xml.Marshaller marshaller)
setUnmarshaller
public void setUnmarshaller(org.exolab.castor.xml.Unmarshaller unmarshaller)
getClassNames
public String[] getClassNames()
setClassNames
public void setClassNames(String[] classNames)
getPackages
public String[] getPackages()
setPackages
public void setPackages(String[] packages)
getEncoding
public String getEncoding()
setEncoding
public void setEncoding(String encoding)
isValidation
public boolean isValidation()
setValidation
public void setValidation(boolean validation)
Apache CAMEL