org.springframework.oxm.castor

Class CastorMarshaller

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String DEFAULT_ENCODING
      Deprecated. 
      The default encoding used for stream access: UTF-8.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CastorMarshaller()
      Deprecated. 
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      void afterPropertiesSet()
      Deprecated. 
      Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.
      protected XmlMappingException convertCastorException(org.exolab.castor.xml.XMLException ex, boolean marshalling)
      Deprecated. 
      Convert the given XMLException to an appropriate exception from the org.springframework.oxm hierarchy.
      protected org.exolab.castor.xml.XMLContext createXMLContext(Resource[] mappingLocations, java.lang.Class<?>[] targetClasses, java.lang.String[] targetPackages)
      Deprecated. 
      Create the Castor XMLContext.
      protected void customizeMarshaller(org.exolab.castor.xml.Marshaller marshaller)
      Deprecated. 
      Template method that allows for customizing of the given Castor Marshaller.
      protected void customizeUnmarshaller(org.exolab.castor.xml.Unmarshaller unmarshaller)
      Deprecated. 
      Template method that allows for customizing of the given Castor Unmarshaller.
      protected java.lang.String getDefaultEncoding()
      Deprecated. 
      Determine the default encoding to use for marshalling or unmarshalling from a byte stream, or null if none.
      protected void marshalDomNode(java.lang.Object graph, org.w3c.dom.Node node)
      Deprecated. 
      Abstract template method for marshalling the given object graph to a DOM Node.
      protected void marshalOutputStream(java.lang.Object graph, java.io.OutputStream outputStream)
      Deprecated. 
      Abstract template method for marshalling the given object graph to a OutputStream.
      protected void marshalSaxHandlers(java.lang.Object graph, org.xml.sax.ContentHandler contentHandler, org.xml.sax.ext.LexicalHandler lexicalHandler)
      Deprecated. 
      Abstract template method for marshalling the given object graph to a SAX ContentHandler.
      protected void marshalWriter(java.lang.Object graph, java.io.Writer writer)
      Deprecated. 
      Abstract template method for marshalling the given object graph to a Writer.
      protected void marshalXmlEventWriter(java.lang.Object graph, javax.xml.stream.XMLEventWriter eventWriter)
      Deprecated. 
      Abstract template method for marshalling the given object to a StAX XMLEventWriter.
      protected void marshalXmlStreamWriter(java.lang.Object graph, javax.xml.stream.XMLStreamWriter streamWriter)
      Deprecated. 
      Abstract template method for marshalling the given object to a StAX XMLStreamWriter.
      void setBeanClassLoader(java.lang.ClassLoader classLoader)
      Deprecated. 
      Callback that supplies the bean class loader to a bean instance.
      void setCastorProperties(java.util.Map<java.lang.String,java.lang.String> castorProperties)
      Deprecated. 
      Set Castor-specific properties for marshalling and unmarshalling.
      void setClassDescriptorResolver(org.exolab.castor.xml.XMLClassDescriptorResolver classDescriptorResolver)
      Deprecated. 
      Set the XMLClassDescriptorResolver to be used during unmarshalling.
      void setClearCollections(boolean clearCollections)
      Deprecated. 
      Sets whether this unmarshaller should clear collections upon the first use.
      void setDoctypes(java.util.Map<java.lang.String,java.lang.String> doctypes)
      Deprecated. 
      Set the map containing document type definition for the marshaller.
      void setEncoding(java.lang.String encoding)
      Deprecated. 
      Set the encoding to be used for stream access.
      void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
      Deprecated. 
      Set the EntityResolver to be used during unmarshalling.
      void setIdResolver(org.exolab.castor.xml.IDResolver idResolver)
      Deprecated. 
      Set the Castor IDResolver to be used during unmarshalling.
      void setIgnoreExtraAttributes(boolean ignoreExtraAttributes)
      Deprecated. 
      Set whether the Castor Unmarshaller should ignore attributes that do not match a specific field.
      void setIgnoreExtraElements(boolean ignoreExtraElements)
      Deprecated. 
      Set whether the Castor Unmarshaller should ignore elements that do not match a specific field.
      void setMappingLocation(Resource mappingLocation)
      Deprecated. 
      Set the locations of the Castor XML mapping files.
      void setMappingLocations(Resource... mappingLocations)
      Deprecated. 
      Set the locations of the Castor XML mapping files.
      void setMarshalAsDocument(boolean marshalAsDocument)
      Deprecated. 
      Set whether this marshaller should output the xml declaration.
      void setMarshalExtendedType(boolean marshalExtendedType)
      Deprecated. 
      Set whether this marshaller should output for given type the xsi:type attribute.
      void setNamespaceMappings(java.util.Map<java.lang.String,java.lang.String> namespaceMappings)
      Deprecated. 
      Set the namespace mappings.
      void setNamespaceToPackageMapping(java.util.Map<java.lang.String,java.lang.String> namespaceToPackageMapping)
      Deprecated. 
      Set the namespace to package mappings.
      void setNoNamespaceSchemaLocation(java.lang.String noNamespaceSchemaLocation)
      Deprecated. 
      Set the value of xsi:noNamespaceSchemaLocation attribute.
      void setObjectFactory(org.exolab.castor.util.ObjectFactory objectFactory)
      Deprecated. 
      Set the Castor ObjectFactory to be used during unmarshalling.
      void setProcessingInstructions(java.util.Map<java.lang.String,java.lang.String> processingInstructions)
      Deprecated. 
      Sets the processing instructions that will be used by during marshalling.
      void setReuseObjects(boolean reuseObjects)
      Deprecated. 
      Set whether this unmarshaller should re-use objects.
      void setRootElement(java.lang.String rootElement)
      Deprecated. 
      Set the name of the root element.
      void setRootObject(java.lang.Object root)
      Deprecated. 
      Set the expected root object for the unmarshaller, into which the source will be unmarshalled.
      void setSchemaLocation(java.lang.String schemaLocation)
      Deprecated. 
      Set the value of xsi:schemaLocation attribute.
      void setSuppressNamespaces(boolean suppressNamespaces)
      Deprecated. 
      Sets whether this marshaller should output namespaces.
      void setSuppressXsiType(boolean suppressXsiType)
      Deprecated. 
      Set whether this marshaller should output the xsi:type attribute.
      void setTargetClass(java.lang.Class<?> targetClass)
      Deprecated. 
      Set the Castor target class.
      void setTargetClasses(java.lang.Class<?>... targetClasses)
      Deprecated. 
      Set the Castor target classes.
      void setTargetPackage(java.lang.String targetPackage)
      Deprecated. 
      Set the name of a package with the Castor descriptor classes.
      void setTargetPackages(java.lang.String... targetPackages)
      Deprecated. 
      Set the names of packages with the Castor descriptor classes.
      void setUseXSITypeAtRoot(boolean useXSITypeAtRoot)
      Deprecated. 
      Sets whether this marshaller should output the xsi:type attribute for the root element.
      void setValidating(boolean validating)
      Deprecated. 
      Set whether this marshaller should validate in- and outgoing documents.
      void setWhitespacePreserve(boolean whitespacePreserve)
      Deprecated. 
      Set whether the Castor Unmarshaller should preserve "ignorable" whitespace.
      boolean supports(java.lang.Class<?> clazz)
      Deprecated. 
      Returns true for all classes, i.e.
      protected java.lang.Object unmarshalDomNode(org.w3c.dom.Node node)
      Deprecated. 
      Abstract template method for unmarshalling from a given DOM Node.
      protected java.lang.Object unmarshalInputStream(java.io.InputStream inputStream)
      Deprecated. 
      Abstract template method for unmarshalling from a given InputStream.
      protected java.lang.Object unmarshalReader(java.io.Reader reader)
      Deprecated. 
      Abstract template method for unmarshalling from a given Reader.
      protected java.lang.Object unmarshalSaxReader(org.xml.sax.XMLReader xmlReader, org.xml.sax.InputSource inputSource)
      Deprecated. 
      Abstract template method for unmarshalling using a given SAX XMLReader and InputSource.
      protected java.lang.Object unmarshalXmlEventReader(javax.xml.stream.XMLEventReader eventReader)
      Deprecated. 
      Abstract template method for unmarshalling from a given Stax XMLEventReader.
      protected java.lang.Object unmarshalXmlStreamReader(javax.xml.stream.XMLStreamReader streamReader)
      Deprecated. 
      Abstract template method for unmarshalling from a given Stax XMLStreamReader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_ENCODING

        public static final java.lang.String DEFAULT_ENCODING
        Deprecated. 
        The default encoding used for stream access: UTF-8.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CastorMarshaller

        public CastorMarshaller()
        Deprecated. 
    • Method Detail

      • setEncoding

        public void setEncoding(java.lang.String encoding)
        Deprecated. 
        Set the encoding to be used for stream access.
        See Also:
        DEFAULT_ENCODING
      • getDefaultEncoding

        protected java.lang.String getDefaultEncoding()
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Determine the default encoding to use for marshalling or unmarshalling from a byte stream, or null if none.

        The default implementation returns null.

        Overrides:
        getDefaultEncoding in class AbstractMarshaller
      • setMappingLocation

        public void setMappingLocation(Resource mappingLocation)
        Deprecated. 
        Set the locations of the Castor XML mapping files.
      • setMappingLocations

        public void setMappingLocations(Resource... mappingLocations)
        Deprecated. 
        Set the locations of the Castor XML mapping files.
      • setTargetPackage

        public void setTargetPackage(java.lang.String targetPackage)
        Deprecated. 
        Set the name of a package with the Castor descriptor classes.
      • setTargetPackages

        public void setTargetPackages(java.lang.String... targetPackages)
        Deprecated. 
        Set the names of packages with the Castor descriptor classes.
      • setValidating

        public void setValidating(boolean validating)
        Deprecated. 
        Set whether this marshaller should validate in- and outgoing documents.

        Default is false.

        See Also:
        Marshaller.setValidation(boolean)
      • setSuppressNamespaces

        public void setSuppressNamespaces(boolean suppressNamespaces)
        Deprecated. 
        Sets whether this marshaller should output namespaces.

        The default is false, i.e. namespaces are written.

        See Also:
        Marshaller.setSuppressNamespaces(boolean)
      • setSuppressXsiType

        public void setSuppressXsiType(boolean suppressXsiType)
        Deprecated. 
        Set whether this marshaller should output the xsi:type attribute.

        The default is false, i.e. the xsi:type is written.

        See Also:
        Marshaller.setSuppressXSIType(boolean)
      • setMarshalAsDocument

        public void setMarshalAsDocument(boolean marshalAsDocument)
        Deprecated. 
        Set whether this marshaller should output the xml declaration.

        The default is true, the XML declaration will be written.

        See Also:
        Marshaller.setMarshalAsDocument(boolean)
      • setMarshalExtendedType

        public void setMarshalExtendedType(boolean marshalExtendedType)
        Deprecated. 
        Set whether this marshaller should output for given type the xsi:type attribute.

        The default is true, the xsi:type attribute will be written.

        See Also:
        Marshaller.setMarshalExtendedType(boolean)
      • setRootElement

        public void setRootElement(java.lang.String rootElement)
        Deprecated. 
        Set the name of the root element.
        See Also:
        Marshaller.setRootElement(String)
      • setNoNamespaceSchemaLocation

        public void setNoNamespaceSchemaLocation(java.lang.String noNamespaceSchemaLocation)
        Deprecated. 
        Set the value of xsi:noNamespaceSchemaLocation attribute. When set, the xsi:noNamespaceSchemaLocation attribute will be written for the root element.
        See Also:
        Marshaller.setNoNamespaceSchemaLocation(String)
      • setSchemaLocation

        public void setSchemaLocation(java.lang.String schemaLocation)
        Deprecated. 
        Set the value of xsi:schemaLocation attribute. When set, the xsi:schemaLocation attribute will be written for the root element.
        See Also:
        Marshaller.setSchemaLocation(String)
      • setUseXSITypeAtRoot

        public void setUseXSITypeAtRoot(boolean useXSITypeAtRoot)
        Deprecated. 
        Sets whether this marshaller should output the xsi:type attribute for the root element. This can be useful when the type of the element can not be simply determined from the element name.

        The default is false: The xsi:type attribute for the root element won't be written.

        See Also:
        Marshaller.setUseXSITypeAtRoot(boolean)
      • setWhitespacePreserve

        public void setWhitespacePreserve(boolean whitespacePreserve)
        Deprecated. 
        Set whether the Castor Unmarshaller should preserve "ignorable" whitespace.

        Default is false.

        See Also:
        Unmarshaller.setWhitespacePreserve(boolean)
      • setIgnoreExtraAttributes

        public void setIgnoreExtraAttributes(boolean ignoreExtraAttributes)
        Deprecated. 
        Set whether the Castor Unmarshaller should ignore attributes that do not match a specific field.

        Default is true: Extra attributes are ignored.

        See Also:
        Unmarshaller.setIgnoreExtraAttributes(boolean)
      • setIgnoreExtraElements

        public void setIgnoreExtraElements(boolean ignoreExtraElements)
        Deprecated. 
        Set whether the Castor Unmarshaller should ignore elements that do not match a specific field.

        Default is false: Extra elements are flagged as an error.

        See Also:
        Unmarshaller.setIgnoreExtraElements(boolean)
      • setRootObject

        public void setRootObject(java.lang.Object root)
        Deprecated. 
        Set the expected root object for the unmarshaller, into which the source will be unmarshalled.
        See Also:
        Unmarshaller.setObject(Object)
      • setReuseObjects

        public void setReuseObjects(boolean reuseObjects)
        Deprecated. 
        Set whether this unmarshaller should re-use objects. This will be only used when unmarshalling to an existing object.

        The default is false, which means that the objects won't be re-used.

        See Also:
        Unmarshaller.setReuseObjects(boolean)
      • setClearCollections

        public void setClearCollections(boolean clearCollections)
        Deprecated. 
        Sets whether this unmarshaller should clear collections upon the first use.

        The default is false which means that marshaller won't clear collections.

        See Also:
        Unmarshaller.setClearCollections(boolean)
      • setCastorProperties

        public void setCastorProperties(java.util.Map<java.lang.String,java.lang.String> castorProperties)
        Deprecated. 
        Set Castor-specific properties for marshalling and unmarshalling. Each entry key is considered the property name and each value the property value.
        See Also:
        Marshaller.setProperty(String, String), Unmarshaller.setProperty(String, String)
      • setDoctypes

        public void setDoctypes(java.util.Map<java.lang.String,java.lang.String> doctypes)
        Deprecated. 
        Set the map containing document type definition for the marshaller. Each entry has system id as key and public id as value.
        See Also:
        Marshaller.setDoctype(String, String)
      • setProcessingInstructions

        public void setProcessingInstructions(java.util.Map<java.lang.String,java.lang.String> processingInstructions)
        Deprecated. 
        Sets the processing instructions that will be used by during marshalling. Keys are the processing targets and values contain the processing data.
        See Also:
        Marshaller.addProcessingInstruction(String, String)
      • setNamespaceMappings

        public void setNamespaceMappings(java.util.Map<java.lang.String,java.lang.String> namespaceMappings)
        Deprecated. 
        Set the namespace mappings. Property names are interpreted as namespace prefixes; values are namespace URIs.
        See Also:
        Marshaller.setNamespaceMapping(String, String)
      • setNamespaceToPackageMapping

        public void setNamespaceToPackageMapping(java.util.Map<java.lang.String,java.lang.String> namespaceToPackageMapping)
        Deprecated. 
        Set the namespace to package mappings. Property names are represents the namespaces URI, values are packages.
        See Also:
        Marshaller.setNamespaceMapping(String, String)
      • setEntityResolver

        public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
        Deprecated. 
        Set the EntityResolver to be used during unmarshalling. This resolver will used to resolve system and public ids.
        See Also:
        Unmarshaller.setEntityResolver(EntityResolver)
      • setClassDescriptorResolver

        public void setClassDescriptorResolver(org.exolab.castor.xml.XMLClassDescriptorResolver classDescriptorResolver)
        Deprecated. 
        Set the XMLClassDescriptorResolver to be used during unmarshalling. This resolver will used to resolve class descriptors.
        See Also:
        Unmarshaller.setResolver(XMLClassDescriptorResolver)
      • setIdResolver

        public void setIdResolver(org.exolab.castor.xml.IDResolver idResolver)
        Deprecated. 
        Set the Castor IDResolver to be used during unmarshalling.
        See Also:
        Unmarshaller.setIDResolver(IDResolver)
      • setObjectFactory

        public void setObjectFactory(org.exolab.castor.util.ObjectFactory objectFactory)
        Deprecated. 
        Set the Castor ObjectFactory to be used during unmarshalling.
        See Also:
        Unmarshaller.setObjectFactory(ObjectFactory)
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws CastorMappingException,
                                       java.io.IOException
        Deprecated. 
        Description copied from interface: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        Specified by:
        afterPropertiesSet in interface InitializingBean
        Throws:
        CastorMappingException
        java.io.IOException
      • createXMLContext

        protected org.exolab.castor.xml.XMLContext createXMLContext(@Nullable
                                                                    Resource[] mappingLocations,
                                                                    @Nullable
                                                                    java.lang.Class<?>[] targetClasses,
                                                                    @Nullable
                                                                    java.lang.String[] targetPackages)
                                                             throws org.exolab.castor.mapping.MappingException,
                                                                    org.exolab.castor.xml.ResolverException,
                                                                    java.io.IOException
        Deprecated. 
        Create the Castor XMLContext. Subclasses can override this to create a custom context.

        The default implementation loads mapping files if defined, or the target class or packages if defined.

        Returns:
        the created resolver
        Throws:
        org.exolab.castor.mapping.MappingException - when the mapping file cannot be loaded
        java.io.IOException - in case of I/O errors
        org.exolab.castor.xml.ResolverException
        See Also:
        XMLContext.addMapping(org.exolab.castor.mapping.Mapping), XMLContext.addClass(Class)
      • supports

        public boolean supports(java.lang.Class<?> clazz)
        Deprecated. 
        Returns true for all classes, i.e. Castor supports arbitrary classes.
        Specified by:
        supports in interface Marshaller
        Specified by:
        supports in interface Unmarshaller
        Parameters:
        clazz - the class that this marshaller is being asked if it can marshal
        Returns:
        true if this marshaller can indeed marshal instances of the supplied class; false otherwise
      • marshalDomNode

        protected void marshalDomNode(java.lang.Object graph,
                                      org.w3c.dom.Node node)
                               throws XmlMappingException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        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.

        Specified by:
        marshalDomNode in class AbstractMarshaller
        Parameters:
        graph - the root of the object graph to marshal
        node - the DOM node that will contain the result tree
        Throws:
        XmlMappingException - if the given object cannot be marshalled to the DOM node
        See Also:
        Document, DocumentFragment, Element
      • marshalXmlEventWriter

        protected void marshalXmlEventWriter(java.lang.Object graph,
                                             javax.xml.stream.XMLEventWriter eventWriter)
                                      throws XmlMappingException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for marshalling the given object to a StAX XMLEventWriter.
        Specified by:
        marshalXmlEventWriter in class AbstractMarshaller
        Parameters:
        graph - the root of the object graph to marshal
        eventWriter - the XMLEventWriter to write to
        Throws:
        XmlMappingException - if the given object cannot be marshalled to the DOM node
      • marshalXmlStreamWriter

        protected void marshalXmlStreamWriter(java.lang.Object graph,
                                              javax.xml.stream.XMLStreamWriter streamWriter)
                                       throws XmlMappingException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for marshalling the given object to a StAX XMLStreamWriter.
        Specified by:
        marshalXmlStreamWriter in class AbstractMarshaller
        Parameters:
        graph - the root of the object graph to marshal
        streamWriter - the XMLStreamWriter to write to
        Throws:
        XmlMappingException - if the given object cannot be marshalled to the DOM node
      • marshalSaxHandlers

        protected void marshalSaxHandlers(java.lang.Object graph,
                                          org.xml.sax.ContentHandler contentHandler,
                                          @Nullable
                                          org.xml.sax.ext.LexicalHandler lexicalHandler)
                                   throws XmlMappingException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for marshalling the given object graph to a SAX ContentHandler.
        Specified by:
        marshalSaxHandlers in class AbstractMarshaller
        Parameters:
        graph - the root of the object graph to marshal
        contentHandler - the SAX ContentHandler
        lexicalHandler - the SAX2 LexicalHandler. Can be null.
        Throws:
        XmlMappingException - if the given object cannot be marshalled to the handlers
      • marshalOutputStream

        protected void marshalOutputStream(java.lang.Object graph,
                                           java.io.OutputStream outputStream)
                                    throws XmlMappingException,
                                           java.io.IOException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for marshalling the given object graph to a OutputStream.
        Specified by:
        marshalOutputStream in class AbstractMarshaller
        Parameters:
        graph - the root of the object graph to marshal
        outputStream - the OutputStream to write to
        Throws:
        XmlMappingException - if the given object cannot be marshalled to the writer
        java.io.IOException - if an I/O exception occurs
      • marshalWriter

        protected void marshalWriter(java.lang.Object graph,
                                     java.io.Writer writer)
                              throws XmlMappingException,
                                     java.io.IOException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for marshalling the given object graph to a Writer.
        Specified by:
        marshalWriter in class AbstractMarshaller
        Parameters:
        graph - the root of the object graph to marshal
        writer - the Writer to write to
        Throws:
        XmlMappingException - if the given object cannot be marshalled to the writer
        java.io.IOException - if an I/O exception occurs
      • customizeMarshaller

        protected void customizeMarshaller(org.exolab.castor.xml.Marshaller marshaller)
        Deprecated. 
        Template method that allows for customizing of the given Castor Marshaller.
      • unmarshalDomNode

        protected java.lang.Object unmarshalDomNode(org.w3c.dom.Node node)
                                             throws XmlMappingException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for unmarshalling from a given DOM Node.
        Specified by:
        unmarshalDomNode in class AbstractMarshaller
        Parameters:
        node - the DOM node that contains the objects to be unmarshalled
        Returns:
        the object graph
        Throws:
        XmlMappingException - if the given DOM node cannot be mapped to an object
      • unmarshalXmlEventReader

        protected java.lang.Object unmarshalXmlEventReader(javax.xml.stream.XMLEventReader eventReader)
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for unmarshalling from a given Stax XMLEventReader.
        Specified by:
        unmarshalXmlEventReader in class AbstractMarshaller
        Parameters:
        eventReader - the XMLEventReader to read from
        Returns:
        the object graph
      • unmarshalXmlStreamReader

        protected java.lang.Object unmarshalXmlStreamReader(javax.xml.stream.XMLStreamReader streamReader)
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for unmarshalling from a given Stax XMLStreamReader.
        Specified by:
        unmarshalXmlStreamReader in class AbstractMarshaller
        Parameters:
        streamReader - the XMLStreamReader to read from
        Returns:
        the object graph
      • unmarshalSaxReader

        protected java.lang.Object unmarshalSaxReader(org.xml.sax.XMLReader xmlReader,
                                                      org.xml.sax.InputSource inputSource)
                                               throws XmlMappingException,
                                                      java.io.IOException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for unmarshalling using a given SAX XMLReader and InputSource.
        Specified by:
        unmarshalSaxReader in class AbstractMarshaller
        Parameters:
        xmlReader - the SAX XMLReader to parse with
        inputSource - the input source to parse from
        Returns:
        the object graph
        Throws:
        XmlMappingException - if the given reader and input source cannot be converted to an object
        java.io.IOException - if an I/O exception occurs
      • unmarshalInputStream

        protected java.lang.Object unmarshalInputStream(java.io.InputStream inputStream)
                                                 throws XmlMappingException,
                                                        java.io.IOException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for unmarshalling from a given InputStream.
        Specified by:
        unmarshalInputStream in class AbstractMarshaller
        Parameters:
        inputStream - the InputStreamStream to read from
        Returns:
        the object graph
        Throws:
        XmlMappingException - if the given stream cannot be converted to an object
        java.io.IOException - if an I/O exception occurs
      • unmarshalReader

        protected java.lang.Object unmarshalReader(java.io.Reader reader)
                                            throws XmlMappingException,
                                                   java.io.IOException
        Deprecated. 
        Description copied from class: AbstractMarshaller
        Abstract template method for unmarshalling from a given Reader.
        Specified by:
        unmarshalReader in class AbstractMarshaller
        Parameters:
        reader - the Reader to read from
        Returns:
        the object graph
        Throws:
        XmlMappingException - if the given reader cannot be converted to an object
        java.io.IOException - if an I/O exception occurs
      • customizeUnmarshaller

        protected void customizeUnmarshaller(org.exolab.castor.xml.Unmarshaller unmarshaller)
        Deprecated. 
        Template method that allows for customizing of the given Castor Unmarshaller.
      • convertCastorException

        protected XmlMappingException convertCastorException(org.exolab.castor.xml.XMLException ex,
                                                             boolean marshalling)
        Deprecated. 
        Convert the given XMLException 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 Castor itself does not make this distinction in its exception hierarchy.

        Parameters:
        ex - the Castor XMLException that occurred
        marshalling - indicates whether the exception occurs during marshalling (true), or unmarshalling (false)
        Returns:
        the corresponding XmlMappingException