类 CastorMarshaller
- java.lang.Object
- org.springframework.oxm.support.AbstractMarshaller
- org.springframework.oxm.castor.CastorMarshaller
- 所有已实现的接口:
Aware,BeanClassLoaderAware,InitializingBean,Marshaller,Unmarshaller
@Deprecated public class CastorMarshaller extends AbstractMarshaller implements InitializingBean, BeanClassLoaderAware
已过时。as of Spring Framework 4.3.13, due to the lack of activity on the Castor projectImplementation of theMarshallerinterface for Castor. By default, Castor does not require any further configuration, though setting target classes, target packages or providing a mapping file can be used to have more control over the behavior of Castor.If a target class is specified using
setTargetClass, theCastorMarshallercan only be used to unmarshal XML that represents that specific class. If you want to unmarshal multiple classes, you have to provide a mapping file usingsetMappingLocations.Due to limitations of Castor's API, it is required to set the encoding used for writing to output streams. It defaults to
UTF-8.- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma, Jakub Narloch, Juergen Hoeller
- 另请参阅:
setEncoding(String),setTargetClass(Class),setTargetPackages(String[]),setMappingLocation(Resource),setMappingLocations(Resource[])
字段概要
字段 修饰符和类型 字段 说明 static StringDEFAULT_ENCODING已过时。The default encoding used for stream access: UTF-8.从类继承的字段 org.springframework.oxm.support.AbstractMarshaller
logger
构造器概要
构造器 构造器 说明 CastorMarshaller()已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voidafterPropertiesSet()已过时。Invoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.protected XmlMappingExceptionconvertCastorException(org.exolab.castor.xml.XMLException ex, boolean marshalling)已过时。Convert the givenXMLExceptionto an appropriate exception from theorg.springframework.oxmhierarchy.protected org.exolab.castor.xml.XMLContextcreateXMLContext(Resource[] mappingLocations, Class<?>[] targetClasses, String[] targetPackages)已过时。Create the CastorXMLContext.protected voidcustomizeMarshaller(org.exolab.castor.xml.Marshaller marshaller)已过时。Template method that allows for customizing of the given CastorMarshaller.protected voidcustomizeUnmarshaller(org.exolab.castor.xml.Unmarshaller unmarshaller)已过时。Template method that allows for customizing of the given CastorUnmarshaller.protected StringgetDefaultEncoding()已过时。Determine the default encoding to use for marshalling or unmarshalling from a byte stream, ornullif none.protected voidmarshalDomNode(Object graph, Node node)已过时。Abstract template method for marshalling the given object graph to a DOMNode.protected voidmarshalOutputStream(Object graph, OutputStream outputStream)已过时。Abstract template method for marshalling the given object graph to aOutputStream.protected voidmarshalSaxHandlers(Object graph, ContentHandler contentHandler, LexicalHandler lexicalHandler)已过时。Abstract template method for marshalling the given object graph to a SAXContentHandler.protected voidmarshalWriter(Object graph, Writer writer)已过时。Abstract template method for marshalling the given object graph to aWriter.protected voidmarshalXmlEventWriter(Object graph, XMLEventWriter eventWriter)已过时。Abstract template method for marshalling the given object to a StAXXMLEventWriter.protected voidmarshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter)已过时。Abstract template method for marshalling the given object to a StAXXMLStreamWriter.voidsetBeanClassLoader(ClassLoader classLoader)已过时。Callback that supplies the beanclass loaderto a bean instance.voidsetCastorProperties(Map<String,String> castorProperties)已过时。Set Castor-specific properties for marshalling and unmarshalling.voidsetClassDescriptorResolver(org.exolab.castor.xml.XMLClassDescriptorResolver classDescriptorResolver)已过时。Set theXMLClassDescriptorResolverto be used during unmarshalling.voidsetClearCollections(boolean clearCollections)已过时。Sets whether this unmarshaller should clear collections upon the first use.voidsetDoctypes(Map<String,String> doctypes)已过时。Set the map containing document type definition for the marshaller.voidsetEncoding(String encoding)已过时。Set the encoding to be used for stream access.voidsetEntityResolver(EntityResolver entityResolver)已过时。Set theEntityResolverto be used during unmarshalling.voidsetIdResolver(org.exolab.castor.xml.IDResolver idResolver)已过时。Set the CastorIDResolverto be used during unmarshalling.voidsetIgnoreExtraAttributes(boolean ignoreExtraAttributes)已过时。Set whether the CastorUnmarshallershould ignore attributes that do not match a specific field.voidsetIgnoreExtraElements(boolean ignoreExtraElements)已过时。Set whether the CastorUnmarshallershould ignore elements that do not match a specific field.voidsetMappingLocation(Resource mappingLocation)已过时。Set the locations of the Castor XML mapping files.voidsetMappingLocations(Resource... mappingLocations)已过时。Set the locations of the Castor XML mapping files.voidsetMarshalAsDocument(boolean marshalAsDocument)已过时。Set whether this marshaller should output the xml declaration.voidsetMarshalExtendedType(boolean marshalExtendedType)已过时。Set whether this marshaller should output for given type thexsi:typeattribute.voidsetNamespaceMappings(Map<String,String> namespaceMappings)已过时。Set the namespace mappings.voidsetNamespaceToPackageMapping(Map<String,String> namespaceToPackageMapping)已过时。Set the namespace to package mappings.voidsetNoNamespaceSchemaLocation(String noNamespaceSchemaLocation)已过时。Set the value ofxsi:noNamespaceSchemaLocationattribute.voidsetObjectFactory(org.exolab.castor.util.ObjectFactory objectFactory)已过时。Set the CastorObjectFactoryto be used during unmarshalling.voidsetProcessingInstructions(Map<String,String> processingInstructions)已过时。Sets the processing instructions that will be used by during marshalling.voidsetReuseObjects(boolean reuseObjects)已过时。Set whether this unmarshaller should re-use objects.voidsetRootElement(String rootElement)已过时。Set the name of the root element.voidsetRootObject(Object root)已过时。Set the expected root object for the unmarshaller, into which the source will be unmarshalled.voidsetSchemaLocation(String schemaLocation)已过时。Set the value ofxsi:schemaLocationattribute.voidsetSuppressNamespaces(boolean suppressNamespaces)已过时。Sets whether this marshaller should output namespaces.voidsetSuppressXsiType(boolean suppressXsiType)已过时。Set whether this marshaller should output thexsi:typeattribute.voidsetTargetClass(Class<?> targetClass)已过时。Set the Castor target class.voidsetTargetClasses(Class<?>... targetClasses)已过时。Set the Castor target classes.voidsetTargetPackage(String targetPackage)已过时。Set the name of a package with the Castor descriptor classes.voidsetTargetPackages(String... targetPackages)已过时。Set the names of packages with the Castor descriptor classes.voidsetUseXSITypeAtRoot(boolean useXSITypeAtRoot)已过时。Sets whether this marshaller should output thexsi:typeattribute for the root element.voidsetValidating(boolean validating)已过时。Set whether this marshaller should validate in- and outgoing documents.voidsetWhitespacePreserve(boolean whitespacePreserve)已过时。Set whether the CastorUnmarshallershould preserve "ignorable" whitespace.booleansupports(Class<?> clazz)已过时。Returnstruefor all classes, i.e.protected ObjectunmarshalDomNode(Node node)已过时。Abstract template method for unmarshalling from a given DOMNode.protected ObjectunmarshalInputStream(InputStream inputStream)已过时。Abstract template method for unmarshalling from a givenInputStream.protected ObjectunmarshalReader(Reader reader)已过时。Abstract template method for unmarshalling from a givenReader.protected ObjectunmarshalSaxReader(XMLReader xmlReader, InputSource inputSource)已过时。Abstract template method for unmarshalling using a given SAXXMLReaderandInputSource.protected ObjectunmarshalXmlEventReader(XMLEventReader eventReader)已过时。Abstract template method for unmarshalling from a given StaxXMLEventReader.protected ObjectunmarshalXmlStreamReader(XMLStreamReader streamReader)已过时。Abstract template method for unmarshalling from a given StaxXMLStreamReader.从类继承的方法 org.springframework.oxm.support.AbstractMarshaller
buildDocument, createDocumentBuilder, createDocumentBuilderFactory, createXmlReader, isProcessExternalEntities, isSupportDtd, marshal, marshalDomResult, marshalSaxResult, marshalStaxResult, marshalStreamResult, setProcessExternalEntities, setSupportDtd, unmarshal, unmarshalDomSource, unmarshalSaxSource, unmarshalStaxSource, unmarshalStreamSource
字段详细资料
DEFAULT_ENCODING
public static final String DEFAULT_ENCODING
已过时。The default encoding used for stream access: UTF-8.- 另请参阅:
- 常量字段值
构造器详细资料
CastorMarshaller
public CastorMarshaller()
已过时。
方法详细资料
setEncoding
public void setEncoding(String encoding)
已过时。Set the encoding to be used for stream access.- 另请参阅:
DEFAULT_ENCODING
getDefaultEncoding
protected String getDefaultEncoding()
已过时。从类复制的说明:AbstractMarshallerDetermine the default encoding to use for marshalling or unmarshalling from a byte stream, ornullif none.The default implementation returns
null.
setMappingLocation
public void setMappingLocation(Resource mappingLocation)
已过时。Set the locations of the Castor XML mapping files.
setMappingLocations
public void setMappingLocations(Resource... mappingLocations)
已过时。Set the locations of the Castor XML mapping files.
setTargetClass
public void setTargetClass(Class<?> targetClass)
已过时。Set the Castor target class.
setTargetClasses
public void setTargetClasses(Class<?>... targetClasses)
已过时。Set the Castor target classes.
setTargetPackage
public void setTargetPackage(String targetPackage)
已过时。Set the name of a package with the Castor descriptor classes.
setTargetPackages
public void setTargetPackages(String... targetPackages)
已过时。Set the names of packages with the Castor descriptor classes.
setValidating
public void setValidating(boolean validating)
已过时。Set whether this marshaller should validate in- and outgoing documents.Default is
false.- 另请参阅:
Marshaller.setValidation(boolean)
setSuppressNamespaces
public void setSuppressNamespaces(boolean suppressNamespaces)
已过时。Sets whether this marshaller should output namespaces.The default is
false, i.e. namespaces are written.- 另请参阅:
Marshaller.setSuppressNamespaces(boolean)
setSuppressXsiType
public void setSuppressXsiType(boolean suppressXsiType)
已过时。Set whether this marshaller should output thexsi:typeattribute.The default is
false, i.e. thexsi:typeis written.- 另请参阅:
Marshaller.setSuppressXSIType(boolean)
setMarshalAsDocument
public void setMarshalAsDocument(boolean marshalAsDocument)
已过时。Set whether this marshaller should output the xml declaration.The default is
true, the XML declaration will be written.- 另请参阅:
Marshaller.setMarshalAsDocument(boolean)
setMarshalExtendedType
public void setMarshalExtendedType(boolean marshalExtendedType)
已过时。Set whether this marshaller should output for given type thexsi:typeattribute.The default is
true, thexsi:typeattribute will be written.- 另请参阅:
Marshaller.setMarshalExtendedType(boolean)
setRootElement
public void setRootElement(String rootElement)
已过时。Set the name of the root element.- 另请参阅:
Marshaller.setRootElement(String)
setNoNamespaceSchemaLocation
public void setNoNamespaceSchemaLocation(String noNamespaceSchemaLocation)
已过时。Set the value ofxsi:noNamespaceSchemaLocationattribute. When set, thexsi:noNamespaceSchemaLocationattribute will be written for the root element.- 另请参阅:
Marshaller.setNoNamespaceSchemaLocation(String)
setSchemaLocation
public void setSchemaLocation(String schemaLocation)
已过时。Set the value ofxsi:schemaLocationattribute. When set, thexsi:schemaLocationattribute will be written for the root element.- 另请参阅:
Marshaller.setSchemaLocation(String)
setUseXSITypeAtRoot
public void setUseXSITypeAtRoot(boolean useXSITypeAtRoot)
已过时。Sets whether this marshaller should output thexsi:typeattribute 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: Thexsi:typeattribute for the root element won't be written.- 另请参阅:
Marshaller.setUseXSITypeAtRoot(boolean)
setWhitespacePreserve
public void setWhitespacePreserve(boolean whitespacePreserve)
已过时。Set whether the CastorUnmarshallershould preserve "ignorable" whitespace.Default is
false.- 另请参阅:
Unmarshaller.setWhitespacePreserve(boolean)
setIgnoreExtraAttributes
public void setIgnoreExtraAttributes(boolean ignoreExtraAttributes)
已过时。Set whether the CastorUnmarshallershould ignore attributes that do not match a specific field.Default is
true: Extra attributes are ignored.- 另请参阅:
Unmarshaller.setIgnoreExtraAttributes(boolean)
setIgnoreExtraElements
public void setIgnoreExtraElements(boolean ignoreExtraElements)
已过时。Set whether the CastorUnmarshallershould ignore elements that do not match a specific field.Default is
false: Extra elements are flagged as an error.- 另请参阅:
Unmarshaller.setIgnoreExtraElements(boolean)
setRootObject
public void setRootObject(Object root)
已过时。Set the expected root object for the unmarshaller, into which the source will be unmarshalled.- 另请参阅:
Unmarshaller.setObject(Object)
setReuseObjects
public void setReuseObjects(boolean reuseObjects)
已过时。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.- 另请参阅:
Unmarshaller.setReuseObjects(boolean)
setClearCollections
public void setClearCollections(boolean clearCollections)
已过时。Sets whether this unmarshaller should clear collections upon the first use.The default is
falsewhich means that marshaller won't clear collections.- 另请参阅:
Unmarshaller.setClearCollections(boolean)
setCastorProperties
public void setCastorProperties(Map<String,String> castorProperties)
已过时。Set Castor-specific properties for marshalling and unmarshalling. Each entry key is considered the property name and each value the property value.- 另请参阅:
Marshaller.setProperty(String, String),Unmarshaller.setProperty(String, String)
setDoctypes
public void setDoctypes(Map<String,String> doctypes)
已过时。Set the map containing document type definition for the marshaller. Each entry has system id as key and public id as value.- 另请参阅:
Marshaller.setDoctype(String, String)
setProcessingInstructions
public void setProcessingInstructions(Map<String,String> processingInstructions)
已过时。Sets the processing instructions that will be used by during marshalling. Keys are the processing targets and values contain the processing data.- 另请参阅:
Marshaller.addProcessingInstruction(String, String)
setNamespaceMappings
public void setNamespaceMappings(Map<String,String> namespaceMappings)
已过时。Set the namespace mappings. Property names are interpreted as namespace prefixes; values are namespace URIs.- 另请参阅:
Marshaller.setNamespaceMapping(String, String)
setNamespaceToPackageMapping
public void setNamespaceToPackageMapping(Map<String,String> namespaceToPackageMapping)
已过时。Set the namespace to package mappings. Property names are represents the namespaces URI, values are packages.- 另请参阅:
Marshaller.setNamespaceMapping(String, String)
setEntityResolver
public void setEntityResolver(EntityResolver entityResolver)
已过时。Set theEntityResolverto be used during unmarshalling. This resolver will used to resolve system and public ids.- 另请参阅:
Unmarshaller.setEntityResolver(EntityResolver)
setClassDescriptorResolver
public void setClassDescriptorResolver(org.exolab.castor.xml.XMLClassDescriptorResolver classDescriptorResolver)
已过时。Set theXMLClassDescriptorResolverto be used during unmarshalling. This resolver will used to resolve class descriptors.- 另请参阅:
Unmarshaller.setResolver(XMLClassDescriptorResolver)
setIdResolver
public void setIdResolver(org.exolab.castor.xml.IDResolver idResolver)
已过时。Set the CastorIDResolverto be used during unmarshalling.- 另请参阅:
Unmarshaller.setIDResolver(IDResolver)
setObjectFactory
public void setObjectFactory(org.exolab.castor.util.ObjectFactory objectFactory)
已过时。Set the CastorObjectFactoryto be used during unmarshalling.- 另请参阅:
Unmarshaller.setObjectFactory(ObjectFactory)
setBeanClassLoader
public void setBeanClassLoader(ClassLoader classLoader)
已过时。从接口复制的说明:BeanClassLoaderAwareCallback that supplies the beanclass loaderto a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean'sInitializingBean.afterPropertiesSet()method or a custom init-method.- 指定者:
setBeanClassLoader在接口中BeanClassLoaderAware- 参数:
classLoader- the owning class loader; may benullin which case a defaultClassLoadermust be used, for example theClassLoaderobtained viaClassUtils.getDefaultClassLoader()
afterPropertiesSet
public void afterPropertiesSet() throws CastorMappingException, IOException
已过时。从接口复制的说明:InitializingBeanInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
createXMLContext
protected org.exolab.castor.xml.XMLContext createXMLContext(Resource[] mappingLocations, Class<?>[] targetClasses, String[] targetPackages) throws org.exolab.castor.mapping.MappingException, org.exolab.castor.xml.ResolverException, IOException
已过时。Create the CastorXMLContext. 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.
- 返回:
- the created resolver
- 抛出:
org.exolab.castor.mapping.MappingException- when the mapping file cannot be loadedIOException- in case of I/O errorsorg.exolab.castor.xml.ResolverException- 另请参阅:
XMLContext.addMapping(org.exolab.castor.mapping.Mapping),XMLContext.addClass(Class)
supports
public boolean supports(Class<?> clazz)
已过时。Returnstruefor all classes, i.e. Castor supports arbitrary classes.- 指定者:
supports在接口中Marshaller- 指定者:
supports在接口中Unmarshaller- 参数:
clazz- the class that this marshaller is being asked if it can marshal- 返回:
trueif this marshaller can indeed marshal instances of the supplied class;falseotherwise
marshalDomNode
protected void marshalDomNode(Object graph, Node node) throws XmlMappingException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for marshalling the given object graph to a DOMNode.In practice, node is be a
Documentnode, aDocumentFragmentnode, or aElementnode. In other words, a node that accepts children.- 指定者:
marshalDomNode在类中AbstractMarshaller- 参数:
graph- the root of the object graph to marshalnode- the DOM node that will contain the result tree- 抛出:
XmlMappingException- if the given object cannot be marshalled to the DOM node- 另请参阅:
Document,DocumentFragment,Element
marshalXmlEventWriter
protected void marshalXmlEventWriter(Object graph, XMLEventWriter eventWriter) throws XmlMappingException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for marshalling the given object to a StAXXMLEventWriter.- 指定者:
marshalXmlEventWriter在类中AbstractMarshaller- 参数:
graph- the root of the object graph to marshaleventWriter- theXMLEventWriterto write to- 抛出:
XmlMappingException- if the given object cannot be marshalled to the DOM node
marshalXmlStreamWriter
protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for marshalling the given object to a StAXXMLStreamWriter.- 指定者:
marshalXmlStreamWriter在类中AbstractMarshaller- 参数:
graph- the root of the object graph to marshalstreamWriter- theXMLStreamWriterto write to- 抛出:
XmlMappingException- if the given object cannot be marshalled to the DOM node
marshalSaxHandlers
protected void marshalSaxHandlers(Object graph, ContentHandler contentHandler, LexicalHandler lexicalHandler) throws XmlMappingException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for marshalling the given object graph to a SAXContentHandler.- 指定者:
marshalSaxHandlers在类中AbstractMarshaller- 参数:
graph- the root of the object graph to marshalcontentHandler- the SAXContentHandlerlexicalHandler- the SAX2LexicalHandler. Can benull.- 抛出:
XmlMappingException- if the given object cannot be marshalled to the handlers
marshalOutputStream
protected void marshalOutputStream(Object graph, OutputStream outputStream) throws XmlMappingException, IOException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for marshalling the given object graph to aOutputStream.- 指定者:
marshalOutputStream在类中AbstractMarshaller- 参数:
graph- the root of the object graph to marshaloutputStream- theOutputStreamto write to- 抛出:
XmlMappingException- if the given object cannot be marshalled to the writerIOException- if an I/O exception occurs
marshalWriter
protected void marshalWriter(Object graph, Writer writer) throws XmlMappingException, IOException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for marshalling the given object graph to aWriter.- 指定者:
marshalWriter在类中AbstractMarshaller- 参数:
graph- the root of the object graph to marshalwriter- theWriterto write to- 抛出:
XmlMappingException- if the given object cannot be marshalled to the writerIOException- if an I/O exception occurs
customizeMarshaller
protected void customizeMarshaller(org.exolab.castor.xml.Marshaller marshaller)
已过时。Template method that allows for customizing of the given CastorMarshaller.
unmarshalDomNode
protected Object unmarshalDomNode(Node node) throws XmlMappingException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for unmarshalling from a given DOMNode.- 指定者:
unmarshalDomNode在类中AbstractMarshaller- 参数:
node- the DOM node that contains the objects to be unmarshalled- 返回:
- the object graph
- 抛出:
XmlMappingException- if the given DOM node cannot be mapped to an object
unmarshalXmlEventReader
protected Object unmarshalXmlEventReader(XMLEventReader eventReader)
已过时。从类复制的说明:AbstractMarshallerAbstract template method for unmarshalling from a given StaxXMLEventReader.- 指定者:
unmarshalXmlEventReader在类中AbstractMarshaller- 参数:
eventReader- theXMLEventReaderto read from- 返回:
- the object graph
unmarshalXmlStreamReader
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader)
已过时。从类复制的说明:AbstractMarshallerAbstract template method for unmarshalling from a given StaxXMLStreamReader.- 指定者:
unmarshalXmlStreamReader在类中AbstractMarshaller- 参数:
streamReader- theXMLStreamReaderto read from- 返回:
- the object graph
unmarshalSaxReader
protected Object unmarshalSaxReader(XMLReader xmlReader, InputSource inputSource) throws XmlMappingException, IOException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for unmarshalling using a given SAXXMLReaderandInputSource.- 指定者:
unmarshalSaxReader在类中AbstractMarshaller- 参数:
xmlReader- the SAXXMLReaderto parse withinputSource- the input source to parse from- 返回:
- the object graph
- 抛出:
XmlMappingException- if the given reader and input source cannot be converted to an objectIOException- if an I/O exception occurs
unmarshalInputStream
protected Object unmarshalInputStream(InputStream inputStream) throws XmlMappingException, IOException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for unmarshalling from a givenInputStream.- 指定者:
unmarshalInputStream在类中AbstractMarshaller- 参数:
inputStream- theInputStreamStreamto read from- 返回:
- the object graph
- 抛出:
XmlMappingException- if the given stream cannot be converted to an objectIOException- if an I/O exception occurs
unmarshalReader
protected Object unmarshalReader(Reader reader) throws XmlMappingException, IOException
已过时。从类复制的说明:AbstractMarshallerAbstract template method for unmarshalling from a givenReader.- 指定者:
unmarshalReader在类中AbstractMarshaller- 参数:
reader- theReaderto read from- 返回:
- the object graph
- 抛出:
XmlMappingException- if the given reader cannot be converted to an objectIOException- if an I/O exception occurs
customizeUnmarshaller
protected void customizeUnmarshaller(org.exolab.castor.xml.Unmarshaller unmarshaller)
已过时。Template method that allows for customizing of the given CastorUnmarshaller.
convertCastorException
protected XmlMappingException convertCastorException(org.exolab.castor.xml.XMLException ex, boolean marshalling)
已过时。Convert the givenXMLExceptionto an appropriate exception from theorg.springframework.oxmhierarchy.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.
- 参数:
ex- CastorXMLExceptionthat occurredmarshalling- indicates whether the exception occurs during marshalling (true), or unmarshalling (false)- 返回:
- the corresponding
XmlMappingException