Home » spring-ws-1.5.9-with-dependencies » org.springframework » oxm » [javadoc | source]
org.springframework.oxm
abstract public class: AbstractMarshaller [javadoc | source]
java.lang.Object
   org.springframework.oxm.AbstractMarshaller

All Implemented Interfaces:
    Unmarshaller, Marshaller

Direct Known Subclasses:
    AnnotationXStreamMarshaller, XmlBeansMarshaller, XStreamMarshaller, CastorMarshaller, JibxMarshaller

Abstract implementation of the Marshaller and Unmarshaller interface. This implementation inspects the given Source or Result, and defers further handling to overridable template methods.
Field Summary
protected final  Log logger    Logger available to subclasses. 
Method from org.springframework.oxm.AbstractMarshaller Summary:
createDocumentBuilder,   createDocumentBuilderFactory,   createXmlReader,   marshal,   marshalDomNode,   marshalDomResult,   marshalOutputStream,   marshalSaxHandlers,   marshalSaxResult,   marshalStaxResult,   marshalStreamResult,   marshalWriter,   marshalXmlEventWriter,   marshalXmlStreamWriter,   unmarshal,   unmarshalDomNode,   unmarshalDomSource,   unmarshalInputStream,   unmarshalReader,   unmarshalSaxReader,   unmarshalSaxSource,   unmarshalStaxSource,   unmarshalStreamSource,   unmarshalXmlEventReader,   unmarshalXmlStreamReader
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.oxm.AbstractMarshaller Detail:
 protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory) throws ParserConfigurationException 
    Create a DocumentBuilder that this marshaller will use for creating DOM documents when passed an empty DOMSource. Can be overridden in subclasses, adding further initialization of the builder.
 protected DocumentBuilderFactory createDocumentBuilderFactory() throws ParserConfigurationException 
    Create a DocumentBuilder that this marshaller will use for creating DOM documents when passed an empty DOMSource. The resulting DocumentBuilderFactory is cached, so this method will only be called once.
 protected XMLReader createXmlReader() throws SAXException 
    Create a XMLReader that this marshaller will when passed an empty SAXSource.
 public final  void marshal(Object graph,
    Result result) throws XmlMappingException, IOException 
    Marshals the object graph with the given root into the provided javax.xml.transform.Result.

    This implementation inspects the given result, and calls marshalDomResult, marshalSaxResult, or marshalStreamResult.

 abstract protected  void marshalDomNode(Object graph,
    Node node) throws XmlMappingException
    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.

 protected  void marshalDomResult(Object graph,
    DOMResult domResult) throws XmlMappingException 
    Template method for handling DOMResults. This implementation defers to marshalDomNode.
 abstract protected  void marshalOutputStream(Object graph,
    OutputStream outputStream) throws XmlMappingException, IOException
    Abstract template method for marshalling the given object graph to a OutputStream.
 abstract protected  void marshalSaxHandlers(Object graph,
    ContentHandler contentHandler,
    LexicalHandler lexicalHandler) throws XmlMappingException
    Abstract template method for marshalling the given object graph to a SAX ContentHandler.
 protected  void marshalSaxResult(Object graph,
    SAXResult saxResult) throws XmlMappingException 
    Template method for handling SAXResults. This implementation defers to marshalSaxHandlers.
 protected  void marshalStaxResult(Object graph,
    Result staxResult) throws XmlMappingException 
    Template method for handling StaxResults. This implementation defers to marshalXMLSteamWriter, or marshalXMLEventConsumer, depending on what is contained in the StaxResult.
 protected  void marshalStreamResult(Object graph,
    StreamResult streamResult) throws XmlMappingException, IOException 
    Template method for handling StreamResults. This implementation defers to marshalOutputStream, or marshalWriter, depending on what is contained in the StreamResult
 abstract protected  void marshalWriter(Object graph,
    Writer writer) throws XmlMappingException, IOException
    Abstract template method for marshalling the given object graph to a Writer.
 abstract protected  void marshalXmlEventWriter(Object graph,
    XMLEventWriter eventWriter) throws XmlMappingException
    Abstract template method for marshalling the given object to a StAX XMLEventWriter.
 abstract protected  void marshalXmlStreamWriter(Object graph,
    XMLStreamWriter streamWriter) throws XmlMappingException
    Abstract template method for marshalling the given object to a StAX XMLStreamWriter.
 public final Object unmarshal(Source source) throws XmlMappingException, IOException 
    Unmarshals the given provided javax.xml.transform.Source into an object graph.

    This implementation inspects the given result, and calls unmarshalDomSource, unmarshalSaxSource, or unmarshalStreamSource.

 abstract protected Object unmarshalDomNode(Node node) throws XmlMappingException
    Abstract template method for unmarshalling from a given DOM Node.
 protected Object unmarshalDomSource(DOMSource domSource) throws XmlMappingException 
    Template method for handling DOMSources. This implementation defers to unmarshalDomNode. If the given source is empty, an empty source Document will be created as a placeholder.
 abstract protected Object unmarshalInputStream(InputStream inputStream) throws XmlMappingException, IOException
    Abstract template method for unmarshalling from a given InputStream.
 abstract protected Object unmarshalReader(Reader reader) throws XmlMappingException, IOException
    Abstract template method for unmarshalling from a given Reader.
 abstract protected Object unmarshalSaxReader(XMLReader xmlReader,
    InputSource inputSource) throws XmlMappingException, IOException
    Abstract template method for unmarshalling using a given SAX XMLReader and InputSource.
 protected Object unmarshalSaxSource(SAXSource saxSource) throws XmlMappingException, IOException 
    Template method for handling SAXSources. This implementation defers to unmarshalSaxReader.
 protected Object unmarshalStaxSource(Source staxSource) throws XmlMappingException 
    Template method for handling StaxSources. This implementation defers to unmarshalXmlStreamReader, or unmarshalXmlEventReader.
 protected Object unmarshalStreamSource(StreamSource streamSource) throws XmlMappingException, IOException 
    Template method for handling StreamSources. This implementation defers to unmarshalInputStream, or unmarshalReader.
 abstract protected Object unmarshalXmlEventReader(XMLEventReader eventReader) throws XmlMappingException
    Abstract template method for unmarshalling from a given Stax XMLEventReader.
 abstract protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException
    Abstract template method for unmarshalling from a given Stax XMLStreamReader.