airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patanac...@apache.org
Subject svn commit: r1182592 - in /incubator/airavata/trunk/modules: commons/gfac-schema/src/main/java/org/apache/airavata/commons/ commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ commons/gfac-schema/src/main/java/org/apache/airavata/c...
Date Wed, 12 Oct 2011 21:57:24 GMT
Author: patanachai
Date: Wed Oct 12 21:57:23 2011
New Revision: 1182592

URL: http://svn.apache.org/viewvc?rev=1182592&view=rev
Log:
New DataType System

Added:
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/ParameterFactory.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/resources/
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/resources/datatype.properties
Removed:
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/REVIEW.txt
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/ErrorCodes.java
Modified:
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/DataType.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/AbstractParameter.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/BooleanParameter.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/DoubleParameter.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FileParameter.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FloatParameter.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/IntegerParameter.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/StringParameter.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/util/SchemaUtil.java
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java
    incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
    incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/util/WSDLUtil.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/post/GridFtpOutputStaging.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/GridFtpInputStaging.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/HttpInputStaging.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GFacConstants.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/InputUtils.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/LogUtils.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/OutputUtils.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/DataType.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/DataType.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/DataType.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/DataType.java
Wed Oct 12 21:57:23 2011
@@ -21,11 +21,26 @@
 
 package org.apache.airavata.commons.gfac.type;
 
