From d83b601de02218c157dc65ff390bbc48728a9175 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Wed, 25 Feb 2009 11:18:20 +0000 Subject: [PATCH] Javadoc --- .../oxm/castor/CastorMarshaller.java | 13 ++++++------ .../oxm/jaxb/Jaxb2Marshaller.java | 20 +++++++++---------- .../oxm/xmlbeans/XmlBeansMarshaller.java | 12 +++++------ 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/org.springframework.oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java b/org.springframework.oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java index e4b5d998259..bb2e01110e8 100644 --- a/org.springframework.oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java +++ b/org.springframework.oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java @@ -30,14 +30,14 @@ import javax.xml.stream.XMLStreamWriter; import org.exolab.castor.mapping.Mapping; import org.exolab.castor.mapping.MappingException; +import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.ResolverException; import org.exolab.castor.xml.UnmarshalHandler; import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; import org.exolab.castor.xml.XMLContext; import org.exolab.castor.xml.XMLException; -import org.exolab.castor.xml.ValidationException; -import org.exolab.castor.xml.MarshalException; import org.w3c.dom.Node; import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; @@ -47,11 +47,11 @@ import org.xml.sax.ext.LexicalHandler; import org.springframework.beans.factory.InitializingBean; import org.springframework.core.io.Resource; -import org.springframework.oxm.UnmarshallingFailureException; -import org.springframework.oxm.XmlMappingException; -import org.springframework.oxm.ValidationFailureException; import org.springframework.oxm.MarshallingFailureException; import org.springframework.oxm.UncategorizedMappingException; +import org.springframework.oxm.UnmarshallingFailureException; +import org.springframework.oxm.ValidationFailureException; +import org.springframework.oxm.XmlMappingException; import org.springframework.oxm.support.AbstractMarshaller; import org.springframework.oxm.support.SaxResourceUtils; import org.springframework.util.ObjectUtils; @@ -296,7 +296,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing * Template method that allows for customizing of the given Castor {@link Marshaller}. *

