axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r605920 - in /webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema: template/ADBBeanTemplate.xsl writer/JavaBeanWriter.java
Date Thu, 20 Dec 2007 13:29:36 GMT
Author: amilas
Date: Thu Dec 20 05:29:34 2007
New Revision: 605920

URL: http://svn.apache.org/viewvc?rev=605920&view=rev
Log:
fixed the final part of the Axis2-3353

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl?rev=605920&r1=605919&r2=605920&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
Thu Dec 20 05:29:34 2007
@@ -68,6 +68,7 @@
         <xsl:variable name="mapperClass" select="@mapperClass"/>
         <xsl:variable name="particleClass" select="@particleClass"/>
         <xsl:variable name="hasParticleType" select="@hasParticleType"/>
+        <xsl:variable name="usewrapperclasses" select="@usewrapperclasses"/>
     <!-- write the class header. this should be done only when unwrapped -->
 
         <xsl:if test="not(not(@unwrapped) or (@skip-write))">
@@ -85,7 +86,6 @@
             *  <xsl:value-of select="$name"/> bean class
             */
         </xsl:if>
-
         public <xsl:if test="not(@unwrapped) or (@skip-write)">static</xsl:if>
<xsl:if test="@isAbstract and @unwrapped and not(@skip-write)">abstract</xsl:if>
class <xsl:value-of select="$name"/> <xsl:if test="$extension"> extends <xsl:value-of
select="$extension"/></xsl:if> <xsl:if test="$restriction"> extends <xsl:value-of
select="$restriction"/></xsl:if>
         <xsl:if test="$union and not($restriction) and not($extension)"> extends  org.apache.axis2.databinding.types.Union
</xsl:if>
         implements org.apache.axis2.databinding.ADBBean{
@@ -478,6 +478,9 @@
                                    <xsl:when test="@primitive and not(@array)">
                                        // setting primitive attribute tracker to true
                                        <xsl:choose>
+                                           <xsl:when test="$usewrapperclasses">
+                                              if (false) {
+                                           </xsl:when>
                                            <xsl:when test="$propertyType='int'">
                                                if (param==java.lang.Integer.MIN_VALUE) {
                                            </xsl:when>
@@ -938,6 +941,9 @@
                                     <xsl:choose>
                                         <xsl:when test="@primitive">
                                             <xsl:choose>
+                                               <xsl:when test="$usewrapperclasses">
+                                                  if (true) {
+                                               </xsl:when>
                                                <xsl:when test="$propertyType='int'">
                                                    if (<xsl:value-of select="$varName"/>!=java.lang.Integer.MIN_VALUE)
{
                                                </xsl:when>
@@ -1339,6 +1345,9 @@
                                    for (int i = 0;i &lt; <xsl:value-of select="$varName"/>.length;i++){
                                         <xsl:if test="@primitive">
                                             <xsl:choose>
+                                               <xsl:when test="$usewrapperclasses">
+                                                  if (true) {
+                                               </xsl:when>
                                                <xsl:when test="$propertyBaseType='int'">
                                                    if (<xsl:value-of select="$varName"/>[i]!=java.lang.Integer.MIN_VALUE)
{
                                                </xsl:when>
@@ -1566,6 +1575,9 @@
                                     <xsl:if test="@primitive">
                                        <!-- we have to check for nillability with min
value -->
                                        <xsl:choose>
+                                           <xsl:when test="$usewrapperclasses">
+                                                  if (false) {
+                                           </xsl:when>
                                            <xsl:when test="$propertyType='int'">
                                                if (<xsl:value-of select="$varName"/>==java.lang.Integer.MIN_VALUE)
{
                                            </xsl:when>
@@ -1750,6 +1762,9 @@
 
                                <!-- we have to check for nillability with min value -->
                                        <xsl:choose>
+                                           <xsl:when test="$usewrapperclasses">
+                                                  if (false) {
+                                           </xsl:when>
                                            <xsl:when test="$propertyType='int'">
                                                if (<xsl:value-of select="$varName"/>==java.lang.Integer.MIN_VALUE)
{
                                            </xsl:when>

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=605920&r1=605919&r2=605920&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 Dec 20 05:29:34 2007
@@ -44,6 +44,7 @@
 import java.io.*;
 import java.util.*;
 
+
 /**
  * Java Bean writer for the schema compiler.
  */
@@ -493,7 +494,6 @@
         XSLTUtils.addAttribute(model, "originalName", originalName, rootElt);
         XSLTUtils.addAttribute(model, "package", packageName, rootElt);
         XSLTUtils.addAttribute(model, "nsuri", qName.getNamespaceURI(), rootElt);
-        XSLTUtils.addAttribute(model, "isUseWrapperClasses", isUseWrapperClasses? "yes" :
"false", rootElt);
         XSLTUtils.addAttribute(model, "nsprefix", isSuppressPrefixesMode ? "" : getPrefixForURI(qName
                 .getNamespaceURI(), qName.getPrefix()), rootElt);
 
@@ -515,6 +515,10 @@
 
         if (metainf.isAnonymous()) {
             XSLTUtils.addAttribute(model, "anon", "yes", rootElt);
+        }
+
+        if (isUseWrapperClasses){
+            XSLTUtils.addAttribute(model, "usewrapperclasses", "yes", rootElt);
         }
 
         if (metainf.isExtension()) {



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


Mime
View raw message