-public enum DataType{
-	String,
-	Double,
-	Integer,
-	Float,
-	Boolean,
-	File
+public class DataType implements Type{
+    
+    private String type;
+    
+    public DataType(){        
+    }
+    
+    public DataType(String type){
+        this.type = type;
+    }
+        
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getType(){
+        return this.type;
+    }
+    
+    public String toString(){
+        return this.type;
+    }
 }
\ No newline at end of file

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/AbstractParameter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/AbstractParameter.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/AbstractParameter.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/AbstractParameter.java
Wed Oct 12 21:57:23 2011
@@ -21,11 +21,9 @@
 
 package org.apache.airavata.commons.gfac.type.parameter;
 
-import org.apache.airavata.commons.gfac.type.DataType;
 import org.apache.airavata.commons.gfac.type.Parameter;
 
 public abstract class AbstractParameter extends Parameter {
-	public abstract DataType getType();
 	public abstract void parseStringVal(String val);
 	public abstract String toStringVal();
 }

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/BooleanParameter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/BooleanParameter.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/BooleanParameter.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/BooleanParameter.java
Wed Oct 12 21:57:23 2011
@@ -21,7 +21,6 @@
 
 package org.apache.airavata.commons.gfac.type.parameter;
 
-import org.apache.airavata.commons.gfac.type.DataType;
 
 public class BooleanParameter extends AbstractParameter {
 
@@ -34,8 +33,4 @@ public class BooleanParameter extends Ab
 	public String toStringVal(){
 	    return (value == null)?null:this.value.toString();
 	}
-	
-	public DataType getType() {
-		return DataType.Boolean;
-	}			
 }

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/DoubleParameter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/DoubleParameter.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/DoubleParameter.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/DoubleParameter.java
Wed Oct 12 21:57:23 2011
@@ -21,7 +21,6 @@
 
 package org.apache.airavata.commons.gfac.type.parameter;
 
-import org.apache.airavata.commons.gfac.type.DataType;
 
 public class DoubleParameter extends AbstractParameter {
 	
@@ -34,8 +33,4 @@ public class DoubleParameter extends Abs
 	public String toStringVal(){
 	    return (value == null)?null:this.value.toString();
 	}
-	
-	public DataType getType() {
-		return DataType.Double;
-	}		
 }

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FileParameter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FileParameter.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FileParameter.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FileParameter.java
Wed Oct 12 21:57:23 2011
@@ -23,8 +23,6 @@ package org.apache.airavata.commons.gfac
 
 import java.net.URI;
 
-import org.apache.airavata.commons.gfac.type.DataType;
-
 public class FileParameter extends AbstractParameter {
 
     private URI value;
@@ -36,8 +34,4 @@ public class FileParameter extends Abstr
 	public String toStringVal(){
 	    return (value == null)?null:this.value.toString();
 	}
-	
-	public DataType getType() {
-		return DataType.File;
-	}			
 }

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FloatParameter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FloatParameter.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FloatParameter.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/FloatParameter.java
Wed Oct 12 21:57:23 2011
@@ -21,7 +21,6 @@
 
 package org.apache.airavata.commons.gfac.type.parameter;
 
-import org.apache.airavata.commons.gfac.type.DataType;
 
 public class FloatParameter extends AbstractParameter {   
 	
@@ -34,8 +33,4 @@ public class FloatParameter extends Abst
 	public String toStringVal(){
 	    return (value == null)?null:this.value.toString();
 	}
-	
-	public DataType getType() {
-		return DataType.Float;
-	}	
 }

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/IntegerParameter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/IntegerParameter.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/IntegerParameter.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/IntegerParameter.java
Wed Oct 12 21:57:23 2011
@@ -21,7 +21,6 @@
 
 package org.apache.airavata.commons.gfac.type.parameter;
 
-import org.apache.airavata.commons.gfac.type.DataType;
 
 public class IntegerParameter extends AbstractParameter {
 	
@@ -34,9 +33,4 @@ public class IntegerParameter extends Ab
 	public String toStringVal(){
 	    return (value == null)?null:this.value.toString();
 	}
-	
-	public DataType getType() {
-		return DataType.Integer;
-	}
-
 }

Added: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/ParameterFactory.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/ParameterFactory.java?rev=1182592&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/ParameterFactory.java
(added)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/ParameterFactory.java
Wed Oct 12 21:57:23 2011
@@ -0,0 +1,126 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.commons.gfac.type.parameter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.airavata.commons.gfac.type.DataType;
+import org.apache.commons.configuration.Configuration;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.PropertiesConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ParameterFactory {
+
+    private static final Logger log = LoggerFactory.getLogger(ParameterFactory.class);
+    private static final String PROPERTIES_NAME = "datatype.properties";
+    private static ParameterFactory instance;
+    private Map<String, Class<? extends AbstractParameter>> map;
+    private Map<String, DataType> typeMap;
+    private List<DataType> types;
+
+    private ParameterFactory() {
+        /*
+         * Load properties of type
+         */
+        try {
+            types = new ArrayList<DataType>();
+            map = new HashMap<String, Class<? extends AbstractParameter>>();
+            typeMap = new HashMap<String, DataType>(); 
+            /*
+             * Load properties only it is not loaded
+             */
+            Configuration config = new PropertiesConfiguration(PROPERTIES_NAME);
+            Iterator iterator = config.getKeys();
+            while (iterator.hasNext()) {
+                String key = (String) iterator.next();
+
+                /*
+                 * throw exception for wrong config property file.
+                 */
+                if (map.containsKey(key)) {
+                    log.error("Property file contains duplicate data types");
+                    continue;
+                }
+
+                try {
+                    /*
+                     * Initialize association class
+                     */
+                    Class<? extends AbstractParameter> cl = Class.forName(config.getString(key)).asSubclass(
+                            AbstractParameter.class);
+
+                    map.put(key, cl);
+                    DataType type = new DataType(key);
+                    typeMap.put(key, type);
+                    types.add(type);
+
+                } catch (Exception e) {
+                    log.error("Cannont find associated class: " + config.getString(key) +
" with type: " + key);
+                }
+
+            }
+        } catch (ConfigurationException e) {
+            throw new RuntimeException("unable to load configurations:::" + PROPERTIES_NAME,
e);
+        }
+
+    }
+
+    public static synchronized ParameterFactory getInstance() {
+        if (instance == null) {
+            instance = new ParameterFactory();
+        }
+        return instance;
+    }
+
+    public List<DataType> listDataTypes() {
+        return types;
+    }
+
+    public AbstractParameter createActualParameter(DataType dataType) throws Exception {
+        return createActualParameter(dataType.getType());
+    }
+    
+    public AbstractParameter createActualParameter(String type) throws Exception{
+        if (!map.containsKey(type))
+            throw new RuntimeException("Type is not supprted: " + type);
+        Class<? extends AbstractParameter> cl = map.get(type);
+        AbstractParameter result = cl.newInstance();
+        result.setType(getType(type));
+        return result;
+    }
+    
+    public DataType getType(String type){
+        if (!typeMap.containsKey(type))
+            throw new RuntimeException("Type is not supprted: " + type);
+        return typeMap.get(type);
+    }
+
+    public boolean hasType(DataType dataType, String type){
+        return dataType.getType().equalsIgnoreCase(type);
+    }
+}

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/StringParameter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/StringParameter.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/StringParameter.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/parameter/StringParameter.java
Wed Oct 12 21:57:23 2011
@@ -21,7 +21,6 @@
 
 package org.apache.airavata.commons.gfac.type.parameter;
 
-import org.apache.airavata.commons.gfac.type.DataType;
 
 
 public class StringParameter extends AbstractParameter {
@@ -35,8 +34,4 @@ public class StringParameter extends Abs
 	public String toStringVal(){
 	    return (value == null)?null:this.value.toString();
 	}
-
-	public DataType getType() {
-		return DataType.String;
-	}
 }

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/util/SchemaUtil.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/util/SchemaUtil.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/util/SchemaUtil.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/util/SchemaUtil.java
Wed Oct 12 21:57:23 2011
@@ -26,15 +26,7 @@ import java.beans.XMLEncoder;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
-import org.apache.airavata.commons.gfac.type.DataType;
 import org.apache.airavata.commons.gfac.type.Type;
-import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
-import org.apache.airavata.commons.gfac.type.parameter.BooleanParameter;
-import org.apache.airavata.commons.gfac.type.parameter.DoubleParameter;
-import org.apache.airavata.commons.gfac.type.parameter.FileParameter;
-import org.apache.airavata.commons.gfac.type.parameter.FloatParameter;
-import org.apache.airavata.commons.gfac.type.parameter.IntegerParameter;
-import org.apache.airavata.commons.gfac.type.parameter.StringParameter;
 
 public class SchemaUtil {
 	public static Type parseFromXML(String xml) {
@@ -52,22 +44,4 @@ public class SchemaUtil {
 		e.close();
 		return x.toString();
 	}
-	
-	public static AbstractParameter mapFromType(DataType type){
-	    switch(type){
-	    case String:
-	        return new StringParameter();
-	    case Double:
-	        return new DoubleParameter();
-	    case Integer:
-	        return new IntegerParameter();
-	    case Float:
-	        return new FloatParameter();
-	    case Boolean:
-	        return new BooleanParameter();
-	    case File:
-	        return new FileParameter();
-	    }
-	    return null;
-	}
 }

Added: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/resources/datatype.properties
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/resources/datatype.properties?rev=1182592&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/resources/datatype.properties
(added)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/resources/datatype.properties
Wed Oct 12 21:57:23 2011
@@ -0,0 +1,31 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+#
+# Parameter Data Type. The system will support the following data type.
+# Each type will have its own Parameter implementation to serialize and de-serialize the
object.
+#
+String=org.apache.airavata.commons.gfac.type.parameter.StringParameter
+Double=org.apache.airavata.commons.gfac.type.parameter.DoubleParameter
+Integer=org.apache.airavata.commons.gfac.type.parameter.IntegerParameter
+Float=org.apache.airavata.commons.gfac.type.parameter.FloatParameter
+Boolean=org.apache.airavata.commons.gfac.type.parameter.BooleanParameter
+File=org.apache.airavata.commons.gfac.type.parameter.FileParameter

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java
(original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java
Wed Oct 12 21:57:23 2011
@@ -67,15 +67,9 @@ public class WebServiceUtil {
     }
 
     private static void generateElementFromType(Parameter parameter, StringBuilder builder)
{
-        switch (parameter.getType()) {
-        case String:
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getName());
-            builder.append("\" nillable=\"true\" type=\"xs:string\"/>");
-            break;
-        default:
-            break;
-        }
+        builder.append("<xs:element minOccurs=\"0\" name=\"");
+        builder.append(parameter.getName());
+        builder.append("\" nillable=\"true\" type=\"xs:string\"/>");
 
     }
 

Modified: incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
(original)
+++ incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
Wed Oct 12 21:57:23 2011
@@ -34,7 +34,7 @@ import javax.xml.stream.XMLStreamReader;
 import org.apache.airavata.commons.gfac.type.Parameter;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
-import org.apache.airavata.commons.gfac.type.util.SchemaUtil;
+import org.apache.airavata.commons.gfac.type.parameter.ParameterFactory;
 import org.apache.airavata.core.gfac.context.invocation.impl.DefaultExecutionContext;
 import org.apache.airavata.core.gfac.context.invocation.impl.DefaultInvocationContext;
 import org.apache.airavata.core.gfac.context.message.impl.ParameterContextImpl;
@@ -184,7 +184,7 @@ public class GFacMessageReciever impleme
                     throw new Exception("Parameter is not found in the message");
                 }
 
-                AbstractParameter param = SchemaUtil.mapFromType(parameter.getType());
+                AbstractParameter param = ParameterFactory.getInstance().createActualParameter(parameter.getType());
                 param.parseStringVal(element.getText());
                 inputParam.add(parameter.getName(), param);
             }