The default implementation invokes {@link Marshaller#setValidation(boolean)} * with the property set on this marshaller, and calls {@link Marshaller#setNamespaceMapping(String, String)} - * with the {@linkplain #setNamespaceMappings(java.util.Properties) namespace mappings}. + * with the {@linkplain #setNamespaceMappings(java.util.Map) namespace mappings}. */ protected void customizeMarshaller(Marshaller marshaller) { marshaller.setValidation(this.validating); @@ -410,7 +410,6 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing * @param marshalling indicates whether the exception occurs during marshalling (true), * or unmarshalling (false) * @return the corresponding XmlMappingException - * @see CastorUtils#convertCastorException */ protected XmlMappingException convertCastorException(XMLException ex, boolean marshalling) { if (ex instanceof ValidationException) { diff --git a/org.springframework.oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java b/org.springframework.oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java index 4ce357dda8a..59c69c3338e 100644 --- a/org.springframework.oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java +++ b/org.springframework.oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java @@ -95,7 +95,7 @@ import org.springframework.util.xml.StaxUtils; * @see #setUnmarshallerProperties(Map) * @see #setSchema(Resource) * @see #setSchemas(Resource[]) - * @see #setMarshallerListener(Marshaller.Listener) + * @see #setMarshallerListener(javax.xml.bind.Marshaller.Listener) * @see #setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener) * @see #setAdapters(XmlAdapter[]) * @since 3.0 @@ -178,11 +178,11 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, BeanCl * Set the JAXB Marshaller properties. These properties will be set on the * underlying JAXB Marshaller, and allow for features such as indentation. * @param properties the properties - * @see Marshaller#setProperty(String,Object) - * @see Marshaller#JAXB_ENCODING - * @see Marshaller#JAXB_FORMATTED_OUTPUT - * @see Marshaller#JAXB_NO_NAMESPACE_SCHEMA_LOCATION - * @see Marshaller#JAXB_SCHEMA_LOCATION + * @see javax.xml.bind.Marshaller#setProperty(String,Object) + * @see javax.xml.bind.Marshaller#JAXB_ENCODING + * @see javax.xml.bind.Marshaller#JAXB_FORMATTED_OUTPUT + * @see javax.xml.bind.Marshaller#JAXB_NO_NAMESPACE_SCHEMA_LOCATION + * @see javax.xml.bind.Marshaller#JAXB_SCHEMA_LOCATION */ public void setMarshallerProperties(Map properties) { this.marshallerProperties = properties; @@ -424,8 +424,8 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, BeanCl * Gets called after creation of JAXB Marshaller, and after the respective properties have been set. *

The default implementation sets the {@link #setMarshallerProperties(Map) defined properties}, the {@link * #setValidationEventHandler(ValidationEventHandler) validation event handler}, the {@link #setSchemas(Resource[]) - * schemas}, {@link #setMarshallerListener(Marshaller.Listener) listener}, and {@link #setAdapters(XmlAdapter[]) - * adapters}. + * schemas}, {@link #setMarshallerListener(javax.xml.bind.Marshaller.Listener) listener}, and + * {@link #setAdapters(XmlAdapter[]) adapters}. */ protected void initJaxbMarshaller(Marshaller marshaller) throws JAXBException { if (this.marshallerProperties != null) { @@ -509,8 +509,8 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, BeanCl * Gets called after creation of JAXB Marshaller, and after the respective properties have been set. *

The default implementation sets the {@link #setUnmarshallerProperties(Map) defined properties}, the {@link * #setValidationEventHandler(ValidationEventHandler) validation event handler}, the {@link #setSchemas(Resource[]) - * schemas}, {@link #setUnmarshallerListener(Unmarshaller.Listener) listener}, and {@link #setAdapters(XmlAdapter[]) - * adapters}. + * schemas}, {@link #setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener) listener}, and + * {@link #setAdapters(XmlAdapter[]) adapters}. */ protected void initJaxbUnmarshaller(Unmarshaller unmarshaller) throws JAXBException { if (this.unmarshallerProperties != null) { diff --git a/org.springframework.oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java b/org.springframework.oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java index d94d6ef5c68..bdaa590281a 100644 --- a/org.springframework.oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java +++ b/org.springframework.oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java @@ -28,13 +28,13 @@ import javax.xml.stream.XMLEventWriter; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; +import org.apache.xmlbeans.XMLStreamValidationException; import org.apache.xmlbeans.XmlError; import org.apache.xmlbeans.XmlException; import org.apache.xmlbeans.XmlObject; import org.apache.xmlbeans.XmlOptions; import org.apache.xmlbeans.XmlSaxHandler; import org.apache.xmlbeans.XmlValidationError; -import org.apache.xmlbeans.XMLStreamValidationException; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -47,11 +47,11 @@ import org.xml.sax.XMLReader; import org.xml.sax.ext.LexicalHandler; import org.springframework.oxm.Marshaller; +import org.springframework.oxm.MarshallingFailureException; +import org.springframework.oxm.UncategorizedMappingException; +import org.springframework.oxm.UnmarshallingFailureException; import org.springframework.oxm.ValidationFailureException; import org.springframework.oxm.XmlMappingException; -import org.springframework.oxm.MarshallingFailureException; -import org.springframework.oxm.UnmarshallingFailureException; -import org.springframework.oxm.UncategorizedMappingException; import org.springframework.oxm.support.AbstractMarshaller; import org.springframework.util.xml.StaxUtils; @@ -63,7 +63,7 @@ import org.springframework.util.xml.StaxUtils; * *

Unmarshalled objects can be validated by setting the validating property, * or by calling the {@link #validate(XmlObject)} method directly. Invalid objects will - * result in an {@link XmlBeansValidationFailureException}. + * result in an {@link ValidationFailureException}. * *

NOTE: Due to the nature of XMLBeans, this marshaller requires * all passed objects to be of type {@link XmlObject}. @@ -257,7 +257,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller { /** * Validate the given XmlObject. * @param object the xml object to validate - * @throws XmlBeansValidationFailureException if the given object is not valid + * @throws ValidationFailureException if the given object is not valid */ protected void validate(XmlObject object) throws ValidationFailureException { if (isValidating() && object != null) {