You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by pa...@apache.org on 2011/10/26 01:22:22 UTC

svn commit: r1188967 - in /incubator/airavata/trunk/modules: commons/gfac-schema/schemas/ commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/app/ commons/gfac...

Author: patanachai
Date: Tue Oct 25 23:22:21 2011
New Revision: 1188967

URL: http://svn.apache.org/viewvc?rev=1188967&view=rev
Log:
AIRAVATA-171 initial version

Removed:
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/app/
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/host/
Modified:
    incubator/airavata/trunk/modules/commons/gfac-schema/schemas/ApplicationDescription.xsd
    incubator/airavata/trunk/modules/commons/gfac-schema/schemas/HostDescription.xsd
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ApplicationDeploymentDescription.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/HostDescription.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ServiceDescription.java
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java
    incubator/airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistryTest.java
    incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.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/provider/impl/GramProvider.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/LocalProvider.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/SSHProvider.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/scheduler/impl/SchedulerImpl.java
    incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/schemas/ApplicationDescription.xsd
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/schemas/ApplicationDescription.xsd?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/schemas/ApplicationDescription.xsd (original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/schemas/ApplicationDescription.xsd Tue Oct 25 23:22:21 2011
@@ -13,9 +13,7 @@
     xmlns:gfac="http://schemas.airavata.apache.org/gfac/type" xmlns="http://www.w3.org/2001/XMLSchema"
     elementFormDefault="qualified">
        
-    <element name="shellApplicationDeployment" type="gfac:shellApplicationDeploymentType"/>
     <element name="applicationDeploymentDescription" type="gfac:applicationDeploymentDescriptionType"/>
-    <element name="gramApplicationDeployment" type="gfac:gramApplicationDeploymentType"/>
     
     <complexType name="gramApplicationDeploymentType">
         <complexContent>

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/schemas/HostDescription.xsd
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/schemas/HostDescription.xsd?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/schemas/HostDescription.xsd (original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/schemas/HostDescription.xsd Tue Oct 25 23:22:21 2011
@@ -13,7 +13,6 @@
     xmlns:gfac="http://schemas.airavata.apache.org/gfac/type" xmlns="http://www.w3.org/2001/XMLSchema"
     elementFormDefault="qualified">
 
-        <element name="globusHost" type="gfac:globusHostType" />
         <element name="hostDescription" type="gfac:hostDescriptionType" />
         
         <!-- Globus Host Description -->

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ApplicationDeploymentDescription.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ApplicationDeploymentDescription.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ApplicationDeploymentDescription.java (original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ApplicationDeploymentDescription.java Tue Oct 25 23:22:21 2011
@@ -21,59 +21,36 @@
 
 package org.apache.airavata.commons.gfac.type;
 
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionDocument;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+import org.apache.xmlbeans.SchemaType;
+import org.apache.xmlbeans.XmlException;
 
 public class ApplicationDeploymentDescription implements Type {
 
-	private ApplicationDeploymentDescriptionType appDeploymentDescType;
+	private ApplicationDeploymentDescriptionDocument appDocument;
 
 	public ApplicationDeploymentDescription() {
-		this.appDeploymentDescType = ApplicationDeploymentDescriptionType.Factory
-				.newInstance();
+		this.appDocument = ApplicationDeploymentDescriptionDocument.Factory.newInstance();
+		this.appDocument.addNewApplicationDeploymentDescription();
 	}
 
-	public ApplicationDeploymentDescription(
-			ApplicationDeploymentDescriptionType addt) {
-		this.appDeploymentDescType = addt;
-	}
-
-	public String getId() {
-		return appDeploymentDescType.getName();
-	}
-
-	public void setId(String id) {
-		this.appDeploymentDescType.setName(id);
-	}
-
-	public String getTmpDir() {
-		return appDeploymentDescType.getTmpDir();
-	}
-
-	public void setTmpDir(String tmpDir) {
-		this.appDeploymentDescType.setTmpDir(tmpDir);
-	}
-
-	public String getWorkingDir() {
-		return appDeploymentDescType.getWorkingDir();
-	}
-
-	public void setWorkingDir(String workingDir) {
-		this.appDeploymentDescType.setWorkingDir(workingDir);
-	}
-
-	public String getInputDir() {
-		return appDeploymentDescType.getInputDir();
-	}
-
-	public void setInputDir(String inputDir) {
-		this.appDeploymentDescType.setInputDir(inputDir);
-	}
-
-	public String getOutputDir() {
-		return appDeploymentDescType.getOutputDir();
-	}
-
-	public void setOutputDir(String outputDir) {
-		this.appDeploymentDescType.setOutputDir(outputDir);
+	public ApplicationDeploymentDescription(SchemaType type){
+		this();
+		this.appDocument.getApplicationDeploymentDescription().changeType(type);
+	}
+	
+	public ApplicationDeploymentDescriptionType getType(){
+		return this.appDocument.getApplicationDeploymentDescription();
+	}
+	
+	public String toXML(){
+		return appDocument.xmlText();
+	}
+	
+	public static ApplicationDeploymentDescription fromXML(String xml) throws XmlException{
+		ApplicationDeploymentDescription app = new ApplicationDeploymentDescription();
+		app.appDocument = ApplicationDeploymentDescriptionDocument.Factory.parse(xml);
+		return app;
 	}
 }

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/HostDescription.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/HostDescription.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/HostDescription.java (original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/HostDescription.java Tue Oct 25 23:22:21 2011
@@ -21,34 +21,36 @@
 
 package org.apache.airavata.commons.gfac.type;
 
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+import org.apache.airavata.schemas.gfac.HostDescriptionDocument;
 import org.apache.airavata.schemas.gfac.HostDescriptionType;
+import org.apache.xmlbeans.SchemaType;
+import org.apache.xmlbeans.XmlException;
 
 public class HostDescription implements Type {
 
-    private HostDescriptionType hostDescriptionType;
+	private HostDescriptionDocument hostDocument;
 
-    public HostDescription() {
-        this.hostDescriptionType = HostDescriptionType.Factory.newInstance();
-    }
-
-    public HostDescription(HostDescriptionType hdt) {
-        this.hostDescriptionType = hdt;
-    }
-
-    public String getId() {
-        return hostDescriptionType.getName();
-    }
-
-    public void setId(String id) {
-        this.hostDescriptionType.setName(id);
-    }
-
-    public String getAddress() {
-        return hostDescriptionType.getAddress();
-    }
-
-    public void setAddress(String address) {
-        this.hostDescriptionType.setAddress(address);
-    }
+	public HostDescription() {
+		this.hostDocument = HostDescriptionDocument.Factory.newInstance();
+		this.hostDocument.addNewHostDescription();
+	}
+	
+	public HostDescription(SchemaType type) {
+		this();
+		this.hostDocument.getHostDescription().changeType(type);
+	}
+
+	public HostDescriptionType getType(){
+		return this.hostDocument.getHostDescription();
+	}
+	
+	public String toXML(){
+		return hostDocument.xmlText();
+	}
+	
+	public static HostDescription fromXML(String xml) throws XmlException{
+		HostDescription host = new HostDescription();
+		host.hostDocument = HostDescriptionDocument.Factory.parse(xml);
+		return host;
+	}
 }
\ No newline at end of file

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ServiceDescription.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ServiceDescription.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ServiceDescription.java (original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ServiceDescription.java Tue Oct 25 23:22:21 2011
@@ -21,67 +21,30 @@
 
 package org.apache.airavata.commons.gfac.type;
 
+import org.apache.airavata.schemas.gfac.ServiceDescriptionDocument;
 import org.apache.airavata.schemas.gfac.ServiceDescriptionType;
+import org.apache.xmlbeans.XmlException;
 
 public class ServiceDescription implements Type {
 
-    private ServiceDescriptionType serviceDescriptionType;
+	private ServiceDescriptionDocument serviceDocument;
 
-    public ServiceDescription() {
-        this.serviceDescriptionType = ServiceDescriptionType.Factory.newInstance();
-    }
-
-    public ServiceDescription(ServiceDescriptionType sdt) {
-        this.serviceDescriptionType = sdt;
-    }
-
-    public String getId() {
-        return serviceDescriptionType.getName();
-    }
-
-    public void setId(String id) {
-        this.serviceDescriptionType.setName(id);
-    }
-
-    public ServiceDescriptionType getServiceDescriptionType() {
-        return serviceDescriptionType;
-    }
-
-    public Parameter[] getInputParameters() {    	
-    	int length = this.serviceDescriptionType.getInputParametersArray().length;
-    	Parameter[] result = new Parameter[length];
-    	for (int i = 0; i < length; i++) {
-    		result[i] = new Parameter(this.serviceDescriptionType.getInputParametersArray(i));			
-		}
-        return result; 
-    }
-
-    public void setInputParameters(Parameter[] inputParameters) {
-    	int length = inputParameters.length;
-    	org.apache.airavata.schemas.gfac.Parameter[] result = new org.apache.airavata.schemas.gfac.Parameter[length];
-    	for (int i = 0; i < length; i++) {
-    		result[i] = inputParameters[i].getParameterType();			
-		}
-    	
-        this.serviceDescriptionType.setInputParametersArray(result);
-    }
-
-    public Parameter[] getOutputParameters() {
-    	int length = this.serviceDescriptionType.getOutputParametersArray().length;
-    	Parameter[] result = new Parameter[length];
-    	for (int i = 0; i < length; i++) {
-    		result[i] = new Parameter(this.serviceDescriptionType.getOutputParametersArray(i));			
-		}    	
-        return result;
-    }
-
-    public void setOutputParameters(Parameter[] outputParameters) {
-    	int length = outputParameters.length;
-    	org.apache.airavata.schemas.gfac.Parameter[] result = new org.apache.airavata.schemas.gfac.Parameter[length];
-    	for (int i = 0; i < length; i++) {
-    		result[i] = outputParameters[i].getParameterType();			
-		}
-    	
-        this.serviceDescriptionType.setInputParametersArray(result);
-    }
+	public ServiceDescription() {
+		this.serviceDocument = ServiceDescriptionDocument.Factory.newInstance();
+		this.serviceDocument.addNewServiceDescription();
+	}
+
+	public ServiceDescriptionType getType(){
+		return this.serviceDocument.getServiceDescription();
+	}
+	
+	public String toXML(){
+		return serviceDocument.xmlText();
+	}
+	
+	public static ServiceDescription fromXML(String xml) throws XmlException{
+		ServiceDescription service = new ServiceDescription();
+		service.serviceDocument = ServiceDescriptionDocument.Factory.parse(xml);
+		return service;
+	}
 }

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java Tue Oct 25 23:22:21 2011
@@ -176,8 +176,7 @@ public class JCRRegistry extends Observa
 				for (Value val : vals) {
 					Node host = session.getNodeByIdentifier(val.getString());
 					Property hostProp = host.getProperty(XML_PROPERTY_NAME);
-					result.add((HostDescription)SchemaUtil.parseFromXML(hostProp
-							.getString()));
+					result.add(HostDescription.fromXML(hostProp.getString()));
 				}
 			}
 		} catch (Exception e) {
@@ -217,7 +216,7 @@ public class JCRRegistry extends Observa
 			Node serviceNode = getServiceNode(session);
 			Node node = serviceNode.getNode(serviceId);
 			Property prop = node.getProperty(XML_PROPERTY_NAME);
-			result = (ServiceDescription)SchemaUtil.parseFromXML(prop.getString());
+			result = ServiceDescription.fromXML(prop.getString());
 		} catch (Exception e) {
 			throw new ServiceDescriptionRetrieveException(e);
 		} finally {
@@ -239,7 +238,7 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node app = nodes.nextNode();
 				Property prop = app.getProperty(XML_PROPERTY_NAME);
-				result = (ApplicationDeploymentDescription)SchemaUtil.parseFromXML(prop.getString());
+				result = ApplicationDeploymentDescription.fromXML(prop.getString());
 			}
 		} catch (Exception e) {
 			log.error("Cannot get Deployment Description", e);
@@ -291,7 +290,7 @@ public class JCRRegistry extends Observa
 		HostDescription result;
 		try {			
 			Property prop = node.getProperty(XML_PROPERTY_NAME);
-			result = (HostDescription)SchemaUtil.parseFromXML(prop.getString());
+			result = HostDescription.fromXML(prop.getString());
 		} catch (Exception e) {
 			throw new HostDescriptionRetrieveException(e);
 		}
@@ -304,8 +303,8 @@ public class JCRRegistry extends Observa
 		try {
 			session = getSession();
 			Node hostNode = getHostNode(session);
-			Node node = getOrAddNode(hostNode, host.getId());
-			node.setProperty(XML_PROPERTY_NAME, SchemaUtil.toXML(host));
+			Node node = getOrAddNode(hostNode, host.getType().getName());
+			node.setProperty(XML_PROPERTY_NAME, host.toXML());
 			session.save();
 
 			result = node.getIdentifier();
@@ -326,8 +325,8 @@ public class JCRRegistry extends Observa
 		try {
 			session = getSession();
 			Node serviceNode = getServiceNode(session);
-			Node node = getOrAddNode(serviceNode, service.getId());
-			node.setProperty(XML_PROPERTY_NAME, SchemaUtil.toXML(service));
+			Node node = getOrAddNode(serviceNode, service.getType().getName());
+			node.setProperty(XML_PROPERTY_NAME, service.toXML());
 			session.save();
 
 			result = node.getIdentifier();
@@ -351,8 +350,8 @@ public class JCRRegistry extends Observa
 			Node deployNode = getDeploymentNode(session);
 			Node serviceNode = getOrAddNode(deployNode, serviceId);
 			Node hostNode = getOrAddNode(serviceNode, hostId);
-			Node appName = getOrAddNode(hostNode, app.getId());
-			appName.setProperty(XML_PROPERTY_NAME, SchemaUtil.toXML(app));
+			Node appName = getOrAddNode(hostNode, app.getType().getName());
+			appName.setProperty(XML_PROPERTY_NAME, app.toXML());
 			session.save();
 
 			result = appName.getIdentifier();
@@ -419,7 +418,7 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node service = nodes.nextNode();
 				Property prop = service.getProperty(XML_PROPERTY_NAME);
-				result.add((ServiceDescription)SchemaUtil.parseFromXML(prop.getString()));
+				result.add(ServiceDescription.fromXML(prop.getString()));
 			}
 		} catch (Exception e) {
 			new ServiceDescriptionRetrieveException(e);
@@ -471,7 +470,7 @@ public class JCRRegistry extends Observa
 					for (; nodes.hasNext();) {
 						Node app = nodes.nextNode();
 						Property prop = app.getProperty(XML_PROPERTY_NAME);
-						result.put((ApplicationDeploymentDescription)SchemaUtil.parseFromXML(prop.getString()), serviceNode.getName()
+						result.put(ApplicationDeploymentDescription.fromXML(prop.getString()), serviceNode.getName()
 								+ "$" + hostNode.getName());
 					}
 				}
@@ -497,8 +496,8 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node app = nodes.nextNode();
 				Property prop = app.getProperty(XML_PROPERTY_NAME);
-				ApplicationDeploymentDescription appDesc = (ApplicationDeploymentDescription)SchemaUtil.parseFromXML(prop.getString());
-				if (appDesc.getId().matches(applicationName)) {
+				ApplicationDeploymentDescription appDesc = ApplicationDeploymentDescription.fromXML(prop.getString());
+				if (appDesc.getType().getName().matches(applicationName)) {
 					app.remove();
 				}
 			}
@@ -524,8 +523,8 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node app = nodes.nextNode();
 				Property prop = app.getProperty(XML_PROPERTY_NAME);
-				ApplicationDeploymentDescription appDesc = (ApplicationDeploymentDescription)SchemaUtil.parseFromXML(prop.getString());
-				if (appDesc.getId().matches(applicationName)) {
+				ApplicationDeploymentDescription appDesc = ApplicationDeploymentDescription.fromXML(prop.getString());
+				if (appDesc.getType().getName().matches(applicationName)) {
 					result.add(appDesc);
 				}
 			}
@@ -550,7 +549,7 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node app = nodes.nextNode();
 				Property prop = app.getProperty(XML_PROPERTY_NAME);
-				result.add((ApplicationDeploymentDescription)SchemaUtil.parseFromXML(prop.getString()));
+				result.add(ApplicationDeploymentDescription.fromXML(prop.getString()));
 			}
 		} catch (Exception e) {
 			throw new DeploymentDescriptionRetrieveException(e);

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=1188967&r1=1188966&r2=1188967&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 Tue Oct 25 23:22:21 2011
@@ -10,19 +10,19 @@ public class WebServiceUtil {
         StringBuilder builder = new StringBuilder();
         builder.append("<wsdl:definitions xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:ns1=\"http://org.apache.axis2/xsd\" xmlns:ns=\"http://www.wso2.org/types\" xmlns:wsaw=\"http://www.w3.org/2006/05/addressing/wsdl\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\" xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\" targetNamespace=\"http://www.wso2.org/types\">");
         builder.append("<wsdl:documentation>");
-        builder.append(service.getId());
+        builder.append(service.getType().getName());
         builder.append("</wsdl:documentation>");
         builder.append("<wsdl:types>");
         builder.append("<xs:schema attributeFormDefault=\"qualified\" elementFormDefault=\"unqualified\" targetNamespace=\"http://www.wso2.org/types\">");
 
-        boolean isInputParametersPresent = service.getInputParameters() != null
-                && service.getInputParameters().length > 0;
+        boolean isInputParametersPresent = service.getType().getInputParametersArray() != null
+                && service.getType().getInputParametersArray().length > 0;
         if (isInputParametersPresent) {
             builder.append("<xs:element name=\"invoke\">");
             builder.append("<xs:complexType>");
             builder.append("<xs:sequence>");
 
-            ServiceDescriptionType p = service.getServiceDescriptionType();
+            ServiceDescriptionType p = service.getType();
 
             for (int i = 0; i < p.getInputParametersArray().length; i++) {
                 generateElementFromType(p.getInputParametersArray(i), builder);
@@ -33,14 +33,14 @@ public class WebServiceUtil {
             builder.append("</xs:element>");
         }
 
-        boolean isOutputParametersPresent = service.getOutputParameters() != null
-                && service.getOutputParameters().length > 0;
+        boolean isOutputParametersPresent = service.getType().getOutputParametersArray() != null
+                && service.getType().getOutputParametersArray().length > 0;
         if (isOutputParametersPresent) {
             builder.append("<xs:element name=\"invokeResponse\">");
             builder.append("<xs:complexType>");
             builder.append("<xs:sequence>");
 
-            ServiceDescriptionType p = service.getServiceDescriptionType();
+            ServiceDescriptionType p = service.getType();
 
             for (int i = 0; i < p.getOutputParametersArray().length; i++) {
                 generateElementFromType(p.getOutputParametersArray(i), builder);
@@ -66,7 +66,7 @@ public class WebServiceUtil {
         }
 
         builder.append("<wsdl:portType name=\"");
-        builder.append(service.getId());
+        builder.append(service.getType().getName());
         builder.append("\">");
         builder.append("<wsdl:operation name=\"invoke\">");
         builder.append("<wsdl:input message=\"ns:invokeRequest\" wsaw:Action=\"urn:invoke\"/>");

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistryTest.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistryTest.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistryTest.java (original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistryTest.java Tue Oct 25 23:22:21 2011
@@ -26,11 +26,10 @@ import static org.junit.Assert.fail;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.airavata.commons.gfac.type.DataType;
 import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.Parameter;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.commons.gfac.type.host.GlobusHost;
+import org.apache.airavata.schemas.gfac.GlobusHostType;
+import org.apache.airavata.schemas.gfac.Parameter;
 import org.junit.Test;
 
 public class JCRRegistryTest {
@@ -53,33 +52,35 @@ public class JCRRegistryTest {
              * Host
              */
             HostDescription host = new HostDescription();
-            host.setId(hostId);
-            host.setAddress(address);
+            host.getType().setName(hostId);
+            host.getType().setAddress(address);
 
             jcrRegistry.saveHostDescription(host);
 
             HostDescription hostR = jcrRegistry.getHostDescription(hostId);
 
-            if (!(hostR.getId().equals(hostId) && hostR.getAddress().equals(address))) {
+            if (!(hostR.getType().getName().equals(hostId) && hostR.getType().getAddress().equals(address))) {
                 fail("Save and Load Host Description Fail with Different Value");
             }
             
             /*
              * Test for polymorphism
              */
-            GlobusHost globus = new GlobusHost();
-            globus.setId(hostId2);
-            globus.setAddress(address);
+            HostDescription globus = new HostDescription(GlobusHostType.type);
+            globus.getType().setName(hostId2);
+            globus.getType().setAddress(address);
+            
+            ((GlobusHostType)globus.getType()).setGridFTPEndPoint("xxxxxxx");
 
             jcrRegistry.saveHostDescription(globus);
 
             HostDescription hg = jcrRegistry.getHostDescription(hostId2);
 
-            if (!(hg.getId().equals(hostId2) && hg.getAddress().equals(address))) {
+            if (!(hg.getType().getName().equals(hostId2) && hg.getType().getAddress().equals(address))) {
                 fail("Save and Load Host Description Fail with Different Value");
             }
             
-            if(!(hg instanceof GlobusHost))
+            if(!(hg.getType() instanceof GlobusHostType))
                 fail("Save and Load Host Type Fail with Different Type when loading");
 
         } catch (Exception e) {
@@ -98,25 +99,25 @@ public class JCRRegistryTest {
             String serviceId = "SimpleEcho";            
             
             ServiceDescription serv = new ServiceDescription();
-            serv.setId(serviceId);
+            serv.getType().setName(serviceId);
 
-            Parameter input = new Parameter();
+            Parameter input = Parameter.Factory.newInstance();
     		input.setName("echo_input");
-    		input.setType(new DataType());
+    		input.addNewType();
     		List<Parameter> inputList = new ArrayList<Parameter>();
     		inputList.add(input);
     		Parameter[] inputParamList = inputList.toArray(new Parameter[inputList
     				.size()]);
 
-    		Parameter output = new Parameter();
+    		Parameter output = Parameter.Factory.newInstance();
     		output.setName("echo_output");
-    		input.setType(new DataType());
+    		output.addNewType();
     		List<Parameter> outputList = new ArrayList<Parameter>();
     		outputList.add(output);
     		Parameter[] outputParamList = outputList
     				.toArray(new Parameter[outputList.size()]);
-    		serv.setInputParameters(inputParamList);
-    		serv.setOutputParameters(outputParamList);
+    		serv.getType().setInputParametersArray(inputParamList);
+    		serv.getType().setOutputParametersArray(outputParamList);
 
             /*
              * Save to registry
@@ -132,11 +133,11 @@ public class JCRRegistryTest {
                 fail("Service is null");
             }
             
-            if(service.getInputParameters() == null || service.getInputParameters().length != 1){
+            if(service.getType().getInputParametersArray() == null || service.getType().getInputParametersArray().length != 1){
                 fail("Input Parameters is missing");
             }
             
-            if(service.getOutputParameters()== null || service.getOutputParameters().length != 1){
+            if(service.getType().getOutputParametersArray()== null || service.getType().getOutputParametersArray().length != 1){
                 fail("Input Parameters is missing");
             }
             

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=1188967&r1=1188966&r2=1188967&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 Tue Oct 25 23:22:21 2011
@@ -187,7 +187,7 @@ public class GFacMessageReciever impleme
              * Input
              */
             ParameterContextImpl inputParam = new ParameterContextImpl();
-            ServiceDescriptionType serviceDescriptionType = serviceDescription.getServiceDescriptionType();
+            ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
 
             List<org.apache.airavata.schemas.gfac.Parameter> newInputs = null;
             for (int i = 0; i < serviceDescriptionType.getInputParametersArray().length; i++) {

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/extension/data/RegistryDataService.java Tue Oct 25 23:22:21 2011
@@ -28,10 +28,11 @@ import java.util.UUID;
 import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.commons.gfac.type.app.ShellApplicationDeployment;
 import org.apache.airavata.core.gfac.context.invocation.InvocationContext;
 import org.apache.airavata.core.gfac.exception.ExtensionException;
 import org.apache.airavata.core.gfac.extension.DataServiceChain;
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 
 /**
  * This plugin fills out all information that is missing in {@link ApplicationDeploymentDescription} based on Unix
@@ -44,7 +45,7 @@ public class RegistryDataService extends
 
         ServiceDescription serviceDesc = context.getExecutionDescription().getService();
         HostDescription hostDesc = context.getExecutionDescription().getHost();
-        ApplicationDeploymentDescription appDesc = context.getExecutionDescription().getApp();
+        ApplicationDeploymentDescriptionType appDesc = context.getExecutionDescription().getApp().getType();
         if (serviceDesc != null && hostDesc != null && appDesc != null) {
             /*
              * if there is no setting in deployment description, use from host
@@ -61,7 +62,7 @@ public class RegistryDataService extends
                 date = date.replaceAll(" ", "_");
                 date = date.replaceAll(":", "_");
 
-                String tmpDir = appDesc.getTmpDir() + File.separator + appDesc.getId() + "_" + date + "_"
+                String tmpDir = appDesc.getTmpDir() + File.separator + appDesc.getName() + "_" + date + "_"
                         + UUID.randomUUID();
 
                 appDesc.setWorkingDir(tmpDir);
@@ -80,13 +81,13 @@ public class RegistryDataService extends
             /*
              * Stdout and Stderr for Shell
              */
-            if (appDesc.getClass().isAssignableFrom(ShellApplicationDeployment.class)) {
-                ShellApplicationDeployment shell = (ShellApplicationDeployment) appDesc;
+            if (appDesc.getClass().isAssignableFrom(ShellApplicationDeploymentType.class)) {
+            	ShellApplicationDeploymentType shell = (ShellApplicationDeploymentType) appDesc;
                 if (shell.getStdOut() == null) {
-                    shell.setStdOut(appDesc.getWorkingDir() + File.separator + appDesc.getId() + ".stdout");
+                    shell.setStdOut(appDesc.getWorkingDir() + File.separator + appDesc.getName() + ".stdout");
                 }
                 if (shell.getStdErr() == null) {
-                    shell.setStdErr(appDesc.getWorkingDir() + File.separator + appDesc.getId() + ".stderr");
+                    shell.setStdErr(appDesc.getWorkingDir() + File.separator + appDesc.getName() + ".stderr");
                 }
             }
 

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=1188967&r1=1188966&r2=1188967&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 Tue Oct 25 23:22:21 2011
@@ -27,11 +27,6 @@ import java.net.URISyntaxException;
 import java.net.UnknownHostException;
 import java.util.Iterator;
 
-import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
-import org.apache.airavata.commons.gfac.type.DataType;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.app.ShellApplicationDeployment;
-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;
@@ -44,6 +39,10 @@ import org.apache.airavata.core.gfac.exc
 import org.apache.airavata.core.gfac.extension.PostExecuteChain;
 import org.apache.airavata.core.gfac.external.GridFtp;
 import org.apache.airavata.core.gfac.utils.GfacUtils;
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+import org.apache.airavata.schemas.gfac.GlobusHostType;
+import org.apache.airavata.schemas.gfac.HostDescriptionType;
+import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 import org.ietf.jgss.GSSCredential;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -73,7 +72,7 @@ public class GridFtpOutputStaging extend
                          */
                         URI uri = URI.create(fileParameter.toStringVal());
                         if (uri.getScheme().equalsIgnoreCase(GridFtp.GSIFTP_SCHEME)) {
-                            HostDescription hostDescription = context.getExecutionDescription().getHost();
+                            
 
                             /*
                              * src complete URI
@@ -81,12 +80,13 @@ public class GridFtpOutputStaging extend
                             File file = new File(uri.getPath());
                             String srcFilePath = file.getName();
 
-                            ApplicationDeploymentDescription app = context.getExecutionDescription().getApp();
-                            if (app instanceof ShellApplicationDeployment) {
+                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
+                            if (app instanceof ShellApplicationDeploymentType) {
                                 srcFilePath = app.getOutputDir() + File.separator + srcFilePath;
                             }
 
-                            if (hostDescription instanceof GlobusHost) {
+                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
+                            if (hostDescription instanceof GlobusHostType) {
                                 gridFTPTransfer(context, uri, srcFilePath);
                             } else if (GfacUtils.isLocalHost(hostDescription.getAddress())) {
                                 updateFile(context, uri, srcFilePath);
@@ -114,7 +114,7 @@ public class GridFtpOutputStaging extend
         GridFtp ftp = new GridFtp();
         GSSCredential gssCred = ((GSISecurityContext) context.getSecurityContext(MYPROXY_SECURITY_CONTEXT))
                 .getGssCredentails();
-        GlobusHost host = (GlobusHost) context.getExecutionDescription().getHost();
+        GlobusHostType host = (GlobusHostType) context.getExecutionDescription().getHost().getType();
         URI srcURI = GfacUtils.createGsiftpURI(host.getGridFTPEndPoint(), remoteSrcFile);
         ftp.transfer(srcURI, dest, gssCred, true);
     }

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=1188967&r1=1188966&r2=1188967&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 Tue Oct 25 23:22:21 2011
@@ -27,11 +27,6 @@ import java.net.URISyntaxException;
 import java.net.UnknownHostException;
 import java.util.Iterator;
 
-import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
-import org.apache.airavata.commons.gfac.type.DataType;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.app.ShellApplicationDeployment;
-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;
@@ -44,6 +39,10 @@ import org.apache.airavata.core.gfac.exc
 import org.apache.airavata.core.gfac.extension.PreExecuteChain;
 import org.apache.airavata.core.gfac.external.GridFtp;
 import org.apache.airavata.core.gfac.utils.GfacUtils;
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+import org.apache.airavata.schemas.gfac.GlobusHostType;
+import org.apache.airavata.schemas.gfac.HostDescriptionType;
+import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 import org.ietf.jgss.GSSCredential;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -74,20 +73,20 @@ public class GridFtpInputStaging extends
                          */
                         URI uri = URI.create(fileParameter.toStringVal());
                         if (uri.getScheme().equalsIgnoreCase(GridFtp.GSIFTP_SCHEME)) {
-                            HostDescription hostDescription = context.getExecutionDescription().getHost();
-
+                        	
                             /*
                              * Desctination complete URI
                              */
                             File file = new File(uri.getPath());
                             String destFilePath = file.getName();
 
-                            ApplicationDeploymentDescription app = context.getExecutionDescription().getApp();
-                            if (app instanceof ShellApplicationDeployment) {
+                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
+                            if (app instanceof ShellApplicationDeploymentType) {
                                 destFilePath = app.getInputDir() + File.separator + destFilePath;
                             }
 
-                            if (hostDescription instanceof GlobusHost) {
+                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
+                            if (hostDescription instanceof GlobusHostType) {
                                 gridFTPTransfer(context, uri, destFilePath);
                             } else if (GfacUtils.isLocalHost(hostDescription.getAddress())) {
                                 downloadFile(context, uri, destFilePath);
@@ -121,7 +120,7 @@ public class GridFtpInputStaging extends
         GridFtp ftp = new GridFtp();
         GSSCredential gssCred = ((GSISecurityContext) context.getSecurityContext(MYPROXY_SECURITY_CONTEXT))
                 .getGssCredentails();
-        GlobusHost host = (GlobusHost) context.getExecutionDescription().getHost();
+        GlobusHostType host = (GlobusHostType) context.getExecutionDescription().getHost().getType();
         URI inputURI = GfacUtils.createGsiftpURI(host.getGridFTPEndPoint(), remoteFile);
         ftp.transfer(src, inputURI, gssCred, true);
     }

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=1188967&r1=1188966&r2=1188967&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 Tue Oct 25 23:22:21 2011
@@ -31,11 +31,6 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Iterator;
 
-import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
-import org.apache.airavata.commons.gfac.type.DataType;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.app.ShellApplicationDeployment;
-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;
@@ -48,6 +43,10 @@ import org.apache.airavata.core.gfac.exc
 import org.apache.airavata.core.gfac.extension.PreExecuteChain;
 import org.apache.airavata.core.gfac.external.GridFtp;
 import org.apache.airavata.core.gfac.utils.GfacUtils;
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+import org.apache.airavata.schemas.gfac.GlobusHostType;
+import org.apache.airavata.schemas.gfac.HostDescriptionType;
+import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 import org.ietf.jgss.GSSCredential;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -77,21 +76,20 @@ public class HttpInputStaging extends Pr
                          * Determine scheme
                          */
                         URI uri = URI.create(fileParameter.toStringVal());
-                        if (uri.getScheme().equalsIgnoreCase("http")) {
-                            HostDescription hostDescription = context.getExecutionDescription().getHost();
-
+                        if (uri.getScheme().equalsIgnoreCase("http")) {                            
                             /*
                              * Desctination complete URI
                              */
                             File file = new File(uri.getPath());
                             String destFilePath = file.getName();
 
-                            ApplicationDeploymentDescription app = context.getExecutionDescription().getApp();
-                            if (app instanceof ShellApplicationDeployment) {
+                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
+                            if (app instanceof ShellApplicationDeploymentType) {
                                 destFilePath = app.getInputDir() + File.separator + destFilePath;
                             }
 
-                            if (hostDescription instanceof GlobusHost) {
+                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
+                            if (hostDescription instanceof GlobusHostType) {
                                 uploadToGridFTPFromHttp(context, uri, destFilePath);
                             } else {
                                 downloadFile(context, uri, destFilePath);
@@ -125,7 +123,7 @@ public class HttpInputStaging extends Pr
         GSSCredential gssCred = ((GSISecurityContext) context.getSecurityContext(MYPROXY_SECURITY_CONTEXT))
                 .getGssCredentails();
 
-        GlobusHost host = (GlobusHost) context.getExecutionDescription().getHost();
+        GlobusHostType host = (GlobusHostType) context.getExecutionDescription().getHost().getType();
         URI destURI = GfacUtils.createGsiftpURI(host.getGridFTPEndPoint(), remoteLocation);
 
         InputStream in = null;

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java Tue Oct 25 23:22:21 2011
@@ -27,8 +27,6 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Map;
 
-import org.apache.airavata.commons.gfac.type.app.ShellApplicationDeployment;
-import org.apache.airavata.commons.gfac.type.host.GlobusHost;
 import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
 import org.apache.airavata.core.gfac.context.invocation.InvocationContext;
 import org.apache.airavata.core.gfac.context.security.impl.GSISecurityContext;
@@ -42,6 +40,8 @@ import org.apache.airavata.core.gfac.pro
 import org.apache.airavata.core.gfac.provider.utils.JobSubmissionListener;
 import org.apache.airavata.core.gfac.utils.GfacUtils;
 import org.apache.airavata.core.gfac.utils.OutputUtils;
+import org.apache.airavata.schemas.gfac.GlobusHostType;
+import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 import org.globus.gram.GramAttributes;
 import org.globus.gram.GramException;
 import org.globus.gram.GramJob;
@@ -60,9 +60,8 @@ public class GramProvider extends Abstra
     private JobSubmissionListener listener;
 
     public void makeDirectory(InvocationContext invocationContext) throws ProviderException {
-        GlobusHost host = (GlobusHost) invocationContext.getExecutionDescription().getHost();
-        ShellApplicationDeployment app = (ShellApplicationDeployment) invocationContext.getExecutionDescription()
-                .getApp();
+    	GlobusHostType host = (GlobusHostType) invocationContext.getExecutionDescription().getHost().getType();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) invocationContext.getExecutionDescription().getApp().getType();
 
         GridFtp ftp = new GridFtp();
 
@@ -99,7 +98,7 @@ public class GramProvider extends Abstra
     }
 
     public void setupEnvironment(InvocationContext invocationContext) throws ProviderException {
-        GlobusHost host = (GlobusHost) invocationContext.getExecutionDescription().getHost();
+    	GlobusHostType host = (GlobusHostType) invocationContext.getExecutionDescription().getHost().getType();
 
         log.info("Searching for Gate Keeper");
         gateKeeper = host.getGlobusGateKeeperEndPoint();
@@ -125,9 +124,9 @@ public class GramProvider extends Abstra
     }
 
     public void executeApplication(InvocationContext invocationContext) throws ProviderException {
-        GlobusHost host = (GlobusHost) invocationContext.getExecutionDescription().getHost();
-        ShellApplicationDeployment app = (ShellApplicationDeployment) invocationContext.getExecutionDescription()
-                .getApp();
+    	GlobusHostType host = (GlobusHostType) invocationContext.getExecutionDescription().getHost().getType();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) invocationContext.getExecutionDescription().getApp().getType();
+    	
         StringBuffer buf = new StringBuffer();
         try {
 
@@ -214,9 +213,9 @@ public class GramProvider extends Abstra
 
     }
 
-    public Map<String, ?> processOutput(InvocationContext context) throws ProviderException {
-        GlobusHost host = (GlobusHost) context.getExecutionDescription().getHost();
-        ShellApplicationDeployment app = (ShellApplicationDeployment) context.getExecutionDescription().getApp();
+    public Map<String, ?> processOutput(InvocationContext invocationContext) throws ProviderException {
+    	GlobusHostType host = (GlobusHostType) invocationContext.getExecutionDescription().getHost().getType();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) invocationContext.getExecutionDescription().getApp().getType();
         GridFtp ftp = new GridFtp();
         try {
             GSSCredential gssCred = gssContext.getGssCredentails();
@@ -242,14 +241,14 @@ public class GramProvider extends Abstra
             }
 
             // Get the Stdouts and StdErrs
-            String timeStampedServiceName = GfacUtils.createUniqueNameForService(context.getServiceName());
+            String timeStampedServiceName = GfacUtils.createUniqueNameForService(invocationContext.getServiceName());
             File localStdOutFile = File.createTempFile(timeStampedServiceName, "stdout");
             File localStdErrFile = File.createTempFile(timeStampedServiceName, "stderr");
 
             String stdout = ftp.readRemoteFile(stdoutURI, gssCred, localStdOutFile);
             String stderr = ftp.readRemoteFile(stderrURI, gssCred, localStdErrFile);
 
-            return OutputUtils.fillOutputFromStdout(context.<AbstractParameter> getOutput(), stdout);
+            return OutputUtils.fillOutputFromStdout(invocationContext.<AbstractParameter> getOutput(), stdout);
 
         } catch (URISyntaxException e) {
             throw new ProviderException("URI is malformatted:" + e.getMessage(), e);

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/LocalProvider.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/LocalProvider.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/LocalProvider.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/LocalProvider.java Tue Oct 25 23:22:21 2011
@@ -21,8 +21,19 @@
 
 package org.apache.airavata.core.gfac.provider.impl;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
-import org.apache.airavata.commons.gfac.type.app.ShellApplicationDeployment;
 import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
 import org.apache.airavata.core.gfac.context.invocation.InvocationContext;
 import org.apache.airavata.core.gfac.exception.ProviderException;
@@ -31,14 +42,9 @@ import org.apache.airavata.core.gfac.uti
 import org.apache.airavata.core.gfac.utils.GfacUtils;
 import org.apache.airavata.core.gfac.utils.InputUtils;
 import org.apache.airavata.core.gfac.utils.OutputUtils;
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 /**
  * {@link LocalProvider} will execute jobs (application) on local machine.
  * 
@@ -96,7 +102,7 @@ public class LocalProvider extends Abstr
     }
 
     public void makeDirectory(InvocationContext invocationContext) throws ProviderException {
-        ApplicationDeploymentDescription app = invocationContext.getExecutionDescription().getApp();
+        ApplicationDeploymentDescriptionType app = invocationContext.getExecutionDescription().getApp().getType();
 
         log.info("working diectroy = " + app.getWorkingDir());
         log.info("temp directory = " + app.getTmpDir());
@@ -108,7 +114,7 @@ public class LocalProvider extends Abstr
     }
 
     public void setupEnvironment(InvocationContext context) throws ProviderException {
-        ShellApplicationDeployment app = (ShellApplicationDeployment) context.getExecutionDescription().getApp();
+        ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) context.getExecutionDescription().getApp().getType();
 
         // input parameter
         ArrayList<String> tmp = new ArrayList<String>();
@@ -158,7 +164,7 @@ public class LocalProvider extends Abstr
     }
 
     public void executeApplication(InvocationContext context) throws ProviderException {
-        ShellApplicationDeployment app = (ShellApplicationDeployment) context.getExecutionDescription().getApp();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) context.getExecutionDescription().getApp().getType();
 
         try {
             // running cmd
@@ -207,7 +213,7 @@ public class LocalProvider extends Abstr
 
     public Map<String, ?> processOutput(InvocationContext context) throws ProviderException {
 
-        ShellApplicationDeployment app = (ShellApplicationDeployment) context.getExecutionDescription().getApp();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) context.getExecutionDescription().getApp().getType();
 
         try {
             String stdOutStr = GfacUtils.readFileToString(app.getStdOut());

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/SSHProvider.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/SSHProvider.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/SSHProvider.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/SSHProvider.java Tue Oct 25 23:22:21 2011
@@ -21,6 +21,15 @@
 
 package org.apache.airavata.core.gfac.provider.impl;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
+
 import net.schmizz.sshj.SSHClient;
 import net.schmizz.sshj.connection.ConnectionException;
 import net.schmizz.sshj.connection.channel.direct.Session;
@@ -28,7 +37,7 @@ import net.schmizz.sshj.connection.chann
 import net.schmizz.sshj.transport.TransportException;
 import net.schmizz.sshj.userauth.keyprovider.KeyProvider;
 import net.schmizz.sshj.xfer.scp.SCPFileTransfer;
-import org.apache.airavata.commons.gfac.type.app.ShellApplicationDeployment;
+
 import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
 import org.apache.airavata.core.gfac.context.invocation.InvocationContext;
 import org.apache.airavata.core.gfac.context.security.impl.SSHSecurityContextImpl;
@@ -41,15 +50,6 @@ import org.apache.airavata.core.gfac.uti
 import org.apache.airavata.core.gfac.utils.OutputUtils;
 import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.TimeUnit;
-
 /**
  * Execute application using remote SSH
  */
@@ -84,7 +84,7 @@ public class SSHProvider extends Abstrac
             ssh.loadKnownHosts();
             ssh.authPublickey(sshContext.getUsername(), pkey);
 
-            ssh.connect(context.getExecutionDescription().getHost().getAddress());
+            ssh.connect(context.getExecutionDescription().getHost().getType().getAddress());
             return ssh.startSession();
 
         } catch (NullPointerException ne) {
@@ -103,7 +103,7 @@ public class SSHProvider extends Abstrac
     }
 
     public void makeDirectory(InvocationContext context) throws ProviderException {
-        ShellApplicationDeployment app = (ShellApplicationDeployment) context.getExecutionDescription().getApp();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) context.getExecutionDescription().getApp().getType();
 
         Session session = null;
         try {
@@ -137,7 +137,7 @@ public class SSHProvider extends Abstrac
     }
 
     public void setupEnvironment(InvocationContext context) throws ProviderException {
-        ShellApplicationDeployment app = (ShellApplicationDeployment) context.getExecutionDescription().getApp();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) context.getExecutionDescription().getApp().getType();
 
         // input parameter
         ArrayList<String> tmp = new ArrayList<String>();
@@ -166,7 +166,7 @@ public class SSHProvider extends Abstrac
     }
 
     public void executeApplication(InvocationContext context) throws ProviderException {
-        ShellApplicationDeployment app = (ShellApplicationDeployment) context.getExecutionDescription().getApp();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) context.getExecutionDescription().getApp().getType();
 
         Session session = null;
         try {
@@ -229,7 +229,7 @@ public class SSHProvider extends Abstrac
     }
 
     public Map<String, ?> processOutput(InvocationContext context) throws ProviderException {
-        ShellApplicationDeployment app = (ShellApplicationDeployment) context.getExecutionDescription().getApp();
+    	ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) context.getExecutionDescription().getApp().getType();
         try {
 
             // Get the Stdouts and StdErrs

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/utils/GramRSLGenerator.java Tue Oct 25 23:22:21 2011
@@ -21,19 +21,19 @@
 
 package org.apache.airavata.core.gfac.provider.utils;
 
-import org.apache.airavata.commons.gfac.type.app.GramApplicationDeployment;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
 import org.apache.airavata.core.gfac.context.invocation.InvocationContext;
 import org.apache.airavata.core.gfac.exception.ToolsException;
 import org.apache.airavata.core.gfac.utils.GFacConstants;
+import org.apache.airavata.schemas.gfac.GramApplicationDeploymentType;
 import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 import org.globus.gram.GramAttributes;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
 /**
  * Utilities for generating GRAM RSL
  */
@@ -45,7 +45,7 @@ public class GramRSLGenerator {
     };
 
     public static GramAttributes configureRemoteJob(InvocationContext context) throws ToolsException {
-        GramApplicationDeployment app = (GramApplicationDeployment) context.getExecutionDescription().getApp();
+        GramApplicationDeploymentType app = (GramApplicationDeploymentType) context.getExecutionDescription().getApp().getType();
 
         GramAttributes jobAttr = new GramAttributes();
         jobAttr.setExecutable(app.getExecutable());

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/scheduler/impl/SchedulerImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/scheduler/impl/SchedulerImpl.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/scheduler/impl/SchedulerImpl.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/scheduler/impl/SchedulerImpl.java Tue Oct 25 23:22:21 2011
@@ -80,7 +80,7 @@ public class SchedulerImpl implements Sc
          */
         ApplicationDeploymentDescription app = null;
         try {
-            app = registryService.getDeploymentDescription(context.getServiceName(), host.getId());
+            app = registryService.getDeploymentDescription(context.getServiceName(), host.getType().getName());
         } catch (RegistryException e2) {
             e2.printStackTrace();
         }
@@ -103,7 +103,7 @@ public class SchedulerImpl implements Sc
         /*
          * Determine provider
          */
-        String hostName = host.getAddress();
+        String hostName = host.getType().getAddress();
         try {
             if (GfacUtils.isLocalHost(hostName)) {
                 return new LocalProvider();
@@ -125,7 +125,7 @@ public class SchedulerImpl implements Sc
             for (Iterator<HostDescription> iterator = hosts.iterator(); iterator.hasNext();) {
                 result = iterator.next();
 
-                log.info("Found service on: " + result.getAddress());
+                log.info("Found service on: " + result.getType().getAddress());
             }
             return result;
         } else {

Modified: incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java?rev=1188967&r1=1188966&r2=1188967&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/PropertiesBasedServiceImplTest.java Tue Oct 25 23:22:21 2011
@@ -21,11 +21,14 @@
 
 package org.apache.airavata.core.gfac.services.impl;
 
-import org.apache.airavata.commons.gfac.type.DataType;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.Parameter;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.commons.gfac.type.app.ShellApplicationDeployment;
 import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
 import org.apache.airavata.commons.gfac.type.parameter.ParameterFactory;
 import org.apache.airavata.core.gfac.context.invocation.impl.DefaultExecutionContext;
@@ -33,16 +36,12 @@ import org.apache.airavata.core.gfac.con
 import org.apache.airavata.core.gfac.context.message.impl.ParameterContextImpl;
 import org.apache.airavata.core.gfac.notification.impl.LoggingNotification;
 import org.apache.airavata.registry.api.impl.JCRRegistry;
+import org.apache.airavata.schemas.gfac.Parameter;
 import org.apache.airavata.schemas.gfac.ShellApplicationDeploymentType;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.fail;
-
 public class PropertiesBasedServiceImplTest {
 	@Before
 	public void setUp() throws Exception {
@@ -57,14 +56,15 @@ public class PropertiesBasedServiceImplT
 		 * Host
 		 */
 		HostDescription host = new HostDescription();
-		host.setId("localhost");
-		host.setAddress("localhost");
+		host.getType().setName("localhost");
+		host.getType().setAddress("localhost");
 
 		/*
 		 * App
 		 */
-		ShellApplicationDeployment app = new ShellApplicationDeployment();
-		app.setId("EchoLocal");
+		ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription(ShellApplicationDeploymentType.type);
+		ShellApplicationDeploymentType app = (ShellApplicationDeploymentType) appDesc.getType();
+		app.setName("EchoLocal");
 		app.setExecutable("/bin/echo");
 		app.setTmpDir("/tmp");
 		app.setWorkingDir("/tmp");
@@ -72,40 +72,39 @@ public class PropertiesBasedServiceImplT
 		app.setOutputDir("/tmp/output");
 		app.setStdOut("/tmp/echo.stdout");
 		app.setStdErr("/tmp/echo.stdout");
-		app.setEnv(ShellApplicationDeploymentType.Factory.newInstance()
-				.getEnv());
+		app.setEnv(app.addNewEnv());
 
 		/*
 		 * Service
 		 */
 		ServiceDescription serv = new ServiceDescription();
-		serv.setId("SimpleEcho");
+		serv.getType().setName("SimpleEcho");
 
-		Parameter input = new Parameter();
+        Parameter input = Parameter.Factory.newInstance();
 		input.setName("echo_input");
-		input.setType(new DataType());
+		input.addNewType();
 		List<Parameter> inputList = new ArrayList<Parameter>();
 		inputList.add(input);
 		Parameter[] inputParamList = inputList.toArray(new Parameter[inputList
 				.size()]);
 
-		Parameter output = new Parameter();
+		Parameter output = Parameter.Factory.newInstance();
 		output.setName("echo_output");
-		input.setType(new DataType());
+		output.addNewType();
 		List<Parameter> outputList = new ArrayList<Parameter>();
 		outputList.add(output);
 		Parameter[] outputParamList = outputList
 				.toArray(new Parameter[outputList.size()]);
-		serv.setInputParameters(inputParamList);
-		serv.setOutputParameters(outputParamList);
+		serv.getType().setInputParametersArray(inputParamList);
+		serv.getType().setOutputParametersArray(outputParamList);
 
 		/*
 		 * Save to registry
 		 */
 		jcrRegistry.saveHostDescription(host);
-		jcrRegistry.saveDeploymentDescription(serv.getId(), host.getId(), app);
+		jcrRegistry.saveDeploymentDescription(serv.getType().getName(), host.getType().getName(), appDesc);
 		jcrRegistry.saveServiceDescription(serv);
-		jcrRegistry.deployServiceOnHost(serv.getId(), host.getId());
+		jcrRegistry.deployServiceOnHost(serv.getType().getName(), host.getType().getName());
 	}
 
 	@Test