You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by gd...@apache.org on 2007/03/29 20:49:16 UTC
svn commit: r523794 [1/8] - in /webservices/axis2/trunk/java/modules:
adb/src/org/apache/axis2/databinding/
adb/src/org/apache/axis2/databinding/i18n/
adb/src/org/apache/axis2/databinding/typemapping/
adb/src/org/apache/axis2/databinding/types/ adb/src...
Author: gdaniels
Date: Thu Mar 29 11:49:12 2007
New Revision: 523794
URL: http://svn.apache.org/viewvc?view=rev&rev=523794
Log:
Code reformat part 1
Modified:
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBBean.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBHelperDataSource.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/i18n/ADBMessages.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entities.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entity.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRef.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRefs.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Id.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Language.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NCName.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMToken.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMTokens.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Name.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NegativeInteger.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NonNegativeInteger.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NonPositiveInteger.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NormalizedString.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Notation.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/PositiveInteger.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Time.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Token.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/URI.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Union.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedByte.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedInt.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedLong.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/UnsignedShort.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Year.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/YearMonth.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/package.html
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/Constants.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/Converter.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/NamedStaxOMBuilder.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/SimpleArrayReaderStateMachine.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/SimpleElementReaderStateMachine.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBDataHandlerStreamReader.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBNamespaceContext.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReader.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/NameValueArrayStreamReader.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/NameValuePairStreamReader.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/NullXMLStreamReader.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/OMAttribKey.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/OMElementKey.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/WrappingXMLStreamReader.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/client/RPCServiceClient.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJBUtil.java
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/util/ArrayStack.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ADBSOAPModelBuilderTest.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ClientInfo.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/CreateAccountRequest.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/NamedStaxOMBuilderTest.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/PrintEvents.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleArrayReaderStateMachineTest.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleElementReaderStateMachineTest.java
webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingModule.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/AddressingMessages.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInFaultHandler.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java
webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/addressing/AddressingFaultsTest.java
webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java
webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInFaultHandlerTest.java
webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java
webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java
webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AarExplodedMojo.java
webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AarInPlaceMojo.java
webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AarMojo.java
webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AbstractAarMojo.java
webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/FileSet.java
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBBean.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBBean.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBBean.java Thu Mar 29 11:49:12 2007
@@ -2,7 +2,6 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamReader;
-import java.io.Serializable;
/*
* Copyright 2001-2004 The Apache Software Foundation.
@@ -24,13 +23,13 @@
* ADBBean - Axis Data Binding Bean. This will be implemented by all the beans that are being generated by
* Axis2 data binding framework
*/
+
public interface ADBBean {
/**
- * Serializes an ADBBean. Gets the pull parser and fetches the XML pull
- * events to represent the bean.
- *
- * @param adbBeanQName
- * the name of the element to be generated for this ADBBean.
+ * Serializes an ADBBean. Gets the pull parser and fetches the XML pull events to represent the
+ * bean.
+ *
+ * @param adbBeanQName the name of the element to be generated for this ADBBean.
* @return Returns a pull parser for this ADBBean.
*/
public XMLStreamReader getPullParser(QName adbBeanQName);
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBDataSource.java Thu Mar 29 11:49:12 2007
@@ -4,11 +4,10 @@
import org.apache.axiom.om.OMOutputFormat;
import org.apache.axiom.om.util.StAXUtils;
+import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
import java.io.OutputStream;
import java.io.Writer;
/*
@@ -33,19 +32,20 @@
/**
* Constructor taking in an ADBBean
+ *
* @param bean
*/
- protected ADBDataSource(ADBBean bean,QName parentQName) {
+ protected ADBDataSource(ADBBean bean, QName parentQName) {
this.bean = bean;
this.parentQName = parentQName;
}
/**
- * @see OMDataSource#serialize(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat)
* @param output
* @param format
* @throws XMLStreamException
+ * @see OMDataSource#serialize(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat)
*/
public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException {
XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output);
@@ -54,10 +54,10 @@
}
/**
- * @see OMDataSource#serialize(java.io.Writer, org.apache.axiom.om.OMOutputFormat)
* @param writer
* @param format
* @throws XMLStreamException
+ * @see OMDataSource#serialize(java.io.Writer, org.apache.axiom.om.OMOutputFormat)
*/
public void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException {
serialize(StAXUtils.createXMLStreamWriter(writer));
@@ -65,17 +65,18 @@
/**
* This needs to be generated inside the ADB bean
- * @see OMDataSource#serialize(javax.xml.stream.XMLStreamWriter)
+ *
* @param xmlWriter
* @throws XMLStreamException
+ * @see OMDataSource#serialize(javax.xml.stream.XMLStreamWriter)
*/
public abstract void serialize(XMLStreamWriter xmlWriter)
throws XMLStreamException;
/**
- * @see org.apache.axiom.om.OMDataSource#getReader()
* @throws XMLStreamException
+ * @see org.apache.axiom.om.OMDataSource#getReader()
*/
public XMLStreamReader getReader() throws XMLStreamException {
// since only ADBBeans related to elements can be serialized
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBHelperDataSource.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBHelperDataSource.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBHelperDataSource.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBHelperDataSource.java Thu Mar 29 11:49:12 2007
@@ -6,12 +6,12 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
import java.io.OutputStream;
import java.io.Writer;
-import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -36,9 +36,10 @@
/**
* Constructor taking in an ADBBean
+ *
* @param bean
*/
- protected ADBHelperDataSource(Object bean,QName parentQName,String helperClassName) {
+ protected ADBHelperDataSource(Object bean, QName parentQName, String helperClassName) {
this.bean = bean;
this.parentQName = parentQName;
this.helperClassName = helperClassName;
@@ -46,20 +47,21 @@
/**
- * @see OMDataSource#serialize(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat)
* @param output
* @param format
* @throws javax.xml.stream.XMLStreamException
+ *
+ * @see OMDataSource#serialize(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat)
*/
public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException {
- serialize(StAXUtils.createXMLStreamWriter(output));
+ serialize(StAXUtils.createXMLStreamWriter(output));
}
/**
- * @see OMDataSource#serialize(java.io.Writer, org.apache.axiom.om.OMOutputFormat)
* @param writer
* @param format
* @throws XMLStreamException
+ * @see OMDataSource#serialize(java.io.Writer, org.apache.axiom.om.OMOutputFormat)
*/
public void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException {
serialize(StAXUtils.createXMLStreamWriter(writer));
@@ -67,31 +69,32 @@
/**
* This needs to be generated inside the ADB bean
- * @see OMDataSource#serialize(javax.xml.stream.XMLStreamWriter)
+ *
* @param xmlWriter
* @throws XMLStreamException
+ * @see OMDataSource#serialize(javax.xml.stream.XMLStreamWriter)
*/
public abstract void serialize(XMLStreamWriter xmlWriter)
throws XMLStreamException;
/**
- * @see org.apache.axiom.om.OMDataSource#getReader()
* @throws XMLStreamException
+ * @see org.apache.axiom.om.OMDataSource#getReader()
*/
public XMLStreamReader getReader() throws XMLStreamException {
// since only ADBBeans related to elements can be serialized
try {
Class helperClass = Class.forName(helperClassName);
- Method method = helperClass.getMethod("getPullParser",new Class[]{Object.class,
- QName.class});
- return (XMLStreamReader)method.invoke(null,new Object[]{bean,parentQName});
+ Method method = helperClass.getMethod("getPullParser", new Class[] { Object.class,
+ QName.class });
+ return (XMLStreamReader)method.invoke(null, new Object[] { bean, parentQName });
} catch (ClassNotFoundException e) {
throw new XMLStreamException(e);
} catch (NoSuchMethodException e) {
- throw new XMLStreamException(e);
+ throw new XMLStreamException(e);
} catch (IllegalAccessException e) {
- throw new XMLStreamException(e);
+ throw new XMLStreamException(e);
} catch (InvocationTargetException e) {
throw new XMLStreamException(e);
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/ADBSOAPModelBuilder.java Thu Mar 29 11:49:12 2007
@@ -25,19 +25,17 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamReader;
-/**
- * Builds a SOAPEnvelope around an ADB pull parser
- */
+/** Builds a SOAPEnvelope around an ADB pull parser */
public class ADBSOAPModelBuilder extends StAXSOAPModelBuilder {
-
+
public ADBSOAPModelBuilder(XMLStreamReader parser, SOAPFactory factory) {
super(new Envelope(parser).
getPullParser(
new QName(factory.getSoapVersionURI(),
- SOAPConstants.SOAPENVELOPE_LOCAL_NAME,
- SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX)),
- factory,
- factory.getSoapVersionURI());
+ SOAPConstants.SOAPENVELOPE_LOCAL_NAME,
+ SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX)),
+ factory,
+ factory.getSoapVersionURI());
}
public SOAPEnvelope getEnvelope() {
@@ -54,16 +52,18 @@
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) {
java.util.ArrayList elementList = new java.util.ArrayList();
- elementList.add(new QName(qName.getNamespaceURI(), "Header", SOAPConstants.BODY_NAMESPACE_PREFIX));
+ elementList.add(new QName(qName.getNamespaceURI(), "Header",
+ SOAPConstants.BODY_NAMESPACE_PREFIX));
elementList.add(new Header());
- elementList.add(new QName(qName.getNamespaceURI(), "Body", SOAPConstants.BODY_NAMESPACE_PREFIX));
+ elementList.add(new QName(qName.getNamespaceURI(), "Body",
+ SOAPConstants.BODY_NAMESPACE_PREFIX));
elementList.add(body);
return
new StreamWrapper(new org.apache.axis2.databinding.utils.reader.
- ADBXMLStreamReaderImpl(qName, elementList.toArray(), null));
+ ADBXMLStreamReaderImpl(qName, elementList.toArray(), null));
}
}
-
+
protected void identifySOAPVersion(String soapVersionURIFromTransport) {
//Do nothing
}
@@ -80,7 +80,9 @@
java.util.ArrayList elementList = new java.util.ArrayList();
elementList.add(qName);
elementList.add(child);
- return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), null);
+ return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName,
+ elementList.toArray(),
+ null);
}
}
@@ -88,7 +90,9 @@
implements org.apache.axis2.databinding.ADBBean {
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) {
java.util.ArrayList elementList = new java.util.ArrayList();
- return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), null);
+ return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName,
+ elementList.toArray(),
+ null);
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/i18n/ADBMessages.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/i18n/ADBMessages.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/i18n/ADBMessages.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/i18n/ADBMessages.java Thu Mar 29 11:49:12 2007
@@ -1,11 +1,11 @@
package org.apache.axis2.databinding.i18n;
-import org.apache.axis2.i18n.MessagesConstants;
import org.apache.axis2.i18n.MessageBundle;
+import org.apache.axis2.i18n.MessagesConstants;
import java.util.Locale;
-import java.util.ResourceBundle;
import java.util.MissingResourceException;
+import java.util.ResourceBundle;
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -23,7 +23,7 @@
*/
public class ADBMessages {
- private static Class thisClass = ADBMessages.class;
+ private static Class thisClass = ADBMessages.class;
private static final String PROJECT_NAME = MessagesConstants.projectName;
@@ -35,17 +35,15 @@
private static final ResourceBundle PARENT =
(MessagesConstants.rootPackageName.equals(PACKAGE_NAME))
- ? null
- : MessagesConstants.rootBundle;
+ ? null
+ : MessagesConstants.rootBundle;
- /**
- * ** NO NEED TO CHANGE ANYTHING BELOW ****
- */
+ /** ** NO NEED TO CHANGE ANYTHING BELOW **** */
private static final MessageBundle messageBundle =
new MessageBundle(PROJECT_NAME, PACKAGE_NAME, RESOURCE_NAME,
- LOCAL, CLASS_LOADER, PARENT);
+ LOCAL, CLASS_LOADER, PARENT);
/**
* Gets a message from resource.properties from the package of the given object.
@@ -123,7 +121,8 @@
* @param arg4 The argument to place in variable {4}
* @return Returns the formatted message.
*/
- public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4)
+ public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3,
+ String arg4)
throws MissingResourceException {
return messageBundle.getMessage(key, arg0, arg1, arg2, arg3, arg4);
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Thu Mar 29 11:49:12 2007
@@ -17,17 +17,20 @@
package org.apache.axis2.databinding.typemapping;
+import org.apache.axiom.attachments.utils.DataHandlerUtils;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMText;
-import org.apache.axiom.om.OMDataSource;
-import org.apache.axiom.attachments.utils.DataHandlerUtils;
-import javax.xml.namespace.QName;
import javax.activation.DataHandler;
-import javax.activation.DataSource;
+import javax.xml.namespace.QName;
import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Iterator;
+import java.util.TimeZone;
public class SimpleTypeMapper {
@@ -112,13 +115,13 @@
}
public static DataHandler getDataHandler(OMElement element) {
- OMNode node =element.getFirstOMChild();
+ OMNode node = element.getFirstOMChild();
if (node instanceof OMText) {
- OMText txt = (OMText) node;
- if(txt.isOptimized()){
- return (DataHandler) txt.getDataHandler();
+ OMText txt = (OMText)node;
+ if (txt.isOptimized()) {
+ return (DataHandler)txt.getDataHandler();
} else {
- return (DataHandler) DataHandlerUtils.getDataHandlerFromText(txt.getText(),null);
+ return (DataHandler)DataHandlerUtils.getDataHandlerFromText(txt.getText(), null);
}
}
return null;
@@ -150,13 +153,15 @@
String objClassName = obj.getName();
return isSimpleType(objClassName);
}
- public static boolean isDataHandler(Class obj){
+
+ public static boolean isDataHandler(Class obj) {
return "javax.activation.DataHandler".equals(obj.getName());
}
public static boolean isCollection(Class obj) {
return java.util.Collection.class.isAssignableFrom(obj);
}
+
public static boolean isSimpleType(String objClassName) {
if (objClassName.equals(STRING)) {
return true;
@@ -204,9 +209,9 @@
obj instanceof Double) {
double data;
if (obj instanceof Float) {
- data = ((Float) obj).doubleValue();
+ data = ((Float)obj).doubleValue();
} else {
- data = ((Double) obj).doubleValue();
+ data = ((Double)obj).doubleValue();
}
if (Double.isNaN(data)) {
return "NaN";
@@ -220,7 +225,7 @@
} else if (obj instanceof Calendar) {
SimpleDateFormat zulu = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
- return zulu.format(((Calendar) obj).getTime());
+ return zulu.format(((Calendar)obj).getTime());
} else if (obj instanceof Date) {
SimpleDateFormat zulu = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
@@ -257,9 +262,9 @@
}
// convert what we have validated so far
try {
- SimpleDateFormat zulu = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
- zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
- date = zulu.parse(source.substring(0, 19) + ".000Z");
+ SimpleDateFormat zulu = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
+ date = zulu.parse(source.substring(0, 19) + ".000Z");
} catch (Exception e) {
throw new NumberFormatException(e.toString());
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Day.java Thu Mar 29 11:49:12 2007
@@ -31,26 +31,21 @@
int day;
String timezone;
- /**
- * Constructs a Day with the given values
- * No timezone is specified
- */
+ /** Constructs a Day with the given values No timezone is specified */
public Day(int day) throws NumberFormatException {
setValue(day);
}
/**
- * Constructs a Day with the given values, including a timezone string
- * The timezone is validated but not used.
+ * Constructs a Day with the given values, including a timezone string The timezone is validated
+ * but not used.
*/
public Day(int day, String timezone)
throws NumberFormatException {
setValue(day, timezone);
}
- /**
- * Construct a Day from a String in the format ---DD[timezone]
- */
+ /** Construct a Day from a String in the format ---DD[timezone] */
public Day(String source) throws NumberFormatException {
if (source.length() < 5) {
throw new NumberFormatException();
@@ -65,16 +60,14 @@
}
setValue(Integer.parseInt(source.substring(3, 5)),
- source.substring(5));
+ source.substring(5));
}
public int getDay() {
return day;
}
- /**
- * Set the day
- */
+ /** Set the day */
public void setDay(int day) {
// validate day
if (day < 1 || day > 31) {
@@ -139,7 +132,7 @@
public boolean equals(Object obj) {
if (!(obj instanceof Day)) return false;
- Day other = (Day) obj;
+ Day other = (Day)obj;
if (this == obj) return true;
boolean equals = (this.day == other.day);
@@ -150,8 +143,7 @@
}
/**
- * Return the value of day XORed with the hashCode of timezone
- * iff one is defined.
+ * Return the value of day XORed with the hashCode of timezone iff one is defined.
*
* @return an <code>int</code> value
*/
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Duration.java Thu Mar 29 11:49:12 2007
@@ -20,16 +20,16 @@
import java.util.Calendar;
/**
- * Implementation of the XML Schema type duration. Duration supports a minimum
- * fractional second precision of milliseconds.
+ * Implementation of the XML Schema type duration. Duration supports a minimum fractional second
+ * precision of milliseconds.
*
* @see <a href="http://www.w3.org/TR/xmlschema-2/#duration">XML Schema 3.2.6</a>
*/
public class Duration implements Serializable {
- private static final long serialVersionUID = -3736760992541369098L;
-
- boolean isNegative;
+ private static final long serialVersionUID = -3736760992541369098L;
+
+ boolean isNegative;
int years;
int months;
int days;
@@ -37,9 +37,7 @@
int minutes;
double seconds;
- /**
- * Default no-arg constructor
- */
+ /** Default no-arg constructor */
public Duration() {
}
@@ -64,8 +62,7 @@
}
/**
- * Constructs Duration from a String in an xsd:duration format -
- * PnYnMnDTnHnMnS.
+ * Constructs Duration from a String in an xsd:duration format - PnYnMnDTnHnMnS.
*
* @param duration String
* @throws IllegalArgumentException if the string doesn't parse correctly.
@@ -77,7 +74,7 @@
// P is required but P by itself is invalid
if (duration.indexOf("P") == -1 || duration.equals("P")) {
throw new IllegalArgumentException();
- // Messages.getMessage("badDuration"));
+ // Messages.getMessage("badDuration"));
}
// if present, time cannot be empty
@@ -109,8 +106,8 @@
* Constructs Duration from a Calendar.
*
* @param calendar Calendar
- * @throws IllegalArgumentException if the calendar object does not
- * represent any date nor time.
+ * @throws IllegalArgumentException if the calendar object does not represent any date nor
+ * time.
*/
public Duration(boolean negative, Calendar calendar) throws
IllegalArgumentException {
@@ -121,32 +118,30 @@
this.hours = calendar.get(Calendar.HOUR);
this.minutes = calendar.get(Calendar.MINUTE);
this.seconds = calendar.get(Calendar.SECOND);
- this.seconds += ((double) calendar.get(Calendar.MILLISECOND)) / 100;
+ this.seconds += ((double)calendar.get(Calendar.MILLISECOND)) / 100;
if (years == 0 && months == 0 && days == 0 && hours == 0 &&
- minutes == 0 && seconds == 0) {
+ minutes == 0 && seconds == 0) {
throw new IllegalArgumentException();
- //Messages.getMessage("badCalendarForDuration"));
+ //Messages.getMessage("badCalendarForDuration"));
}
}
/**
- * This method parses the time portion of a String that represents
- * xsd:duration - nHnMnS.
+ * This method parses the time portion of a String that represents xsd:duration - nHnMnS.
*
* @param time
* @throws IllegalArgumentException if time does not match pattern
- *
*/
public void parseTime(String time) throws IllegalArgumentException {
if (time.length() == 0 || time.indexOf("-") != -1) {
throw new IllegalArgumentException();
- //Messages.getMessage("badTimeDuration"));
+ //Messages.getMessage("badTimeDuration"));
}
// check if time ends with either H, M, or S
if (!time.endsWith("H") && !time.endsWith("M") && !time.endsWith("S")) {
throw new IllegalArgumentException();
- //Messages.getMessage("badTimeDuration"));
+ //Messages.getMessage("badTimeDuration"));
}
try {
@@ -159,7 +154,7 @@
// throw an exception
if (start == end) {
throw new IllegalArgumentException();
- //Messages.getMessage("badTimeDuration"));
+ //Messages.getMessage("badTimeDuration"));
}
if (end != -1) {
hours = Integer.parseInt(time.substring(0, end));
@@ -186,7 +181,7 @@
// throw an exception
if (start == end) {
throw new IllegalArgumentException();
- //Messages.getMessage("badTimeDuration"));
+ //Messages.getMessage("badTimeDuration"));
}
if (end != -1) {
@@ -194,28 +189,26 @@
}
} catch (NumberFormatException e) {
throw new IllegalArgumentException();
- //Messages.getMessage("badTimeDuration"));
+ //Messages.getMessage("badTimeDuration"));
}
}
/**
- * This method parses the date portion of a String that represents
- * xsd:duration - nYnMnD.
+ * This method parses the date portion of a String that represents xsd:duration - nYnMnD.
*
* @param date
* @throws IllegalArgumentException if date does not match pattern
- *
*/
public void parseDate(String date) throws IllegalArgumentException {
if (date.length() == 0 || date.indexOf("-") != -1) {
throw new IllegalArgumentException();
- //Messages.getMessage("badDateDuration"));
+ //Messages.getMessage("badDateDuration"));
}
// check if date string ends with either Y, M, or D
if (!date.endsWith("Y") && !date.endsWith("M") && !date.endsWith("D")) {
throw new IllegalArgumentException();
- //Messages.getMessage("badDateDuration"));
+ //Messages.getMessage("badDateDuration"));
}
// catch any parsing exception
@@ -228,7 +221,7 @@
// throw an exception
if (start == end) {
throw new IllegalArgumentException();
- // Messages.getMessage("badDateDuration"));
+ // Messages.getMessage("badDateDuration"));
}
if (end != -1) {
years = Integer.parseInt(date.substring(0, end));
@@ -241,7 +234,7 @@
// throw an exception
if (start == end) {
throw new IllegalArgumentException();
- //Messages.getMessage("badDateDuration"));
+ //Messages.getMessage("badDateDuration"));
}
if (end != -1) {
months = Integer.parseInt(date.substring(start, end));
@@ -253,14 +246,14 @@
// throw an exception
if (start == end) {
throw new IllegalArgumentException();
- // Messages.getMessage("badDateDuration"));
+ // Messages.getMessage("badDateDuration"));
}
if (end != -1) {
days = Integer.parseInt(date.substring(start, end));
}
} catch (NumberFormatException e) {
throw new IllegalArgumentException();
- //Messages.getMessage("badDateDuration"));
+ //Messages.getMessage("badDateDuration"));
}
}
@@ -313,70 +306,54 @@
return seconds;
}
- /**
- * @param negative
- */
+ /** @param negative */
public void setNegative(boolean negative) {
isNegative = negative;
}
- /**
- * @param years
- */
+ /** @param years */
public void setYears(int years) {
this.years = years;
}
- /**
- * @param months
- */
+ /** @param months */
public void setMonths(int months) {
this.months = months;
}
- /**
- * @param days
- */
+ /** @param days */
public void setDays(int days) {
this.days = days;
}
- /**
- * @param hours
- */
+ /** @param hours */
public void setHours(int hours) {
this.hours = hours;
}
- /**
- * @param minutes
- */
+ /** @param minutes */
public void setMinutes(int minutes) {
this.minutes = minutes;
}
/**
* @param seconds
- * @deprecated use {@link #setSeconds(double) setSeconds(double)}
- * instead
+ * @deprecated use {@link #setSeconds(double) setSeconds(double)} instead
*/
public void setSeconds(int seconds) {
this.seconds = seconds;
}
/**
- * Sets the seconds. NOTE: The fractional value of seconds is rounded up to
- * milliseconds.
+ * Sets the seconds. NOTE: The fractional value of seconds is rounded up to milliseconds.
*
* @param seconds double
*/
public void setSeconds(double seconds) {
- this.seconds = ((double) (Math.round(seconds * 100))) / 100;
+ this.seconds = ((double)(Math.round(seconds * 100))) / 100;
}
- /**
- * This returns the xml representation of an xsd:duration object.
- */
+ /** This returns the xml representation of an xsd:duration object. */
public String toString() {
StringBuffer duration = new StringBuffer();
@@ -403,8 +380,8 @@
}
if (seconds != 0) {
- if (seconds == (int) seconds) {
- duration.append((int) seconds).append("S");
+ if (seconds == (int)seconds) {
+ duration.append((int)seconds).append("S");
} else {
duration.append(seconds).append("S");
}
@@ -423,9 +400,8 @@
}
/**
- * The equals method compares the time represented by duration object, not
- * its string representation.
- * Hence, a duration object representing 65 minutes is considered equal to a
+ * The equals method compares the time represented by duration object, not its string
+ * representation. Hence, a duration object representing 65 minutes is considered equal to a
* duration object representing 1 hour and 5 minutes.
*
* @param object
@@ -435,13 +411,13 @@
return false;
}
- Duration duration = (Duration) object;
+ Duration duration = (Duration)object;
return this.isNegative == duration.isNegative &&
this.getAsCalendar().equals(duration.getAsCalendar());
}
- public long compare(Duration duration){
+ public long compare(Duration duration) {
return this.getAsCalendar().getTimeInMillis() - duration.getAsCalendar().getTimeInMillis();
}
@@ -464,11 +440,10 @@
}
/**
- * Returns duration as a calendar. Due to the way a Calendar class works,
- * the values for particular fields may not be the same as obtained through
- * getter methods. For example, if a duration's object getMonths
- * returns 20, a similar call on a calendar object will return 1 year and
- * 8 months.
+ * Returns duration as a calendar. Due to the way a Calendar class works, the values for
+ * particular fields may not be the same as obtained through getter methods. For example, if a
+ * duration's object getMonths returns 20, a similar call on a calendar object will return 1
+ * year and 8 months.
*
* @return Calendar
*/
@@ -477,25 +452,24 @@
}
/**
- * Returns duration as a calendar. Due to the way a Calendar class works,
- * the values for particular fields may not be the same as obtained through
- * getter methods. For example, if a Duration's object getMonths
- * returns 20, a similar call on a Calendar object will return 1 year and
- * 8 months.
+ * Returns duration as a calendar. Due to the way a Calendar class works, the values for
+ * particular fields may not be the same as obtained through getter methods. For example, if a
+ * Duration's object getMonths returns 20, a similar call on a Calendar object will return 1
+ * year and 8 months.
*
* @param startTime Calendar
* @return Calendar
*/
public Calendar getAsCalendar(Calendar startTime) {
- Calendar ret = (Calendar) startTime.clone();
+ Calendar ret = (Calendar)startTime.clone();
ret.set(Calendar.YEAR, years);
ret.set(Calendar.MONTH, months);
ret.set(Calendar.DATE, days);
ret.set(Calendar.HOUR, hours);
ret.set(Calendar.MINUTE, minutes);
- ret.set(Calendar.SECOND, (int) seconds);
+ ret.set(Calendar.SECOND, (int)seconds);
ret.set(Calendar.MILLISECOND,
- (int) (seconds * 100 - Math.round(seconds) * 100));
+ (int)(seconds * 100 - Math.round(seconds) * 100));
return ret;
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entities.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entities.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entities.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entities.java Thu Mar 29 11:49:12 2007
@@ -19,27 +19,29 @@
/**
* Custom class for supporting XSD data type Entities
- *
+ *
* @see <a href="http://www.w3.org/TR/xmlschema-2/#ENTITIES">XML Schema 3.3.12 ENTITIES</a>
*/
public class Entities extends NCName {
-
+
private static final long serialVersionUID = -4511368195143560809L;
-
- private Entity[] entities;
-
+
+ private Entity[] entities;
+
public Entities() {
super();
}
+
/**
* ctor for Entities
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
- public Entities (String stValue) throws IllegalArgumentException {
+ public Entities(String stValue) throws IllegalArgumentException {
StringTokenizer tokenizer = new StringTokenizer(stValue);
int count = tokenizer.countTokens();
entities = new Entity[count];
- for(int i=0;i<count;i++){
+ for (int i = 0; i < count; i++) {
entities[i] = new Entity(tokenizer.nextToken());
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entity.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entity.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entity.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Entity.java Thu Mar 29 11:49:12 2007
@@ -16,23 +16,25 @@
package org.apache.axis2.databinding.types;
-
/**
* Custom class for supporting XSD data type Entity
+ *
* @see <a href="http://www.w3.org/TR/xmlschema-2/#ENTITY">XML Schema 3.3.11 ENTITY</a>
*/
public class Entity extends NCName {
-
+
private static final long serialVersionUID = -4868410883856961942L;
-
- public Entity() {
+
+ public Entity() {
super();
}
+
/**
* ctor for Entity
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
- public Entity (String stValue) throws IllegalArgumentException {
+ public Entity(String stValue) throws IllegalArgumentException {
super(stValue);
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/HexBinary.java Thu Mar 29 11:49:12 2007
@@ -19,48 +19,46 @@
import java.io.ByteArrayOutputStream;
import java.io.Serializable;
-/**
- * Custom class for supporting primitive XSD data type hexBinary.
- */
+/** Custom class for supporting primitive XSD data type hexBinary. */
public class HexBinary implements Serializable {
private static final long serialVersionUID = -5082403899986720767L;
-
- byte[] m_value;
+
+ byte[] m_value;
public HexBinary() {
}
- public HexBinary(String string){
+ public HexBinary(String string) {
m_value = decode(string);
}
- public HexBinary(byte[] bytes){
+ public HexBinary(byte[] bytes) {
m_value = bytes;
}
- public byte[] getBytes(){
+ public byte[] getBytes() {
return m_value;
}
- public String toString(){
+ public String toString() {
return encode(m_value);
}
- public int hashCode(){
+ public int hashCode() {
//TODO: How do we hash this?
return super.hashCode();
}
- public boolean equals(Object object){
+ public boolean equals(Object object) {
//TODO: Is this good enough?
String s1 = object.toString();
String s2 = this.toString();
return s1.equals(s2);
}
- // public static final String ERROR_ODD_NUMBER_OF_DIGITS =
- //Messages.getMessage("oddDigits00");
+ // public static final String ERROR_ODD_NUMBER_OF_DIGITS =
+ //Messages.getMessage("oddDigits00");
//public static final String ERROR_BAD_CHARACTER_IN_HEX_STRING =
// Messages.getMessage("badChars01");
@@ -68,42 +66,40 @@
// Table for HEX to DEC byte translation
public static final int[] DEC = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 00, 01, 02, 03, 04, 05, 06, 07, 8, 9, -1, -1, -1, -1, -1, -1,
- -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 00, 01, 02, 03, 04, 05, 06, 07, 8, 9, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
};
/**
- * Convert a String of hexadecimal digits into the corresponding
- * byte array by encoding each two hexadecimal digits as a byte.
+ * Convert a String of hexadecimal digits into the corresponding byte array by encoding each two
+ * hexadecimal digits as a byte.
*
* @param digits Hexadecimal digits representation
- *
- * @exception IllegalArgumentException if an invalid hexadecimal digit
- * is found, or the input string contains an odd number of hexadecimal
- * digits
+ * @throws IllegalArgumentException if an invalid hexadecimal digit is found, or the input
+ * string contains an odd number of hexadecimal digits
*/
public static byte[] decode(String digits) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
for (int i = 0; i < digits.length(); i += 2) {
char c1 = digits.charAt(i);
- if ((i+1) >= digits.length())
+ if ((i + 1) >= digits.length())
throw new IllegalArgumentException
- ();//ERROR_ODD_NUMBER_OF_DIGITS);
+ ();//ERROR_ODD_NUMBER_OF_DIGITS);
char c2 = digits.charAt(i + 1);
byte b = 0;
if ((c1 >= '0') && (c1 <= '9'))
@@ -114,7 +110,7 @@
b += ((c1 - 'A' + 10) * 16);
else
throw new IllegalArgumentException
- ();//ERROR_BAD_CHARACTER_IN_HEX_STRING);
+ ();//ERROR_BAD_CHARACTER_IN_HEX_STRING);
if ((c2 >= '0') && (c2 <= '9'))
b += (c2 - '0');
else if ((c2 >= 'a') && (c2 <= 'f'))
@@ -123,7 +119,7 @@
b += (c2 - 'A' + 10);
else
throw new IllegalArgumentException
- ();//ERROR_BAD_CHARACTER_IN_HEX_STRING);
+ ();//ERROR_BAD_CHARACTER_IN_HEX_STRING);
baos.write(b);
}
return (baos.toByteArray());
@@ -132,8 +128,8 @@
/**
- * Convert a byte array into a printable format containing a
- * String of hexadecimal digit characters (two per byte).
+ * Convert a byte array into a printable format containing a String of hexadecimal digit
+ * characters (two per byte).
*
* @param bytes Byte array representation
*/
@@ -149,42 +145,38 @@
}
/**
- * Convert 4 hex digits to an int, and return the number of converted
- * bytes.
+ * Convert 4 hex digits to an int, and return the number of converted bytes.
*
* @param hex Byte array containing exactly four hexadecimal digits
- *
- * @exception IllegalArgumentException if an invalid hexadecimal digit
- * is included
+ * @throws IllegalArgumentException if an invalid hexadecimal digit is included
*/
- public static int convert2Int( byte[] hex ) {
+ public static int convert2Int(byte[] hex) {
// Code from Ajp11, from Apache's JServ
// assert b.length==4
// assert valid data
int len;
- if(hex.length < 4 ) return 0;
- if( DEC[hex[0]]<0 )
+ if (hex.length < 4) return 0;
+ if (DEC[hex[0]] < 0)
throw new IllegalArgumentException();//ERROR_BAD_CHARACTER_IN_HEX_STRING);
len = DEC[hex[0]];
len = len << 4;
- if( DEC[hex[1]]<0 )
+ if (DEC[hex[1]] < 0)
throw new IllegalArgumentException();//ERROR_BAD_CHARACTER_IN_HEX_STRING);
len += DEC[hex[1]];
len = len << 4;
- if( DEC[hex[2]]<0 )
+ if (DEC[hex[2]] < 0)
throw new IllegalArgumentException();//ERROR_BAD_CHARACTER_IN_HEX_STRING);
len += DEC[hex[2]];
len = len << 4;
- if( DEC[hex[3]]<0 )
+ if (DEC[hex[3]] < 0)
throw new IllegalArgumentException();//ERROR_BAD_CHARACTER_IN_HEX_STRING);
len += DEC[hex[3]];
return len;
}
/**
- * [Private] Convert the specified value (0 .. 15) to the corresponding
- * hexadecimal digit.
+ * [Private] Convert the specified value (0 .. 15) to the corresponding hexadecimal digit.
*
* @param value Value to be converted
*/
@@ -192,9 +184,9 @@
value &= 0x0f;
if (value >= 10)
- return ((char) (value - 10 + 'a'));
+ return ((char)(value - 10 + 'a'));
else
- return ((char) (value + '0'));
+ return ((char)(value + '0'));
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRef.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRef.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRef.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRef.java Thu Mar 29 11:49:12 2007
@@ -16,24 +16,25 @@
package org.apache.axis2.databinding.types;
-
/**
* Custom class for supporting XSD data type IDRef
- *
+ *
* @see <a href="http://www.w3.org/TR/xmlschema-2/#IDREF">XML Schema 3.3.10 IDREFS</a>
*/
public class IDRef extends NCName {
-
+
private static final long serialVersionUID = 6821835065939868576L;
-
- public IDRef() {
+
+ public IDRef() {
super();
}
+
/**
* ctor for IDRef
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
- public IDRef (String stValue) throws IllegalArgumentException {
+ public IDRef(String stValue) throws IllegalArgumentException {
super(stValue);
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRefs.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRefs.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRefs.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/IDRefs.java Thu Mar 29 11:49:12 2007
@@ -26,19 +26,21 @@
* @see <a href="http://www.w3.org/TR/xmlschema-2/#IDREFS">XML Schema 3.3.10 IDREFS</a>
*/
public class IDRefs extends NCName {
-
+
private static final long serialVersionUID = 5394097798361075902L;
-
- private IDRef[] idrefs;
+
+ private IDRef[] idrefs;
public IDRefs() {
super();
}
+
/**
* ctor for IDRefs
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
- public IDRefs (String stValue) throws IllegalArgumentException {
+ public IDRefs(String stValue) throws IllegalArgumentException {
setValue(stValue);
}
@@ -46,7 +48,7 @@
StringTokenizer tokenizer = new StringTokenizer(stValue);
int count = tokenizer.countTokens();
idrefs = new IDRef[count];
- for(int i=0;i<count;i++){
+ for (int i = 0; i < count; i++) {
idrefs[i] = new IDRef(tokenizer.nextToken());
}
}
@@ -62,9 +64,8 @@
}
/**
- * IDREFs can be equal without having identical ordering because
- * they represent a set of references. Hence we have to compare
- * values here as a set, not a list.
+ * IDREFs can be equal without having identical ordering because they represent a set of
+ * references. Hence we have to compare values here as a set, not a list.
*
* @param object an <code>Object</code> value
* @return a <code>boolean</code> value
@@ -88,8 +89,8 @@
}
/**
- * Returns the sum of the hashcodes of the underlying idrefs, an
- * operation which is not sensitive to ordering.
+ * Returns the sum of the hashcodes of the underlying idrefs, an operation which is not
+ * sensitive to ordering.
*
* @return an <code>int</code> value
*/
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Id.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Id.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Id.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Id.java Thu Mar 29 11:49:12 2007
@@ -17,8 +17,7 @@
/**
- * Custom class for supporting XSD data type ID
- * The base type of Id is NCName.
+ * Custom class for supporting XSD data type ID The base type of Id is NCName.
*
* @see <a href="http://www.w3.org/TR/xmlschema-2/#ID">XML Schema 3.3.8</a>
*/
@@ -26,13 +25,14 @@
private static final long serialVersionUID = -8442438083214211437L;
- public Id() {
+ public Id() {
super();
}
/**
* Constructor for Id.
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
public Id(String stValue) throws IllegalArgumentException {
try {
@@ -41,32 +41,31 @@
catch (IllegalArgumentException e) {
// recast normalizedString exception as token exception
throw new IllegalArgumentException();
- //Messages.getMessage("badIdType00") + "data=[" +
- //stValue + "]");
+ //Messages.getMessage("badIdType00") + "data=[" +
+ //stValue + "]");
}
}
/**
- *
* Validates the data and sets the value for the object.
+ *
* @param stValue String value
* @throws IllegalArgumentException if invalid format
*/
public void setValue(String stValue) throws IllegalArgumentException {
if (!Id.isValid(stValue))
throw new IllegalArgumentException(
- // Messages.getMessage("badIdType00") +
- " data=[" + stValue + "]");
+ // Messages.getMessage("badIdType00") +
+ " data=[" + stValue + "]");
m_value = stValue;
}
/**
- *
* Validates the value against the xsd definition.
- *
+ * <p/>
* Same validation as NCName for the time being
*/
public static boolean isValid(String stValue) {
- return NCName.isValid(stValue);
+ return NCName.isValid(stValue);
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Language.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Language.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Language.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Language.java Thu Mar 29 11:49:12 2007
@@ -17,13 +17,12 @@
/**
- * Custom class for supporting XSD data type language
- * language represents natural language identifiers as defined by [RFC 1766].
- * The value space of language is the set of all strings that are valid language identifiers
- * as defined in the language identification section of [XML 1.0 (Second Edition)].
- * The lexical space of language is the set of all strings that are valid language identifiers
- * as defined in the language identification section of [XML 1.0 (Second Edition)].
- * The base type of language is token.
+ * Custom class for supporting XSD data type language language represents natural language
+ * identifiers as defined by [RFC 1766]. The value space of language is the set of all strings that
+ * are valid language identifiers as defined in the language identification section of [XML 1.0
+ * (Second Edition)]. The lexical space of language is the set of all strings that are valid
+ * language identifiers as defined in the language identification section of [XML 1.0 (Second
+ * Edition)]. The base type of language is token.
*
* @see <a href="http://www.w3.org/TR/xmlschema-2/#language">XML Schema 3.3.3</a>
*/
@@ -31,13 +30,14 @@
private static final long serialVersionUID = -4105320293090087959L;
- public Language() {
+ public Language() {
super();
}
/**
* ctor for Language
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
public Language(String stValue) throws IllegalArgumentException {
try {
@@ -47,20 +47,16 @@
// recast normalizedString exception as token exception
throw new IllegalArgumentException(
// Messages.getMessage("badLanguage00") +
- "data=[" + stValue + "]");
+"data=[" + stValue + "]");
}
}
- /**
- *
- * Validates the value against the xsd definition.
- * Language-Tag = Primary-tag *( "-" Subtag )
- * Primary-tag = 1*8ALPHA
- * Subtag = 1*8ALPHA
- * TODO
- * @see <a href="http://www.ietf.org/rfc/rfc1766.txt">RFC1766</a>
- *
- */
+ /**
+ * Validates the value against the xsd definition. Language-Tag = Primary-tag *( "-" Subtag )
+ * Primary-tag = 1*8ALPHA Subtag = 1*8ALPHA TODO
+ *
+ * @see <a href="http://www.ietf.org/rfc/rfc1766.txt">RFC1766</a>
+ */
public static boolean isValid(String stValue) {
return true;
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Month.java Thu Mar 29 11:49:12 2007
@@ -24,47 +24,42 @@
* @see <a href="http://www.w3.org/TR/xmlschema-2/#gMonth">XML Schema 3.2.14</a>
*/
public class Month implements java.io.Serializable {
-
+
private static final long serialVersionUID = -7469265802807262347L;
-
- int month;
+
+ int month;
String timezone;
- /**
- * Constructs a Month with the given values
- * No timezone is specified
- */
+ /** Constructs a Month with the given values No timezone is specified */
public Month(int month) throws NumberFormatException {
setValue(month);
}
/**
- * Constructs a Month with the given values, including a timezone string
- * The timezone is validated but not used.
+ * Constructs a Month with the given values, including a timezone string The timezone is
+ * validated but not used.
*/
public Month(int month, String timezone)
- throws NumberFormatException {
+ throws NumberFormatException {
setValue(month, timezone);
}
- /**
- * Construct a Month from a String in the format --MM--[timezone]
- */
+ /** Construct a Month from a String in the format --MM--[timezone] */
public Month(String source) throws NumberFormatException {
if (source.length() < (6)) {
throw new NumberFormatException();
- // Messages.getMessage("badMonth00"));
+ // Messages.getMessage("badMonth00"));
}
if (source.charAt(0) != '-' ||
- source.charAt(1) != '-' ||
- source.charAt(4) != '-' ||
- source.charAt(5) != '-' ) {
+ source.charAt(1) != '-' ||
+ source.charAt(4) != '-' ||
+ source.charAt(5) != '-') {
throw new NumberFormatException();
- //Messages.getMessage("badMonth00"));
+ //Messages.getMessage("badMonth00"));
}
- setValue(Integer.parseInt(source.substring(2,4)),
+ setValue(Integer.parseInt(source.substring(2, 4)),
source.substring(6));
}
@@ -76,7 +71,7 @@
// validate month
if (month < 1 || month > 12) {
throw new NumberFormatException();
- // Messages.getMessage("badMonth00"));
+ // Messages.getMessage("badMonth00"));
}
this.month = month;
}
@@ -89,19 +84,19 @@
// validate timezone
if (timezone != null && timezone.length() > 0) {
// Format [+/-]HH:MM
- if (timezone.charAt(0)=='+' || (timezone.charAt(0)=='-')) {
- if (timezone.length() != 6 ||
+ if (timezone.charAt(0) == '+' || (timezone.charAt(0) == '-')) {
+ if (timezone.length() != 6 ||
!Character.isDigit(timezone.charAt(1)) ||
!Character.isDigit(timezone.charAt(2)) ||
- timezone.charAt(3) != ':' ||
+ timezone.charAt(3) != ':' ||
!Character.isDigit(timezone.charAt(4)) ||
!Character.isDigit(timezone.charAt(5)))
- throw new NumberFormatException();
- //Messages.getMessage("badTimezone00"));
+ throw new NumberFormatException();
+ //Messages.getMessage("badTimezone00"));
} else if (!timezone.equals("Z")) {
throw new NumberFormatException();
- //Messages.getMessage("badTimezone00"));
+ //Messages.getMessage("badTimezone00"));
}
// if we got this far, its good
this.timezone = timezone;
@@ -135,7 +130,7 @@
public boolean equals(Object obj) {
if (!(obj instanceof Month)) return false;
- Month other = (Month) obj;
+ Month other = (Month)obj;
if (this == obj) return true;
boolean equals = (this.month == other.month);
@@ -146,8 +141,7 @@
}
/**
- * Return the value of month XORed with the hashCode of timezone
- * iff one is defined.
+ * Return the value of month XORed with the hashCode of timezone iff one is defined.
*
* @return an <code>int</code> value
*/
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/MonthDay.java Thu Mar 29 11:49:12 2007
@@ -24,49 +24,44 @@
* @see <a href="http://www.w3.org/TR/xmlschema-2/#gMonthDay">XML Schema 3.2.12</a>
*/
public class MonthDay implements java.io.Serializable {
-
+
private static final long serialVersionUID = -345189609825249318L;
-
- int month;
+
+ int month;
int day;
String timezone;
- /**
- * Constructs a MonthDay with the given values
- * No timezone is specified
- */
+ /** Constructs a MonthDay with the given values No timezone is specified */
public MonthDay(int month, int day)
- throws NumberFormatException {
+ throws NumberFormatException {
setValue(month, day);
}
/**
- * Constructs a MonthDay with the given values, including a timezone string
- * The timezone is validated but not used.
+ * Constructs a MonthDay with the given values, including a timezone string The timezone is
+ * validated but not used.
*/
public MonthDay(int month, int day, String timezone)
- throws NumberFormatException {
+ throws NumberFormatException {
setValue(month, day, timezone);
}
- /**
- * Construct a MonthDay from a String in the format --MM-DD[timezone]
- */
+ /** Construct a MonthDay from a String in the format --MM-DD[timezone] */
public MonthDay(String source) throws NumberFormatException {
if (source.length() < 6) {
throw new NumberFormatException();
- //Messages.getMessage("badMonthDay00"));
+ //Messages.getMessage("badMonthDay00"));
}
if (source.charAt(0) != '-' ||
- source.charAt(1) != '-' ||
- source.charAt(4) != '-' ) {
+ source.charAt(1) != '-' ||
+ source.charAt(4) != '-') {
throw new NumberFormatException();
- //Messages.getMessage("badMonthDay00"));
+ //Messages.getMessage("badMonthDay00"));
}
- setValue(Integer.parseInt(source.substring(2,4)),
- Integer.parseInt(source.substring(5,7)),
+ setValue(Integer.parseInt(source.substring(2, 4)),
+ Integer.parseInt(source.substring(5, 7)),
source.substring(7));
}
@@ -78,7 +73,7 @@
// validate month
if (month < 1 || month > 12) {
throw new NumberFormatException();
- //Messages.getMessage("badMonthDay00"));
+ //Messages.getMessage("badMonthDay00"));
}
this.month = month;
}
@@ -87,22 +82,19 @@
return day;
}
- /**
- * Set the day
- * NOTE: if the month isn't set yet, the day isn't validated
- */
+ /** Set the day NOTE: if the month isn't set yet, the day isn't validated */
public void setDay(int day) {
// validate day
if (day < 1 || day > 31) {
throw new NumberFormatException();
- //Messages.getMessage("badMonthDay00"));
+ //Messages.getMessage("badMonthDay00"));
}
// 30 days has September... All the rest have 31 (except Feb!)
// NOTE: if month isn't set, we don't validate day.
if ((month == 2 && day > 29) ||
- ((month == 9 || month == 4 || month == 6 || month == 11) && day > 30)) {
+ ((month == 9 || month == 4 || month == 6 || month == 11) && day > 30)) {
throw new NumberFormatException();
- // Messages.getMessage("badMonthDay00"));
+ // Messages.getMessage("badMonthDay00"));
}
this.day = day;
}
@@ -115,19 +107,19 @@
// validate timezone
if (timezone != null && timezone.length() > 0) {
// Format [+/-]HH:MM
- if (timezone.charAt(0)=='+' || (timezone.charAt(0)=='-')) {
- if (timezone.length() != 6 ||
+ if (timezone.charAt(0) == '+' || (timezone.charAt(0) == '-')) {
+ if (timezone.length() != 6 ||
!Character.isDigit(timezone.charAt(1)) ||
!Character.isDigit(timezone.charAt(2)) ||
- timezone.charAt(3) != ':' ||
+ timezone.charAt(3) != ':' ||
!Character.isDigit(timezone.charAt(4)) ||
!Character.isDigit(timezone.charAt(5)))
- throw new NumberFormatException();
- // Messages.getMessage("badTimezone00"));
+ throw new NumberFormatException();
+ // Messages.getMessage("badTimezone00"));
} else if (!timezone.equals("Z")) {
throw new NumberFormatException();
- //Messages.getMessage("badTimezone00"));
+ //Messages.getMessage("badTimezone00"));
}
// if we got this far, its good
this.timezone = timezone;
@@ -135,7 +127,7 @@
}
public void setValue(int month, int day, String timezone)
- throws NumberFormatException {
+ throws NumberFormatException {
setMonth(month);
setDay(day);
setTimezone(timezone);
@@ -164,7 +156,7 @@
public boolean equals(Object obj) {
if (!(obj instanceof MonthDay)) return false;
- MonthDay other = (MonthDay) obj;
+ MonthDay other = (MonthDay)obj;
if (this == obj) return true;
boolean equals = (this.month == other.month && this.day == other.day);
@@ -175,14 +167,13 @@
}
/**
- * Return the value of (month + day) XORed with the hashCode of
- * timezone iff one is defined.
+ * Return the value of (month + day) XORed with the hashCode of timezone iff one is defined.
*
* @return an <code>int</code> value
*/
public int hashCode() {
return null == timezone
- ? (month + day)
- : (month + day) ^ timezone.hashCode();
+ ? (month + day)
+ : (month + day) ^ timezone.hashCode();
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NCName.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NCName.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NCName.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NCName.java Thu Mar 29 11:49:12 2007
@@ -19,9 +19,8 @@
/**
- * Custom class for supporting XSD data type NCName
- * NCName represents XML "non-colonized" Names
- * The base type of NCName is Name.
+ * Custom class for supporting XSD data type NCName NCName represents XML "non-colonized" Names The
+ * base type of NCName is Name.
*
* @see <a href="http://www.w3.org/TR/xmlschema-2/#NCName">XML Schema 3.3.7</a>
* @see <A href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName Production</a>
@@ -30,13 +29,14 @@
private static final long serialVersionUID = 8573451628276898297L;
- public NCName() {
+ public NCName() {
super();
}
/**
* ctor for NCName
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
public NCName(String stValue) throws IllegalArgumentException {
try {
@@ -45,45 +45,44 @@
catch (IllegalArgumentException e) {
// recast normalizedString exception as token exception
throw new IllegalArgumentException(
- // Messages.getMessage("badNCNameType00") +
- "data=[" +
- stValue + "]");
+ // Messages.getMessage("badNCNameType00") +
+ "data=[" +
+ stValue + "]");
}
}
/**
- *
* validates the data and sets the value for the object.
+ *
* @param stValue String value
* @throws IllegalArgumentException if invalid format
*/
public void setValue(String stValue) throws IllegalArgumentException {
if (!NCName.isValid(stValue))
throw new IllegalArgumentException(
- //Messages.getMessage("badNCNameType00") +
- " data=[" + stValue + "]");
+ //Messages.getMessage("badNCNameType00") +
+ " data=[" + stValue + "]");
m_value = stValue;
}
/**
- *
* validate the value against the xsd definition
- *
- * NCName ::= (Letter | '_') (NCNameChar)*
- * NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender
+ * <p/>
+ * NCName ::= (Letter | '_') (NCNameChar)* NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
+ * CombiningChar | Extender
*/
public static boolean isValid(String stValue) {
int scan;
boolean bValid = true;
- for (scan=0; scan < stValue.length(); scan++) {
+ for (scan = 0; scan < stValue.length(); scan++) {
if (scan == 0)
- bValid = XMLChar.isNCNameStart(stValue.charAt(scan));
+ bValid = XMLChar.isNCNameStart(stValue.charAt(scan));
else
- bValid = XMLChar.isNCName(stValue.charAt(scan));
+ bValid = XMLChar.isNCName(stValue.charAt(scan));
if (!bValid)
- break;
+ break;
}
- return bValid;
+ return bValid;
}
}
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMToken.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMToken.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMToken.java Thu Mar 29 11:49:12 2007
@@ -20,12 +20,10 @@
/**
* Custom class for supporting XSD data type NMToken
- *
- * NMTOKEN represents the NMTOKEN attribute type from
- * [XML 1.0(Second Edition)]. The value space of NMTOKEN
- * is the set of tokens that match the Nmtoken production
- * in [XML 1.0 (Second Edition)].
- * The base type of NMTOKEN is token.
+ * <p/>
+ * NMTOKEN represents the NMTOKEN attribute type from [XML 1.0(Second Edition)]. The value space of
+ * NMTOKEN is the set of tokens that match the Nmtoken production in [XML 1.0 (Second Edition)]. The
+ * base type of NMTOKEN is token.
*
* @see <a href="http://www.w3.org/TR/xmlschema-2/#nmtoken">XML Schema 3.3.4</a>
*/
@@ -33,13 +31,14 @@
private static final long serialVersionUID = -1319741002733174329L;
- public NMToken() {
+ public NMToken() {
super();
}
/**
* ctor for NMToken
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
public NMToken(String stValue) throws IllegalArgumentException {
try {
@@ -49,22 +48,20 @@
// recast normalizedString exception as token exception
throw new IllegalArgumentException(
// Messages.getMessage("badNmtoken00") + "data=[" +
- stValue + "]");
+ stValue + "]");
}
}
/**
- *
- * validate the value against the xsd definition
- * Nmtoken ::= (NameChar)+
- * NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
+ * validate the value against the xsd definition Nmtoken ::= (NameChar)+ NameChar ::=
+ * Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
*/
public static boolean isValid(String stValue) {
int scan;
- for (scan=0; scan < stValue.length(); scan++) {
- if (!XMLChar.isName(stValue.charAt(scan)))
- return false;
+ for (scan = 0; scan < stValue.length(); scan++) {
+ if (!XMLChar.isName(stValue.charAt(scan)))
+ return false;
}
return true;
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMTokens.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMTokens.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMTokens.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/NMTokens.java Thu Mar 29 11:49:12 2007
@@ -20,21 +20,21 @@
import java.util.Set;
import java.util.StringTokenizer;
-/**
- * Custom class for supporting XSD data type NMTokens
- */
+/** Custom class for supporting XSD data type NMTokens */
public class NMTokens extends NCName {
private static final long serialVersionUID = -2435854824216181165L;
- private NMToken[] tokens;
+ private NMToken[] tokens;
public NMTokens() {
super();
}
+
/**
* ctor for NMTokens
- * @exception IllegalArgumentException will be thrown if validation fails
+ *
+ * @throws IllegalArgumentException will be thrown if validation fails
*/
- public NMTokens (String stValue) throws IllegalArgumentException {
+ public NMTokens(String stValue) throws IllegalArgumentException {
setValue(stValue);
}
@@ -42,7 +42,7 @@
StringTokenizer tokenizer = new StringTokenizer(stValue);
int count = tokenizer.countTokens();
tokens = new NMToken[count];
- for(int i=0;i<count;i++){
+ for (int i = 0; i < count; i++) {
tokens[i] = new NMToken(tokenizer.nextToken());
}
}
@@ -58,9 +58,8 @@
}
/**
- * NMTokens can be equal without having identical ordering because
- * they represent a set of references. Hence we have to compare
- * values here as a set, not a list.
+ * NMTokens can be equal without having identical ordering because they represent a set of
+ * references. Hence we have to compare values here as a set, not a list.
*
* @param object an <code>Object</code> value
* @return a <code>boolean</code> value
@@ -84,8 +83,8 @@
}
/**
- * Returns the sum of the hashcodes of the underlying tokens, an
- * operation which is not sensitive to ordering.
+ * Returns the sum of the hashcodes of the underlying tokens, an operation which is not
+ * sensitive to ordering.
*
* @return an <code>int</code> value
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org