axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r487221 - in /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info: AttributeInfo.java ParameterInfo.java
Date Thu, 14 Dec 2006 14:30:41 GMT
Author: nadiramra
Date: Thu Dec 14 06:30:41 2006
New Revision: 487221

URL: http://svn.apache.org/viewvc?view=rev&rev=487221
Log:
Code formatting....

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/AttributeInfo.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/AttributeInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/AttributeInfo.java?view=diff&rev=487221&r1=487220&r2=487221
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/AttributeInfo.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/AttributeInfo.java
Thu Dec 14 06:30:41 2006
@@ -30,33 +30,26 @@
     private boolean isSimpleType = true;
     private boolean isAttribute = false;
     private boolean isOptional = false;
-    //Chinthana:To get Max and Min occures
+
     private int maxOccurs = 1;
     private int minOccurs = 1;
-    //12/05/2005...........................
+
     private String typeName;
     private String typeNamespace;
     private String className;
     private String attribNameAsMember;
     
-    
-    //Dushshantha:
     //this variable states whether the attribute is an xsd:choice
     private boolean choiceElement = false;
     
-    //Chinthana:
     //this variable states whether the attribute is an xsd:all
     private boolean allElement = false;
-    //04/05/2005...............................................
     
-    //  Dushshantha:
     //This field is set to true if the element is elementFormDefault qualified.
     //This specifies whether the element must be namespace qualified or not in the SOAP message.
     private boolean nsQualified = false;
     
     /**
-     * @param type
-     * @param attribName
      */
     public AttributeInfo(String className)
     {
@@ -149,12 +142,10 @@
     public String getParamNameAsMember()
     {
         this.attribNameAsMember = super.getParamNameWithoutSymbols();
+        
         // need to deal with _Ref stuff :(
-        if (this.className != null
-            && this.className.equals(attribNameAsMember))
-        {
+        if (this.className != null && this.className.equals(attribNameAsMember))
             this.attribNameAsMember = "m_" + this.attribNameAsMember;
-        }
 
         return this.attribNameAsMember;
     }
@@ -162,61 +153,49 @@
     public void setParamName(String paramName)
     {
         super.setParamName(paramName);
+        
         // make sure attributes does not have the same name as class name
-
         if (this.className != null && this.className.equals(attribName))
-        {
             this.attribNameAsMember = "m_" + attribName;
-        }
         else
-        {
             this.attribNameAsMember = attribName;
-        }
     }
     
-    //Dushshantha:
     //getter and setter for choiceElement
-    
     public boolean getChoiceElement()
     {
-    	return this.choiceElement;
+        return this.choiceElement;
     }
     
     public void setChoiceElement(boolean newChoiceElement)
     {
-    	this.choiceElement=newChoiceElement;
+        this.choiceElement=newChoiceElement;
     }
-    //.................................................
     
-    //Chinthana:
     //getter and setter for allElement
-    
     public boolean getAllElement()
     {
-    	return this.allElement;
+        return this.allElement;
     }
     
     public void setAllElement(boolean newAllElement)
     {
-    	this.allElement=newAllElement;
+        this.allElement=newAllElement;
     }
-    //04/05/2005.................................................
-    //Chinthana: Changes to do modification for handle Min and Max occures
     
     /**
-     * Dushshantha:
      * Getter and setter for the field nsQualified 
      */
-    public boolean getNsQualified(){
-    	return nsQualified;
+    public boolean getNsQualified()
+    {
+        return nsQualified;
     }
     
-    public void setNsQualified(boolean nsQual){
-    	nsQualified = nsQual;
+    public void setNsQualified(boolean nsQual)
+    {
+        nsQualified = nsQual;
     }
-    
-    
-    
+
     /**
      * @return int
      */
@@ -249,6 +228,4 @@
     {
         this.minOccurs = minOccurs;
     }
-    //12/05/2005
-
 }

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java?view=diff&rev=487221&r1=487220&r2=487221
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java
Thu Dec 14 06:30:41 2006
@@ -33,20 +33,20 @@
     private boolean isAnyType = false;
     protected boolean isArray = false;
     private boolean isAttribute = false;
-	private boolean isNillable = false;
-    private boolean isOptional;
+    private boolean isNillable = false;
+    private boolean isOptional = false;
 
-	
-	public boolean isNillable()
-	{
-		return isNillable;
-	}
-	
-	public void setNillable(boolean nillable)
-	{
-		isNillable = nillable;
-	}
-	
+    
+    public boolean isNillable()
+    {
+        return isNillable;
+    }
+    
+    public void setNillable(boolean nillable)
+    {
+        isNillable = nillable;
+    }
+    
     /**
      * @return boolean
      */
@@ -77,47 +77,43 @@
     public String getParamName()
     {
         // TODO: design review needed
-        // 		- If type and name are equals add "_Ref" ie : ref="..."
+        //         - If type and name are equals add "_Ref" ie : ref="..."
         String result;
 
         if (attribName.lastIndexOf(SymbolTable.ANON_TOKEN) > 1)
         {
             attribName =
-                attribName.substring(
-                    attribName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
-                    attribName.length());
+                attribName.substring(attribName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
+                                     attribName.length());
         }
-        // Samisa: This second call to TypeMap.resoleveWSDL2LanguageNameClashes
-        // is made to make sure after replacinf ANON_TOKEN it is still not a keyword
+        
+        // This second call to TypeMap.resoleveWSDL2LanguageNameClashes
+        // is made to make sure after replacing ANON_TOKEN it is still not a keyword
         attribName =
-            TypeMap.resolveWSDL2LanguageNameClashes(
-                attribName,
-                WrapperConstants.LANGUAGE_CPP);
+            TypeMap.resolveWSDL2LanguageNameClashes(attribName, WrapperConstants.LANGUAGE_CPP);
 
         if (isReference())
-        {
             result = attribName + "_Ref";
-        }
         else
-        {
             result = attribName;
-        }
+
         return result;
     }
-    //  29/3/05.To avoid the '-' in attribute name.
-	public String getParamNameWithoutSymbols() {
-		//    	 TODO: design review needed
-		// 		- If type and name are equals add "_Ref" ie : ref="..."
-		String result = this.getParamName();
-	
-		char[] symbols = TypeMap.getSymbols();
-
-		for (int j = 0; j < symbols.length; j++) {
-			result = result.replace(symbols[j], '_');
-		}
+    
+    // To avoid the '-' in attribute name.
+    public String getParamNameWithoutSymbols() 
+    {
+        //         TODO: design review needed
+        //         - If type and name are equals add "_Ref" ie : ref="..."
+        String result = this.getParamName();
+    
+        char[] symbols = TypeMap.getSymbols();
 
-		return result;
-	}
+        for (int j = 0; j < symbols.length; j++)
+            result = result.replace(symbols[j], '_');
+
+        return result;
+    }
 
     public String getParamNameAsSOAPElement()
     {
@@ -126,18 +122,18 @@
         if (attribName.lastIndexOf(SymbolTable.ANON_TOKEN) > 1)
         {
             result =
-                attribName.substring(
-                    attribName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
-                    attribName.length());
+                attribName.substring(attribName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
+                                     attribName.length());
         }
         
-        if( result.charAt(0) == '_') //  Make sure SOAP tag name is not prefixed
-				     //	 because it is a key word
+        // Make sure SOAP tag name is not prefixed because it is a key word
+        if( result.charAt(0) == '_') 
         {
             String tagname = result.substring(1, result.length() );
+            
             if( result.equals( TypeMap.resolveWSDL2LanguageNameClashes(tagname,
-		                WrapperConstants.LANGUAGE_CPP)))
-		result = tagname;
+                                                                       WrapperConstants.LANGUAGE_CPP)))
+                result = tagname;
 
         }
         return result;
@@ -148,26 +144,20 @@
      */
     public boolean isReference()
     {
-        return type != null
-            && attribName.equals(type.getLanguageSpecificName());
+        return type != null && attribName.equals(type.getLanguageSpecificName());
     }
 
     public void setParamName(String paramName)
     {
-        //Samisa: 21/08/2004
         if (paramName.lastIndexOf(SymbolTable.ANON_TOKEN) > 1)
         {
             paramName =
-                paramName.substring(
-                    paramName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
-                    paramName.length());
+                paramName.substring(paramName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
+                                    paramName.length());
         }
-        paramName =
-            TypeMap.resolveWSDL2LanguageNameClashes(
-                paramName,
-                WrapperConstants.LANGUAGE_CPP);
+        paramName =TypeMap.resolveWSDL2LanguageNameClashes(paramName,
+                                                           WrapperConstants.LANGUAGE_CPP);
         
-        //Samisa
         this.attribName = paramName;
     }
 
@@ -176,6 +166,7 @@
         this.type = type;
         this.attribName = attribName;
     }
+    
     public Type getType()
     {
         return type;
@@ -194,7 +185,7 @@
     {
         return elementName;
     }
-    //Samisa 21/08/2004
+
     public String getElementNameAsString()
     {
         String paramName = elementName.getLocalPart();
@@ -205,29 +196,23 @@
                     paramName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
                     paramName.length());
         }
-        paramName =
-            TypeMap.resolveWSDL2LanguageNameClashes(
-                paramName,
-                WrapperConstants.LANGUAGE_CPP);
+        paramName = TypeMap.resolveWSDL2LanguageNameClashes(paramName,
+                                                            WrapperConstants.LANGUAGE_CPP);
         return paramName;
 
     }
-    //Samisa
 
-    //Samisa 16/03/2005
     public String getSOAPElementNameAsString()
     {
         String paramName = elementName.getLocalPart();
         if (paramName.lastIndexOf(SymbolTable.ANON_TOKEN) > 1)
         {
             paramName =
-                paramName.substring(
-                    paramName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
-                    paramName.length());
+                paramName.substring(paramName.lastIndexOf(SymbolTable.ANON_TOKEN) + 1,
+                                                          paramName.length());
         }
         return paramName;
     }
-    //Samisa
 
     /**
      * @param name



---------------------------------------------------------------------
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