Package org.springframework.oxm.support
Class MarshallingSource
java.lang.Object
javax.xml.transform.sax.SAXSource
org.springframework.oxm.support.MarshallingSource
- All Implemented Interfaces:
Source
Source
implementation that uses a Marshaller
.Can be constructed with a
Marshaller
and an object to be marshalled.
Even though MarshallingSource
extends from SAXSource
, calling the methods of
SAXSource
is not supported. In general, the only supported operation on this class is
to use the XMLReader
obtained via SAXSource.getXMLReader()
to parse the input source obtained via SAXSource.getInputSource()
. Calling setXMLReader(XMLReader)
or setInputSource(InputSource)
will result in
UnsupportedOperationException
s.
- Since:
- 3.0
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMarshallingSource
(Marshaller marshaller, Object content) Create a newMarshallingSource
with the given marshaller and content. -
Method Summary
Modifier and TypeMethodDescriptionReturn the object to be marshalled.Return theMarshaller
used by thisMarshallingSource
.void
setInputSource
(InputSource inputSource) Throws aUnsupportedOperationException
.void
setXMLReader
(XMLReader reader) Throws aUnsupportedOperationException
.Methods inherited from class javax.xml.transform.sax.SAXSource
getInputSource, getSystemId, getXMLReader, isEmpty, setSystemId, sourceToInputSource
-
Constructor Details
-
MarshallingSource
Create a newMarshallingSource
with the given marshaller and content.- Parameters:
marshaller
- the marshaller to usecontent
- the object to be marshalled
-
-
Method Details
-
getMarshaller
Return theMarshaller
used by thisMarshallingSource
. -
getContent
Return the object to be marshalled. -
setInputSource
Throws aUnsupportedOperationException
.- Overrides:
setInputSource
in classSAXSource
-
setXMLReader
Throws aUnsupportedOperationException
.- Overrides:
setXMLReader
in classSAXSource
-