@@ -195,7 +195,7 @@ public class GFacMessageReciever impleme
             ParameterContextImpl outputParam = new ParameterContextImpl();
             List<Parameter> outputs = serviceDescription.getOutputParameters();
             for (Parameter parameter : outputs) {
-                outputParam.add(parameter.getName(), SchemaUtil.mapFromType(parameter.getType()));
+                outputParam.add(parameter.getName(), ParameterFactory.getInstance().createActualParameter(parameter.getType()));
             }
 
             invocationContext.setInput(inputParam);

Modified: incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/util/WSDLUtil.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/util/WSDLUtil.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/util/WSDLUtil.java
(original)
+++ incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/util/WSDLUtil.java
Wed Oct 12 21:57:23 2011
@@ -132,7 +132,7 @@ public class WSDLUtil {
                  * Create SOAP Operation for BindingOperation
                  */
                 SOAPOperation soapoperation = new SOAPOperationImpl();
-                soapoperation.setSoapActionURI(namespace + "invoke");
+                soapoperation.setSoapActionURI(namespace + "/invoke");
                 soapoperation.setStyle("document");
                 
                 boperation.setBindingInput(input);

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/post/GridFtpOutputStaging.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/post/GridFtpOutputStaging.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/post/GridFtpOutputStaging.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/post/GridFtpOutputStaging.java
Wed Oct 12 21:57:23 2011
@@ -34,6 +34,7 @@ import org.apache.airavata.commons.gfac.
 import org.apache.airavata.commons.gfac.type.host.GlobusHost;
 import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
 import org.apache.airavata.commons.gfac.type.parameter.FileParameter;
+import org.apache.airavata.commons.gfac.type.parameter.ParameterFactory;
 import org.apache.airavata.core.gfac.context.invocation.InvocationContext;
 import org.apache.airavata.core.gfac.context.message.MessageContext;
 import org.apache.airavata.core.gfac.context.security.impl.GSISecurityContext;
@@ -64,7 +65,7 @@ public class GridFtpOutputStaging extend
 
                 for (Iterator<String> iterator = outputContext.getNames(); iterator.hasNext();)
{
                     String key = iterator.next();
-                    if (outputContext.getValue(key).getType() == DataType.File) {
+                    if (ParameterFactory.getInstance().hasType(outputContext.getValue(key).getType(),
"File")) {
                         FileParameter fileParameter = (FileParameter) outputContext.getValue(key);
 
                         /*

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/GridFtpInputStaging.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/GridFtpInputStaging.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/GridFtpInputStaging.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/GridFtpInputStaging.java
Wed Oct 12 21:57:23 2011
@@ -34,6 +34,7 @@ import org.apache.airavata.commons.gfac.
 import org.apache.airavata.commons.gfac.type.host.GlobusHost;
 import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
 import org.apache.airavata.commons.gfac.type.parameter.FileParameter;
+import org.apache.airavata.commons.gfac.type.parameter.ParameterFactory;
 import org.apache.airavata.core.gfac.context.invocation.InvocationContext;
 import org.apache.airavata.core.gfac.context.message.MessageContext;
 import org.apache.airavata.core.gfac.context.security.impl.GSISecurityContext;
@@ -65,7 +66,7 @@ public class GridFtpInputStaging extends
 
                 for (Iterator<String> iterator = inputContext.getNames(); iterator.hasNext();)
{
                     String key = iterator.next();
-                    if (inputContext.getValue(key).getType() == DataType.File) {
+                    if (ParameterFactory.getInstance().hasType(inputContext.getValue(key).getType(),
"File")) {
                         FileParameter fileParameter = (FileParameter) inputContext.getValue(key);
 
                         /*

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/HttpInputStaging.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/HttpInputStaging.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/HttpInputStaging.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/pre/HttpInputStaging.java
Wed Oct 12 21:57:23 2011
@@ -38,6 +38,7 @@ import org.apache.airavata.commons.gfac.
 import org.apache.airavata.commons.gfac.type.host.GlobusHost;
 import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
 import org.apache.airavata.commons.gfac.type.parameter.FileParameter;
+import org.apache.airavata.commons.gfac.type.parameter.ParameterFactory;
 import org.apache.airavata.core.gfac.context.invocation.InvocationContext;
 import org.apache.airavata.core.gfac.context.message.MessageContext;
 import org.apache.airavata.core.gfac.context.security.impl.GSISecurityContext;
@@ -69,7 +70,7 @@ public class HttpInputStaging extends Pr
 
                 for (Iterator<String> iterator = inputContext.getNames(); iterator.hasNext();)
{
                     String key = iterator.next();
-                    if (inputContext.getValue(key).getType() == DataType.File) {
+                    if (ParameterFactory.getInstance().hasType(inputContext.getValue(key).getType(),
"File")) {
                         FileParameter fileParameter = (FileParameter) inputContext.getValue(key);
 
                         /*

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GFacConstants.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GFacConstants.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GFacConstants.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GFacConstants.java
Wed Oct 12 21:57:23 2011
@@ -35,4 +35,7 @@ public class GFacConstants {
 
     public static final String LOCALHOST = "localhost";
     
+    private GFacConstants(){       
+    }
+    
 }

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
Wed Oct 12 21:57:23 2011
@@ -39,6 +39,8 @@ import org.slf4j.LoggerFactory;
 public class GfacUtils {
     private final static Logger log = LoggerFactory.getLogger(GfacUtils.class);
 
+    private GfacUtils(){       
+    }
     
     /**
      * Read data from inputStream and convert it to String.

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/InputUtils.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/InputUtils.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/InputUtils.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/InputUtils.java
Wed Oct 12 21:57:23 2011
@@ -27,6 +27,9 @@ public class InputUtils {
     
     private static final String SPACE = " ";
     
+    private InputUtils(){       
+    }
+    
     public static String buildCommand(List<String> cmdList) {
         StringBuffer buff = new StringBuffer();
         for (String string : cmdList) {

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/LogUtils.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/LogUtils.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/LogUtils.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/LogUtils.java
Wed Oct 12 21:57:23 2011
@@ -28,6 +28,9 @@ import org.slf4j.Logger;
 
 public class LogUtils {
 
+    private LogUtils(){        
+    }
+    
     /**
      * Print out properties' items into a log with the format: key = value. 
      * Use debug level if it is enabled otherwise use info level.

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/OutputUtils.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/OutputUtils.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/OutputUtils.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/OutputUtils.java
Wed Oct 12 21:57:23 2011
@@ -32,6 +32,9 @@ import org.apache.airavata.core.gfac.con
 
 public class OutputUtils {   
     
+    private OutputUtils(){        
+    }
+    
     public static Map<String, ?> fillOutputFromStdout(MessageContext<AbstractParameter>
outMessage, String stdout) {
 
         Map<String, AbstractParameter> result = new HashMap<String, AbstractParameter>();

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java?rev=1182592&r1=1182591&r2=1182592&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java
Wed Oct 12 21:57:23 2011
@@ -38,6 +38,7 @@ import javax.swing.table.TableColumn;
 import org.apache.airavata.commons.gfac.type.DataType;
 import org.apache.airavata.commons.gfac.type.Parameter;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
+import org.apache.airavata.commons.gfac.type.parameter.ParameterFactory;
 import org.apache.airavata.xbaya.XBayaEngine;
 import org.apache.airavata.xbaya.component.registry.JCRComponentRegistry;
 
@@ -290,7 +291,7 @@ public class ServiceDescriptionDialog ex
 	}
 
 	private DataType[] getDataTypes() {
-		return DataType.values();
+		return ParameterFactory.getInstance().listDataTypes().toArray(new DataType[]{});
 	}
 
 	public boolean isServiceCreated() {



Mime
View raw message