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 di...@apache.org on 2006/09/01 01:03:07 UTC

svn commit: r439087 - in /webservices/axis2/trunk/java/modules: adb-codegen/src/org/apache/axis2/schema/ adb-codegen/src/org/apache/axis2/schema/writer/ adb/src/org/apache/axis2/databinding/utils/

Author: dims
Date: Thu Aug 31 16:03:06 2006
New Revision: 439087

URL: http://svn.apache.org/viewvc?rev=439087&view=rev
Log:
- remove unnecessary exception in ConverterUtil
- values for Max/Min Inclusive/Exclusive are *NOT* integers all the time, they depend on the restriction's base type


Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java?rev=439087&r1=439086&r2=439087&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java Thu Aug 31 16:03:06 2006
@@ -53,14 +53,14 @@
     protected String ownClassName = null;
     
     protected long lengthFacet = -1;
-    protected long maxExclusiveFacet = -1;
-    protected long minExclusiveFacet = -1;
-    protected long maxInclusiveFacet = -1;
-    protected long minInclusiveFacet = -1;
     protected long maxLengthFacet = -1;
     protected long minLengthFacet = -1;
     protected ArrayList enumFacet = new ArrayList();
     protected String patternFacet = null;
+    protected String maxExclusiveFacet = null;
+    protected String minExclusiveFacet = null;
+    protected String maxInclusiveFacet = null;
+    protected String minInclusiveFacet = null;
 
     protected List nillableQNameList  = new ArrayList();
 
@@ -561,7 +561,7 @@
      *
      * @param maxExclusiveFacet
      */
