|
||||||||||
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.Jaxb1Marshaller
public class Jaxb1Marshaller
Implementation of the Marshaller
interface for JAXB 1.0.
contextPath
property on this bean, possibly customize the
marshaller and unmarshaller by setting properties, and validations, and to refer to it.
AbstractJaxbMarshaller.setContextPath(String)
,
AbstractJaxbMarshaller.setMarshallerProperties(java.util.Map)
,
AbstractJaxbMarshaller.setUnmarshallerProperties(java.util.Map)
,
setValidating(boolean)
Field Summary |
---|
Fields inherited from class org.springframework.oxm.jaxb.AbstractJaxbMarshaller |
---|
logger |
Constructor Summary | |
---|---|
Jaxb1Marshaller()
|
Method Summary | |
---|---|
protected javax.xml.bind.JAXBContext |
createJaxbContext()
Template method that returns a newly created JAXB context. |
protected void |
initJaxbUnmarshaller(javax.xml.bind.Unmarshaller unmarshaller)
Template method that can overridden by concrete JAXB marshallers for custom initialization behavior. |
void |
marshal(java.lang.Object graph,
javax.xml.transform.Result result)
Marshals the object graph with the given root into the provided Result . |
void |
setValidating(boolean validating)
Set if the JAXB Unmarshaller should validate the incoming document. |
boolean |
supports(java.lang.Class clazz)
Indicates whether this marshaller can marshal instances of the supplied type. |
java.lang.Object |
unmarshal(javax.xml.transform.Source source)
Unmarshals the given Source into an object graph. |
Methods inherited from class org.springframework.oxm.jaxb.AbstractJaxbMarshaller |
---|
afterPropertiesSet, convertJaxbException, createMarshaller, createUnmarshaller, getContextPath, getJaxbContext, initJaxbMarshaller, 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 Jaxb1Marshaller()
Method Detail |
---|
public void setValidating(boolean validating)
Unmarshaller
should validate the incoming document. Default is false
.
public boolean supports(java.lang.Class clazz)
Marshaller
clazz
- the class that this marshaller is being asked if it can marshal
true
if this marshaller can indeed marshal instances of the supplied class;
false
otherwiseprotected final javax.xml.bind.JAXBContext createJaxbContext() throws javax.xml.bind.JAXBException
AbstractJaxbMarshaller
afterPropertiesSet()
.
createJaxbContext
in class AbstractJaxbMarshaller
javax.xml.bind.JAXBException
protected void initJaxbUnmarshaller(javax.xml.bind.Unmarshaller unmarshaller) throws javax.xml.bind.JAXBException
AbstractJaxbMarshaller
Unmarshaller
, and after the respective properties have been set.
Default implementation does nothing.
initJaxbUnmarshaller
in class AbstractJaxbMarshaller
javax.xml.bind.JAXBException
public void marshal(java.lang.Object graph, javax.xml.transform.Result result)
Marshaller
Result
.
graph
- the root of the object graph to marshalresult
- the result to marshal topublic java.lang.Object unmarshal(javax.xml.transform.Source source)
Unmarshaller
Source
into an object graph.
source
- the source to marshal from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |