java.lang.Object | ||
↳ | org.springframework.oxm.support.AbstractMarshaller | |
↳ | org.springframework.oxm.jibx.JibxMarshaller |
Implementation of the Marshaller
and Unmarshaller
interfaces for JiBX.
The typical usage will be to set the targetClass
and optionally the
bindingName
property on this bean.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.oxm.support.AbstractMarshaller
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
| |||||||||||
Convert the given
JiBXException to an appropriate exception from the
org.springframework.oxm hierarchy. | |||||||||||
Set the optional binding name for this instance.
| |||||||||||
Sets the internal subset Id for the DTD declaration written when marshalling.
| |||||||||||
Sets the public Id for the DTD declaration written when marshalling.
| |||||||||||
Sets the root element name for the DTD declaration written when marshalling.
| |||||||||||
Sets the system Id for the DTD declaration written when marshalling.
| |||||||||||
Set the document encoding using for marshalling.
| |||||||||||
Set the number of nesting indent spaces.
| |||||||||||
Set the document standalone flag for marshalling.
| |||||||||||
Set the target class for this instance.
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new
IMarshallingContext , configured with the correct indentation. | |||||||||||
Create a new
IUnmarshallingContext . | |||||||||||
Abstract template method for marshalling the given object graph to a DOM
Node . | |||||||||||
Abstract template method for marshalling the given object graph to a
OutputStream . | |||||||||||
Abstract template method for marshalling the given object graph to a SAX
ContentHandler . | |||||||||||
Abstract template method for marshalling the given object graph to a
Writer . | |||||||||||
Abstract template method for marshalling the given object to a StAX
XMLEventWriter . | |||||||||||
Abstract template method for marshalling the given object to a StAX
XMLStreamWriter . | |||||||||||
Abstract template method for unmarshalling from a given DOM
Node . | |||||||||||
Abstract template method for unmarshalling from a given
InputStream . | |||||||||||
Abstract template method for unmarshalling from a given
Reader . | |||||||||||
Abstract template method for unmarshalling using a given SAX
XMLReader
and InputSource . | |||||||||||
Abstract template method for unmarshalling from a given Stax
XMLEventReader . | |||||||||||
Abstract template method for unmarshalling from a given Stax
XMLStreamReader . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.oxm.support.AbstractMarshaller
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.oxm.Marshaller
| |||||||||||
From interface
org.springframework.oxm.Unmarshaller
|
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
JiBXException |
---|
Convert the given JiBXException
to an appropriate exception from the
org.springframework.oxm
hierarchy.
A boolean flag is used to indicate whether this exception occurs during marshalling or unmarshalling, since JiBX itself does not make this distinction in its exception hierarchy.
ex | JiBXException that occured |
---|---|
marshalling | indicates whether the exception occurs during marshalling (true ),
or unmarshalling (false ) |
XmlMappingException
Sets the internal subset Id for the DTD declaration written when marshalling. By default, this is
null
. Only used when the root element also has been set.
Sets the public Id for the DTD declaration written when marshalling. By default, this is
null
. Only used when the root element also has been set. Set either this property or
docTypeSystemId
, not both.
Sets the root element name for the DTD declaration written when marshalling. By default, this is
null
(i.e. no DTD declaration is written). If set to a value, the system ID or public ID also need to
be set.
Sets the system Id for the DTD declaration written when marshalling. By default, this is
null
. Only used when the root element also has been set. Set either this property or
docTypePublicId
, not both.
Set the document encoding using for marshalling. Default is UTF-8.
Set the number of nesting indent spaces. Default is -1
, i.e. no indentation.
Set the document standalone flag for marshalling. By default, this flag is not present.
Set the target class for this instance. This property is required.
Create a new IMarshallingContext
, configured with the correct indentation.
in case of errors | |
JiBXException |
Create a new IUnmarshallingContext
.
in case of errors | |
JiBXException |
Abstract template method for marshalling the given object graph to a DOM Node
.
In practice, node is be a Document
node, a DocumentFragment
node,
or a Element
node. In other words, a node that accepts children.
graph | the root of the object graph to marshal |
---|---|
node | the DOM node that will contain the result tree |
XmlMappingException |
---|
Abstract template method for marshalling the given object graph to a OutputStream
.
graph | the root of the object graph to marshal |
---|---|
outputStream | the OutputStream to write to |
IOException | |
---|---|
XmlMappingException |
Abstract template method for marshalling the given object graph to a SAX ContentHandler
.
graph | the root of the object graph to marshal |
---|---|
contentHandler | the SAX ContentHandler |
lexicalHandler | the SAX2 LexicalHandler . Can be null . |
XmlMappingException |
---|
Abstract template method for marshalling the given object graph to a Writer
.
graph | the root of the object graph to marshal |
---|---|
writer | the Writer to write to |
IOException | |
---|---|
XmlMappingException |
Abstract template method for marshalling the given object to a StAX XMLEventWriter
.
graph | the root of the object graph to marshal |
---|---|
eventWriter | the XMLEventWriter to write to |
Abstract template method for marshalling the given object to a StAX XMLStreamWriter
.
graph | the root of the object graph to marshal |
---|---|
streamWriter | the XMLStreamWriter to write to |
XmlMappingException |
---|
Abstract template method for unmarshalling from a given DOM Node
.
node | the DOM node that contains the objects to be unmarshalled |
---|
XmlMappingException |
---|
Abstract template method for unmarshalling from a given InputStream
.
inputStream | the InputStreamStream to read from |
---|
IOException | |
---|---|
XmlMappingException |
Abstract template method for unmarshalling from a given Reader
.
reader | the Reader to read from |
---|
IOException | |
---|---|
XmlMappingException |
Abstract template method for unmarshalling using a given SAX XMLReader
and InputSource
.
xmlReader | the SAX XMLReader to parse with |
---|---|
inputSource | the input source to parse from |
IOException | |
---|---|
XmlMappingException |
Abstract template method for unmarshalling from a given Stax XMLEventReader
.
eventReader | the XMLEventReader to read from |
---|
Abstract template method for unmarshalling from a given Stax XMLStreamReader
.
streamReader | the XMLStreamReader to read from |
---|