-    public void setMaxExclusiveFacet(long maxExclusiveFacet) {
+    public void setMaxExclusiveFacet(String maxExclusiveFacet) {
     	this.maxExclusiveFacet = maxExclusiveFacet;
     }
     
@@ -570,7 +570,7 @@
      *
      * @return Returns the maxExclusive.
      */
-    public long getMaxExclusiveFacet() {
+    public String getMaxExclusiveFacet() {
     	return this.maxExclusiveFacet;
     }
     
@@ -579,7 +579,7 @@
      *
      * @param minExclusiveFacet
      */
-    public void setMinExclusiveFacet(long minExclusiveFacet) {
+    public void setMinExclusiveFacet(String minExclusiveFacet) {
     	this.minExclusiveFacet = minExclusiveFacet;
     }
     
@@ -588,7 +588,7 @@
      *
      * @return Returns the minExclusive.
      */
-    public long getMinExclusiveFacet() {
+    public String getMinExclusiveFacet() {
     	return this.minExclusiveFacet;
     }
     
@@ -597,7 +597,7 @@
      *
      * @param maxInclusiveFacet
      */
-    public void setMaxInclusiveFacet(long maxInclusiveFacet) {
+    public void setMaxInclusiveFacet(String maxInclusiveFacet) {
     	this.maxInclusiveFacet = maxInclusiveFacet;
     }
     
@@ -606,7 +606,7 @@
      *
      * @return Returns the maxInclusive.
      */
-    public long getMaxInclusiveFacet() {
+    public String getMaxInclusiveFacet() {
     	return this.maxInclusiveFacet;
     }
     
@@ -615,7 +615,7 @@
      *
      * @param minInclusiveFacet
      */
-    public void setMinInclusiveFacet(long minInclusiveFacet) {
+    public void setMinInclusiveFacet(String minInclusiveFacet) {
     	this.minInclusiveFacet = minInclusiveFacet;
     }
     
@@ -624,7 +624,7 @@
      *
      * @return Returns the minInclusive.
      */
-    public long getMinInclusiveFacet() {
+    public String getMinInclusiveFacet() {
     	return this.minInclusiveFacet;
     }
     

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=439087&r1=439086&r2=439087&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Thu Aug 31 16:03:06 2006
@@ -1244,22 +1244,22 @@
 			
 			else if ( obj instanceof XmlSchemaMaxExclusiveFacet ) {
 				XmlSchemaMaxExclusiveFacet maxEx = (XmlSchemaMaxExclusiveFacet) obj;
-				metaInfHolder.setMaxExclusiveFacet(Integer.parseInt(maxEx.getValue().toString()));
+				metaInfHolder.setMaxExclusiveFacet(maxEx.getValue().toString());
 			}
 			
 			else if ( obj instanceof XmlSchemaMinExclusiveFacet ) {
 				XmlSchemaMinExclusiveFacet minEx = (XmlSchemaMinExclusiveFacet) obj;
-				metaInfHolder.setMinExclusiveFacet(Integer.parseInt(minEx.getValue().toString()));
+				metaInfHolder.setMinExclusiveFacet(minEx.getValue().toString());
 			}
 			
 			else if ( obj instanceof XmlSchemaMaxInclusiveFacet ) {
 				XmlSchemaMaxInclusiveFacet maxIn = (XmlSchemaMaxInclusiveFacet) obj;
-				metaInfHolder.setMaxInclusiveFacet(Integer.parseInt(maxIn.getValue().toString()));
+				metaInfHolder.setMaxInclusiveFacet(maxIn.getValue().toString());
 			}
 			
 			else if ( obj instanceof XmlSchemaMinInclusiveFacet ) {
 				XmlSchemaMinInclusiveFacet minIn = (XmlSchemaMinInclusiveFacet) obj;
-				metaInfHolder.setMinInclusiveFacet(Integer.parseInt(minIn.getValue().toString()));
+				metaInfHolder.setMinInclusiveFacet(minIn.getValue().toString());
 			}
 			
 			else if ( obj instanceof XmlSchemaMaxLengthFacet ) {

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java?rev=439087&r1=439086&r2=439087&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java Thu Aug 31 16:03:06 2006
@@ -698,19 +698,19 @@
             	XSLTUtils.addAttribute(model, "minLenFacet", metainf.getMinLengthFacet() + "", property);
             }
             
-            if (metainf.isRestrictionBaseType(name) && metainf.getMaxExclusiveFacet() != -1) {
+            if (metainf.isRestrictionBaseType(name) && metainf.getMaxExclusiveFacet() != null) {
             	XSLTUtils.addAttribute(model, "maxExFacet", metainf.getMaxExclusiveFacet() + "", property);
             }
             
-            if (metainf.isRestrictionBaseType(name) && metainf.getMinExclusiveFacet() != -1) {
+            if (metainf.isRestrictionBaseType(name) && metainf.getMinExclusiveFacet() != null) {
             	XSLTUtils.addAttribute(model, "minExFacet", metainf.getMinExclusiveFacet() + "", property);
             }
             
-            if (metainf.isRestrictionBaseType(name) && metainf.getMaxInclusiveFacet() != -1) {
+            if (metainf.isRestrictionBaseType(name) && metainf.getMaxInclusiveFacet() != null) {
             	XSLTUtils.addAttribute(model, "maxInFacet", metainf.getMaxInclusiveFacet() + "", property);
             }
             
-            if (metainf.isRestrictionBaseType(name) && metainf.getMinInclusiveFacet() != -1) {
+            if (metainf.isRestrictionBaseType(name) && metainf.getMinInclusiveFacet() != null) {
             	XSLTUtils.addAttribute(model, "minInFacet", metainf.getMinInclusiveFacet() + "", property);
             }
             

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=439087&r1=439086&r2=439087&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Thu Aug 31 16:03:06 2006
@@ -489,11 +489,11 @@
         return new URI(s);
     }
 
-    public static BigInteger convertToInteger(String s) throws Exception {
+    public static BigInteger convertToInteger(String s) {
         return new BigInteger(s);
     }
 
-    public static BigInteger convertToBigInteger(String s) throws Exception {
+    public static BigInteger convertToBigInteger(String s) {
     	return convertToInteger(s);
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org