|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.oxm.jaxb.AbstractJaxbMarshaller
org.springframework.oxm.jaxb.Jaxb2Marshaller
public class Jaxb2Marshaller
Implementation of the Marshaller interface for JAXB 2.0.
contextPath or the classesToBeBound property on
this bean, possibly customize the marshaller and unmarshaller by setting properties, schemas, adapters, and
listeners, and to refer to it.
AbstractJaxbMarshaller.setContextPath(String),
setClassesToBeBound(Class[]),
setJaxbContextProperties(java.util.Map),
AbstractJaxbMarshaller.setMarshallerProperties(java.util.Map),
AbstractJaxbMarshaller.setUnmarshallerProperties(java.util.Map),
setSchema(org.springframework.core.io.Resource),
setSchemas(org.springframework.core.io.Resource[]),
setMarshallerListener(javax.xml.bind.Marshaller.Listener),
setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener),
setAdapters(javax.xml.bind.annotation.adapters.XmlAdapter[])| Field Summary |
|---|
| Fields inherited from class org.springframework.oxm.jaxb.AbstractJaxbMarshaller |
|---|
logger |
| Constructor Summary | |
|---|---|
Jaxb2Marshaller()
|
|
| Method Summary | |
|---|---|
protected javax.xml.bind.JAXBContext |
createJaxbContext()
|
protected void |
initJaxbMarshaller(javax.xml.bind.Marshaller marshaller)
|
protected void |
initJaxbUnmarshaller(javax.xml.bind.Unmarshaller unmarshaller)
|
void |
marshal(java.lang.Object graph,
javax.xml.transform.Result result)
|
void |
marshal(java.lang.Object graph,
javax.xml.transform.Result result,
org.springframework.oxm.mime.MimeContainer mimeContainer)
|
void |
setAdapters(javax.xml.bind.annotation.adapters.XmlAdapter[] adapters)
Sets the XmlAdapters to be registered with the JAXB Marshaller and
Unmarshaller |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader)
|
void |
setClassesToBeBound(java.lang.Class[] classesToBeBound)
Sets the list of java classes to be recognized by a newly created JAXBContext. |
void |
setJaxbContextProperties(java.util.Map<java.lang.String,?> jaxbContextProperties)
Sets the JAXBContext properties. |
void |
setMarshallerListener(javax.xml.bind.Marshaller.Listener marshallerListener)
Sets the Marshaller.Listener to be registered with the JAXB Marshaller. |
void |
setMtomEnabled(boolean mtomEnabled)
Indicates whether MTOM support should be enabled or not. |
void |
setSchema(org.springframework.core.io.Resource schemaResource)
Sets the schema resource to use for validation. |
void |
setSchemaLanguage(java.lang.String schemaLanguage)
Sets the schema language. |
void |
setSchemas(org.springframework.core.io.Resource[] schemaResources)
Sets the schema resources to use for validation. |
void |
setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener unmarshallerListener)
Sets the Unmarshaller.Listener to be registered with the JAXB Unmarshaller. |
boolean |
supports(java.lang.Class clazz)
|
boolean |
supports(java.lang.reflect.Type type)
Indicates whether this marshaller can marshal instances of the supplied type. |
java.lang.Object |
unmarshal(javax.xml.transform.Source source)
|
java.lang.Object |
unmarshal(javax.xml.transform.Source source,
org.springframework.oxm.mime.MimeContainer mimeContainer)
|
| Methods inherited from class org.springframework.oxm.jaxb.AbstractJaxbMarshaller |
|---|
afterPropertiesSet, convertJaxbException, createMarshaller, createUnmarshaller, getContextPath, getJaxbContext, setContextPath, setContextPaths, setMarshallerProperties, setUnmarshallerProperties, setValidationEventHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Jaxb2Marshaller()
| Method Detail |
|---|
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void setAdapters(javax.xml.bind.annotation.adapters.XmlAdapter[] adapters)
XmlAdapters to be registered with the JAXB Marshaller and
Unmarshaller
public void setClassesToBeBound(java.lang.Class[] classesToBeBound)
contextPath is required.
AbstractJaxbMarshaller.setContextPath(String)public void setJaxbContextProperties(java.util.Map<java.lang.String,?> jaxbContextProperties)
JAXBContext properties. These implementation-specific properties will be set on the
JAXBContext.
public void setMarshallerListener(javax.xml.bind.Marshaller.Listener marshallerListener)
Marshaller.Listener to be registered with the JAXB Marshaller.
public void setMtomEnabled(boolean mtomEnabled)
false, marshalling using
XOP/MTOM is not enabled.
public void setSchemaLanguage(java.lang.String schemaLanguage)
http://www.w3.org/2001/XMLSchema".
XMLConstants.W3C_XML_SCHEMA_NS_URI,
XMLConstants.RELAXNG_NS_URIpublic void setSchema(org.springframework.core.io.Resource schemaResource)
public void setSchemas(org.springframework.core.io.Resource[] schemaResources)
public void setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener unmarshallerListener)
Unmarshaller.Listener to be registered with the JAXB Unmarshaller.
public boolean supports(java.lang.reflect.Type type)
GenericMarshaller
supports in interface GenericMarshallersupports in interface GenericUnmarshallertype - the type that this marshaller is being asked if it can marshal
true if this marshaller can indeed marshal instances of the supplied type;
false otherwisepublic boolean supports(java.lang.Class clazz)
supports in interface org.springframework.oxm.Marshallersupports in interface org.springframework.oxm.Unmarshaller
protected javax.xml.bind.JAXBContext createJaxbContext()
throws java.lang.Exception
createJaxbContext in class org.springframework.oxm.jaxb.AbstractJaxbMarshallerjava.lang.Exception
protected void initJaxbMarshaller(javax.xml.bind.Marshaller marshaller)
throws javax.xml.bind.JAXBException
initJaxbMarshaller in class org.springframework.oxm.jaxb.AbstractJaxbMarshallerjavax.xml.bind.JAXBException
protected void initJaxbUnmarshaller(javax.xml.bind.Unmarshaller unmarshaller)
throws javax.xml.bind.JAXBException
initJaxbUnmarshaller in class org.springframework.oxm.jaxb.AbstractJaxbMarshallerjavax.xml.bind.JAXBException
public void marshal(java.lang.Object graph,
javax.xml.transform.Result result)
throws org.springframework.oxm.XmlMappingException
marshal in interface org.springframework.oxm.Marshallerorg.springframework.oxm.XmlMappingException
public void marshal(java.lang.Object graph,
javax.xml.transform.Result result,
org.springframework.oxm.mime.MimeContainer mimeContainer)
throws org.springframework.oxm.XmlMappingException
marshal in interface org.springframework.oxm.mime.MimeMarshallerorg.springframework.oxm.XmlMappingException
public java.lang.Object unmarshal(javax.xml.transform.Source source)
throws org.springframework.oxm.XmlMappingException
unmarshal in interface org.springframework.oxm.Unmarshallerorg.springframework.oxm.XmlMappingException
public java.lang.Object unmarshal(javax.xml.transform.Source source,
org.springframework.oxm.mime.MimeContainer mimeContainer)
throws org.springframework.oxm.XmlMappingException
unmarshal in interface org.springframework.oxm.mime.MimeUnmarshallerorg.springframework.oxm.XmlMappingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||