airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patanac...@apache.org
Subject svn commit: r1188302 - in /incubator/airavata/trunk/modules/commons: gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ registry-api/src/main/java/org/apache/airavata/registry/api/ registry-api/src/main/java/org/apache/airavata/registry/a...
Date Mon, 24 Oct 2011 19:11:29 GMT
Author: patanachai
Date: Mon Oct 24 19:11:28 2011
New Revision: 1188302

URL: http://svn.apache.org/viewvc?rev=1188302&view=rev
Log:
Airavata-170 fix build error

Modified:
    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/DataType.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/Parameter.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/ServiceDescription.java
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Type.java
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Axis2Registry.java
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/JCRRegistry.java

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=1188302&r1=1188301&r2=1188302&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
Mon Oct 24 19:11:28 2011
@@ -25,53 +25,69 @@ import org.apache.airavata.schemas.gfac.
 
 public class ApplicationDeploymentDescription implements Type {
 
-    private ApplicationDeploymentDescriptionType appDeploymentDescType;
+	private ApplicationDeploymentDescriptionType appDeploymentDescType;
 
-    public ApplicationDeploymentDescription() {
-        this.appDeploymentDescType = ApplicationDeploymentDescriptionType.Factory.newInstance();
-    }
-
-    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() {
+		this.appDeploymentDescType = ApplicationDeploymentDescriptionType.Factory
+				.newInstance();
+	}
+
+	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 String toXml() {
+		return appDeploymentDescType.xmlText();
+	}
+
+	public ApplicationDeploymentDescription fromXml(String xml) {
+		try {
+			this.appDeploymentDescType = ApplicationDeploymentDescriptionType.Factory
+					.parse(xml);
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return this;
+	}
 }

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=1188302&r1=1188301&r2=1188302&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
Mon Oct 24 19:11:28 2011
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.commons.gfac.type;
 
+
 public class DataType implements Type {
 
     private org.apache.airavata.schemas.gfac.DataType.Enum dataType;
@@ -44,4 +45,12 @@ public class DataType implements Type {
     public String toString() {
         return dataType.toString();
     }
+    
+    public String toXml() {
+    	return null;
+    }
+
+	public Type fromXml(String xml) {
+		return null;
+	}
 }
\ No newline at end of file

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=1188302&r1=1188301&r2=1188302&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
Mon Oct 24 19:11:28 2011
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.commons.gfac.type;
 
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.HostDescriptionType;
 
 public class HostDescription implements Type {
@@ -50,5 +51,19 @@ public class HostDescription implements 
     public void setAddress(String address) {
         this.hostDescriptionType.setAddress(address);
     }
+    
+    public String toXml() {
+		return hostDescriptionType.xmlText();
+	}
+
+	public HostDescription fromXml(String xml) {
+		try {
+			this.hostDescriptionType = HostDescriptionType.Factory
+					.parse(xml);
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return this;
+	}
 
 }
\ No newline at end of file

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Parameter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Parameter.java?rev=1188302&r1=1188301&r2=1188302&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Parameter.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Parameter.java
Mon Oct 24 19:11:28 2011
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.commons.gfac.type;
 
+
 public class Parameter implements Type {
     private org.apache.airavata.schemas.gfac.Parameter parameterType;
     private DataType type;
@@ -57,4 +58,18 @@ public class Parameter implements Type {
     public void setType(DataType type) {
         this.type = type;
     }
+
+	public String toXml() {
+		return parameterType.xmlText();
+	}
+
+	public Parameter fromXml(String xml) {
+		try {
+			this.parameterType = org.apache.airavata.schemas.gfac.Parameter.Factory
+					.parse(xml);
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return this;
+	}
 }
\ 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=1188302&r1=1188301&r2=1188302&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
Mon Oct 24 19:11:28 2011
@@ -62,4 +62,18 @@ public class ServiceDescription implemen
     public void setOutputParameters(org.apache.airavata.schemas.gfac.Parameter[] outputParameters)
{
         this.serviceDescriptionType.setOutputParametersArray(outputParameters);
     }
+    
+    public String toXml() {
+		return serviceDescriptionType.xmlText();
+	}
+
+	public ServiceDescription fromXml(String xml) {
+		try {
+			this.serviceDescriptionType = ServiceDescriptionType.Factory
+					.parse(xml);			
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return this;
+	}
 }

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Type.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Type.java?rev=1188302&r1=1188301&r2=1188302&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Type.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/Type.java
Mon Oct 24 19:11:28 2011
@@ -24,4 +24,6 @@ package org.apache.airavata.commons.gfac
 import java.io.Serializable;
 
 public interface Type extends Serializable {
+	String toXml();
+	Type fromXml(String xml);	
 }

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Axis2Registry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Axis2Registry.java?rev=1188302&r1=1188301&r2=1188302&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Axis2Registry.java
(original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Axis2Registry.java
Mon Oct 24 19:11:28 2011
@@ -21,7 +21,7 @@
 
 package org.apache.airavata.registry.api;
 
-import org.apache.airavata.schemas.gfac.ServiceDescriptionDocument;
+import org.apache.airavata.commons.gfac.type.ServiceDescription;
 
 public interface Axis2Registry extends Registry {
 
@@ -31,7 +31,7 @@ public interface Axis2Registry extends R
      * @param service
      * @param WSDL
      */
-    public String saveWSDL(ServiceDescriptionDocument service, String WSDL);
+    public String saveWSDL(ServiceDescription service, String WSDL);
 
     /**
      * Save WSDL for Axis2
@@ -39,7 +39,7 @@ public interface Axis2Registry extends R
      * @param serviceName
      * @param service
      */
-    public String saveWSDL(ServiceDescriptionDocument service);
+    public String saveWSDL(ServiceDescription service);
 
     /**
      * Load WSDL for Axis2

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java?rev=1188302&r1=1188301&r2=1188302&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java
(original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java
Mon Oct 24 19:11:28 2011
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.api
 
 import java.util.List;
 
-import org.apache.airavata.schemas.gfac.Parameter;
+import org.apache.airavata.commons.gfac.type.parameter.AbstractParameter;
 
 public interface DataRegistry {
 
@@ -34,7 +34,7 @@ public interface DataRegistry {
      * @param parameters
      * @return
      */
-    public String saveOutput(String workflowId, List<Parameter> parameters);
+    public String saveOutput(String workflowId, List<AbstractParameter> parameters);
 
     /**
      * Load output from workflow execution.
@@ -42,6 +42,6 @@ public interface DataRegistry {
      * @param workflowId
      * @return List of parameters
      */
-    public List<Parameter> loadOutput(String workflowId);
+    public List<AbstractParameter> loadOutput(String workflowId);
 
 }

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java?rev=1188302&r1=1188301&r2=1188302&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java
(original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/Registry.java
Mon Oct 24 19:11:28 2011
@@ -27,10 +27,10 @@ import java.util.Map;
 
 import javax.xml.namespace.QName;
 
+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.registry.api.exception.RegistryException;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionDocument;
-import org.apache.airavata.schemas.gfac.HostDescriptionDocument;
-import org.apache.airavata.schemas.gfac.ServiceDescriptionDocument;
 
 public interface Registry {
     /**
@@ -39,7 +39,7 @@ public interface Registry {
      * @param serviceId
      * @return List of HostDescription having the service
      */
-    public List<HostDescriptionDocument> getServiceLocation(String serviceId);
+    public List<HostDescription> getServiceLocation(String serviceId);
 
     /**
      * Retrieve a service description i.e. name, description, parameters
@@ -48,7 +48,7 @@ public interface Registry {
      * @return a service description or null if a description is not found
      * @throws ServiceDescriptionRetrieveException
      */
-    public ServiceDescriptionDocument getServiceDescription(String serviceId) throws RegistryException;
+    public ServiceDescription getServiceDescription(String serviceId) throws RegistryException;
 
     /**
      * Retrieve a deployment description for a service from the specific host
@@ -58,7 +58,7 @@ public interface Registry {
      * @return a deployment description or null if a description is not found
      * @throws DeploymentDescriptionRetrieveException
      */
-    public ApplicationDeploymentDescriptionDocument getDeploymentDescription(String serviceId,
String hostId)
+    public ApplicationDeploymentDescription getDeploymentDescription(String serviceId, String
hostId)
             throws RegistryException;
 
     /**
@@ -67,7 +67,7 @@ public interface Registry {
      * @param hostId
      * @return a host description or null if a description is not found
      */
-    public HostDescriptionDocument getHostDescription(String hostId) throws RegistryException;
+    public HostDescription getHostDescription(String hostId) throws RegistryException;
 
     /**
      * Save a host description with the specific name.
@@ -76,7 +76,7 @@ public interface Registry {
      * @param host
      * @return identifier
      */
-    public String saveHostDescription(HostDescriptionDocument host);
+    public String saveHostDescription(HostDescription host);
 
     /**
      * Save a service description with the specific name.
@@ -85,7 +85,7 @@ public interface Registry {
      * @param host
      * @return identifier
      */
-    public String saveServiceDescription(ServiceDescriptionDocument service);
+    public String saveServiceDescription(ServiceDescription service);
 
     /**
      * Save a deployment description according to the service and host
@@ -95,7 +95,7 @@ public interface Registry {
      * @param app
      * @return identifier
      */
-    public String saveDeploymentDescription(String serviceId, String hostId, ApplicationDeploymentDescriptionDocument
app);
+    public String saveDeploymentDescription(String serviceId, String hostId, ApplicationDeploymentDescription
app);
 
     /**
      * Deploy a service on a host
@@ -114,7 +114,7 @@ public interface Registry {
      * @throws HostDescriptionRetrieveException
      * @throws PathNotFoundException
      */
-    public List<HostDescriptionDocument> searchHostDescription(String name) throws
RegistryException;
+    public List<HostDescription> searchHostDescription(String name) throws RegistryException;
 
     /**
      * Search service description with name
@@ -124,7 +124,7 @@ public interface Registry {
      * @throws PathNotFoundException
      * @throws ServiceDescriptionRetrieveException
      */
-    public List<ServiceDescriptionDocument> searchServiceDescription(String name) throws
RegistryException;
+    public List<ServiceDescription> searchServiceDescription(String name) throws RegistryException;
 
     /**
      * Search deployment description from a service and/or a hostname
@@ -135,7 +135,7 @@ public interface Registry {
      * @throws PathNotFoundException
      * @throws DeploymentDescriptionRetrieveException
      */
-    public List<ApplicationDeploymentDescriptionDocument> searchDeploymentDescription(String
serviceName, String hostName)
+    public List<ApplicationDeploymentDescription> searchDeploymentDescription(String
serviceName, String hostName)
             throws RegistryException;
 
     /**
@@ -148,7 +148,7 @@ public interface Registry {
      * @throws PathNotFoundException
      * @throws DeploymentDescriptionRetrieveException
      */
-    public List<ApplicationDeploymentDescriptionDocument> searchDeploymentDescription(String
serviceName, String hostName,
+    public List<ApplicationDeploymentDescription> searchDeploymentDescription(String
serviceName, String hostName,
             String applicationName) throws RegistryException;
 
     /**
@@ -159,7 +159,7 @@ public interface Registry {
      * @throws PathNotFoundException
      * @throws DeploymentDescriptionRetrieveException
      */
-    public Map<ApplicationDeploymentDescriptionDocument, String> searchDeploymentDescription()
throws RegistryException;
+    public Map<ApplicationDeploymentDescription, String> searchDeploymentDescription()
throws RegistryException;
 
     /**
      * This method can be used to save the gfacURL in to registry

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=1188302&r1=1188301&r2=1188302&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
Mon Oct 24 19:11:28 2011
@@ -46,6 +46,11 @@ import javax.jcr.SimpleCredentials;
 import javax.jcr.Value;
 import javax.xml.namespace.QName;
 
+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.parameter.AbstractParameter;
 import org.apache.airavata.registry.api.Axis2Registry;
 import org.apache.airavata.registry.api.DataRegistry;
 import org.apache.airavata.registry.api.exception.DeploymentDescriptionRetrieveException;
@@ -54,10 +59,9 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.exception.ServiceDescriptionRetrieveException;
 import org.apache.airavata.registry.api.user.UserManager;
 import org.apache.airavata.registry.api.util.WebServiceUtil;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionDocument;
-import org.apache.airavata.schemas.gfac.HostDescriptionDocument;
-import org.apache.airavata.schemas.gfac.Parameter;
-import org.apache.airavata.schemas.gfac.ServiceDescriptionDocument;
+import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
+import org.apache.airavata.schemas.gfac.HostDescriptionType;
+import org.apache.airavata.schemas.gfac.ServiceDescriptionType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -155,9 +159,9 @@ public class JCRRegistry extends Observa
 		}
 	}
 
-	public List<HostDescriptionDocument> getServiceLocation(String serviceId) {
+	public List<HostDescription> getServiceLocation(String serviceId) {
 		Session session = null;
-		ArrayList<HostDescriptionDocument> result = new ArrayList<HostDescriptionDocument>();
+		ArrayList<HostDescription> result = new ArrayList<HostDescription>();
 		try {
 			session = getSession();
 			Node node = getServiceNode(session);
@@ -168,8 +172,8 @@ public class JCRRegistry extends Observa
 				for (Value val : vals) {
 					Node host = session.getNodeByIdentifier(val.getString());
 					Property hostProp = host.getProperty(XML_PROPERTY_NAME);
-					result.add(HostDescriptionDocument.Factory.parse(hostProp
-							.getString()));
+					result.add(new HostDescription(HostDescriptionType.Factory.parse(hostProp
+							.getString())));
 				}
 			}
 		} catch (Exception e) {
@@ -200,16 +204,16 @@ public class JCRRegistry extends Observa
 		}
 	}
 
-	public ServiceDescriptionDocument getServiceDescription(String serviceId)
+	public ServiceDescription getServiceDescription(String serviceId)
 			throws ServiceDescriptionRetrieveException {
 		Session session = null;
-		ServiceDescriptionDocument result = null;
+		ServiceDescription result = null;
 		try {
 			session = getSession();
 			Node serviceNode = getServiceNode(session);
 			Node node = serviceNode.getNode(serviceId);
 			Property prop = node.getProperty(XML_PROPERTY_NAME);
-			result = ServiceDescriptionDocument.Factory.parse(prop.getString());
+			result = new ServiceDescription(ServiceDescriptionType.Factory.parse(prop.getString()));
 		} catch (Exception e) {
 			throw new ServiceDescriptionRetrieveException(e);
 		} finally {
@@ -218,10 +222,10 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	public ApplicationDeploymentDescriptionDocument getDeploymentDescription(
+	public ApplicationDeploymentDescription getDeploymentDescription(
 			String serviceId, String hostId) throws RegistryException {
 		Session session = null;
-		ApplicationDeploymentDescriptionDocument result = null;
+		ApplicationDeploymentDescription result = null;
 		try {
 			session = getSession();
 			Node deploymentNode = getDeploymentNode(session);
@@ -231,8 +235,8 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node app = nodes.nextNode();
 				Property prop = app.getProperty(XML_PROPERTY_NAME);
-				result = ApplicationDeploymentDescriptionDocument.Factory.parse(prop
-						.getString());
+				result = new ApplicationDeploymentDescription(ApplicationDeploymentDescriptionType.Factory.parse(prop
+						.getString()));
 			}
 		} catch (Exception e) {
 			log.error("Cannot get Deployment Description", e);
@@ -260,10 +264,10 @@ public class JCRRegistry extends Observa
 		}
 	}
 
-	public HostDescriptionDocument getHostDescription(String hostId)
+	public HostDescription getHostDescription(String hostId)
 			throws RegistryException {
 		Session session = null;
-		HostDescriptionDocument result = null;
+		HostDescription result = null;
 		try {
 			session = getSession();
 			Node hostNode = getHostNode(session);
@@ -279,26 +283,26 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	private HostDescriptionDocument getHostDescriptor(Node node)
+	private HostDescription getHostDescriptor(Node node)
 			throws RegistryException {
-		HostDescriptionDocument result;
+		HostDescription result;
 		try {			
 			Property prop = node.getProperty(XML_PROPERTY_NAME);
-			result = HostDescriptionDocument.Factory.parse(prop.getString());
+			result = new HostDescription(HostDescriptionType.Factory.parse(prop.getString()));
 		} catch (Exception e) {
 			throw new HostDescriptionRetrieveException(e);
 		}
 		return result;
 	}
 
-	public String saveHostDescription(HostDescriptionDocument host) {
+	public String saveHostDescription(HostDescription host) {
 		Session session = null;
 		String result = null;
 		try {
 			session = getSession();
 			Node hostNode = getHostNode(session);
-			Node node = getOrAddNode(hostNode, host.getHostDescription().getName());
-			node.setProperty(XML_PROPERTY_NAME, host.xmlText());
+			Node node = getOrAddNode(hostNode, host.getId());
+			node.setProperty(XML_PROPERTY_NAME, host.toXml());
 			session.save();
 
 			result = node.getIdentifier();
@@ -313,14 +317,14 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	public String saveServiceDescription(ServiceDescriptionDocument service) {
+	public String saveServiceDescription(ServiceDescription service) {
 		Session session = null;
 		String result = null;
 		try {
 			session = getSession();
 			Node serviceNode = getServiceNode(session);
-			Node node = getOrAddNode(serviceNode, service.getServiceDescription().getName());
-			node.setProperty(XML_PROPERTY_NAME, service.xmlText());
+			Node node = getOrAddNode(serviceNode, service.getId());
+			node.setProperty(XML_PROPERTY_NAME, service.toXml());
 			session.save();
 
 			result = node.getIdentifier();
@@ -336,7 +340,7 @@ public class JCRRegistry extends Observa
 	}
 
 	public String saveDeploymentDescription(String serviceId, String hostId,
-			ApplicationDeploymentDescriptionDocument app) {
+			ApplicationDeploymentDescription app) {
 		Session session = null;
 		String result = null;
 		try {
@@ -344,8 +348,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.getApplicationDeploymentDescription().getName());
-			appName.setProperty(XML_PROPERTY_NAME, app.xmlText());
+			Node appName = getOrAddNode(hostNode, app.getId());
+			appName.setProperty(XML_PROPERTY_NAME, app.toXml());
 			session.save();
 
 			result = appName.getIdentifier();
@@ -401,10 +405,10 @@ public class JCRRegistry extends Observa
 		return false;
 	}
 
-	public List<ServiceDescriptionDocument> searchServiceDescription(String name)
+	public List<ServiceDescription> searchServiceDescription(String name)
 			throws RegistryException {
 		Session session = null;
-		ArrayList<ServiceDescriptionDocument> result = new ArrayList<ServiceDescriptionDocument>();
+		ArrayList<ServiceDescription> result = new ArrayList<ServiceDescription>();
 		try {
 			session = getSession();
 			Node node = getServiceNode(session);
@@ -412,7 +416,7 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node service = nodes.nextNode();
 				Property prop = service.getProperty(XML_PROPERTY_NAME);
-				result.add(ServiceDescriptionDocument.Factory.parse(prop.getString()));
+				result.add(new ServiceDescription().fromXml(prop.getString()));
 			}
 		} catch (Exception e) {
 			new ServiceDescriptionRetrieveException(e);
@@ -422,10 +426,10 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	public List<HostDescriptionDocument> searchHostDescription(String nameRegEx)
+	public List<HostDescription> searchHostDescription(String nameRegEx)
 			throws RegistryException {
 		Session session = null;
-		List<HostDescriptionDocument> result = new ArrayList<HostDescriptionDocument>();
+		List<HostDescription> result = new ArrayList<HostDescription>();
 		try {
 			session = getSession();
 			Node node = getHostNode(session);
@@ -433,7 +437,7 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node host = nodes.nextNode();
 				if (host != null && host.getName().matches(nameRegEx)) {
-					HostDescriptionDocument hostDescriptor = getHostDescriptor(host);
+					HostDescription hostDescriptor = getHostDescriptor(host);
 					result.add(hostDescriptor);
 				}
 			}
@@ -445,10 +449,10 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	public Map<ApplicationDeploymentDescriptionDocument, String> searchDeploymentDescription()
+	public Map<ApplicationDeploymentDescription, String> searchDeploymentDescription()
 			throws RegistryException {
 		Session session = null;
-		Map<ApplicationDeploymentDescriptionDocument, String> result = new HashMap<ApplicationDeploymentDescriptionDocument,
String>();
+		Map<ApplicationDeploymentDescription, String> result = new HashMap<ApplicationDeploymentDescription,
String>();
 		try {
 			session = getSession();
 			Node deploymentNode = getDeploymentNode(session);
@@ -464,8 +468,7 @@ public class JCRRegistry extends Observa
 					for (; nodes.hasNext();) {
 						Node app = nodes.nextNode();
 						Property prop = app.getProperty(XML_PROPERTY_NAME);
-						result.put(ApplicationDeploymentDescriptionDocument.Factory
-								.parse(prop.getString()), serviceNode.getName()
+						result.put(new ApplicationDeploymentDescription().fromXml(prop.getString()), serviceNode.getName()
 								+ "$" + hostNode.getName());
 					}
 				}
@@ -491,9 +494,8 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node app = nodes.nextNode();
 				Property prop = app.getProperty(XML_PROPERTY_NAME);
-				ApplicationDeploymentDescriptionDocument appDesc = ApplicationDeploymentDescriptionDocument.Factory
-						.parse(prop.getString());
-				if (appDesc.getApplicationDeploymentDescription().getName().matches(applicationName))
{
+				ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription().fromXml(prop.getString());
+				if (appDesc.getId().matches(applicationName)) {
 					app.remove();
 				}
 			}
@@ -505,11 +507,11 @@ public class JCRRegistry extends Observa
 		}
 	}
 
-	public List<ApplicationDeploymentDescriptionDocument> searchDeploymentDescription(
+	public List<ApplicationDeploymentDescription> searchDeploymentDescription(
 			String serviceName, String hostName, String applicationName)
 			throws RegistryException {
 		Session session = null;
-		List<ApplicationDeploymentDescriptionDocument> result = new ArrayList<ApplicationDeploymentDescriptionDocument>();
+		List<ApplicationDeploymentDescription> result = new ArrayList<ApplicationDeploymentDescription>();
 		try {
 			session = getSession();
 			Node deploymentNode = getDeploymentNode(session);
@@ -519,9 +521,8 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node app = nodes.nextNode();
 				Property prop = app.getProperty(XML_PROPERTY_NAME);
-				ApplicationDeploymentDescriptionDocument appDesc = ApplicationDeploymentDescriptionDocument.Factory
-						.parse(prop.getString());
-				if (appDesc.getApplicationDeploymentDescription().getName().matches(applicationName))
{
+				ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription().fromXml(prop.getString());
+				if (appDesc.getId().matches(applicationName)) {
 					result.add(appDesc);
 				}
 			}
@@ -533,10 +534,10 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	public List<ApplicationDeploymentDescriptionDocument> searchDeploymentDescription(
+	public List<ApplicationDeploymentDescription> searchDeploymentDescription(
 			String serviceName, String hostName) throws RegistryException {
 		Session session = null;
-		List<ApplicationDeploymentDescriptionDocument> result = new ArrayList<ApplicationDeploymentDescriptionDocument>();
+		List<ApplicationDeploymentDescription> result = new ArrayList<ApplicationDeploymentDescription>();
 		try {
 			session = getSession();
 			Node deploymentNode = getDeploymentNode(session);
@@ -546,8 +547,7 @@ public class JCRRegistry extends Observa
 			for (; nodes.hasNext();) {
 				Node app = nodes.nextNode();
 				Property prop = app.getProperty(XML_PROPERTY_NAME);
-				result.add(ApplicationDeploymentDescriptionDocument.Factory.parse(prop
-						.getString()));
+				result.add(new ApplicationDeploymentDescription().fromXml(prop.getString()));
 			}
 		} catch (Exception e) {
 			throw new DeploymentDescriptionRetrieveException(e);
@@ -557,13 +557,13 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	public String saveWSDL(ServiceDescriptionDocument service, String WSDL) {
+	public String saveWSDL(ServiceDescription service, String WSDL) {
 		Session session = null;
 		String result = null;
 		try {
 			session = getSession();
 			Node serviceNode = getServiceNode(session);
-			Node node = getOrAddNode(serviceNode, service.getServiceDescription().getName());
+			Node node = getOrAddNode(serviceNode, service.getId());
 			node.setProperty(WSDL_PROPERTY_NAME, WSDL);
 			session.save();
 
@@ -579,7 +579,7 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	public String saveWSDL(ServiceDescriptionDocument service) {
+	public String saveWSDL(ServiceDescription service) {
 		return saveWSDL(service, WebServiceUtil.generateWSDL(service));
 	}
 
@@ -693,7 +693,7 @@ public class JCRRegistry extends Observa
 		this.userManager = userManager;
 	}
 
-	public String saveOutput(String workflowId, List<Parameter> parameters) {
+	public String saveOutput(String workflowId, List<AbstractParameter> parameters) {
 		Session session = null;
 		String result = null;
 		try {
@@ -702,7 +702,7 @@ public class JCRRegistry extends Observa
 					OUTPUT_NODE_NAME);
 			Node node = getOrAddNode(outputNode, workflowId);
 			for (int i = 0; i < parameters.size(); i++) {
-				node.setProperty(String.valueOf(i), parameters.get(i).xmlText());
+				node.setProperty(String.valueOf(i), parameters.get(i).toXml());
 			}
 
 			session.save();
@@ -719,9 +719,9 @@ public class JCRRegistry extends Observa
 		return result;
 	}
 
-	public List<Parameter> loadOutput(String workflowId) {
+	public List<AbstractParameter> loadOutput(String workflowId) {
 		Session session = null;
-		ArrayList<Parameter> result = new ArrayList<Parameter>();
+		ArrayList<AbstractParameter> result = new ArrayList<AbstractParameter>();
 		try {
 			session = getSession();
 			Node outputNode = getOrAddNode(session.getRootNode(),
@@ -731,7 +731,7 @@ public class JCRRegistry extends Observa
 			PropertyIterator it = node.getProperties();
 			while (it.hasNext()) {
 				Property prop = (Property) it.next();
-				result.add(Parameter.Factory.parse(prop.getString()));
+				result.add(new Parameter().fromXml(prop.getString()));
 			}
 		} catch (Exception e) {
 			System.out.println(e);



Mime
View raw message