airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [35/50] [abbrv] airavata git commit: updating with app catalog input output objects
Date Tue, 11 Nov 2014 20:12:39 GMT
updating with app catalog input output objects


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f9fdf53e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f9fdf53e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f9fdf53e

Branch: refs/heads/master
Commit: f9fdf53e7400d98f0985c8d66b492c97ab07b5bc
Parents: 0b95d3b
Author: chathuriw <kamalasini@gmail.com>
Authored: Thu Nov 6 16:46:52 2014 -0500
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Thu Nov 6 16:46:52 2014 -0500

----------------------------------------------------------------------
 .../model/util/ExperimentModelUtil.java         |  15 +--
 .../registry/jpa/impl/ExperimentRegistry.java   | 126 ++++++++++---------
 .../registry/jpa/impl/RegistryImpl.java         |  13 +-
 .../jpa/utils/ThriftDataModelConversion.java    | 101 ++++++++-------
 4 files changed, 135 insertions(+), 120 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f9fdf53e/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
index 43fb241..fdfd617 100644
--- a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
+++ b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
@@ -25,10 +25,11 @@ package org.apache.airavata.model.util;
 import java.util.Calendar;
 import java.util.List;
 
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
 import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.DataObjectType;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
@@ -52,7 +53,7 @@ public class ExperimentModelUtil {
                                                     String experimentName,
                                                     String expDescription,
                                                     String applicationId,
-                                                    List<DataObjectType> experimentInputList)
{
+                                                    List<InputDataObjectType> experimentInputList)
{
         Experiment experiment = new Experiment();
         experiment.setProjectID(projectID);
         experiment.setUserName(userName);
@@ -124,12 +125,12 @@ public class ExperimentModelUtil {
         taskDetails.setCreationTime(experiment.getCreationTime());
         taskDetails.setApplicationId(experiment.getApplicationId());
         taskDetails.setApplicationVersion(experiment.getApplicationVersion());
-        List<DataObjectType> experimentInputs = experiment.getExperimentInputs();
+        List<InputDataObjectType> experimentInputs = experiment.getExperimentInputs();
         if (experimentInputs != null){
             taskDetails.setApplicationInputs(experimentInputs);
         }
 
-        List<DataObjectType> experimentOutputs = experiment.getExperimentOutputs();
+        List<OutputDataObjectType> experimentOutputs = experiment.getExperimentOutputs();
         if (experimentOutputs != null){
             taskDetails.setApplicationOutputs(experimentOutputs);
         }
@@ -158,12 +159,12 @@ public class ExperimentModelUtil {
 //        String[] split = ;
         taskDetails.setApplicationId(nodeDetails.getExecutionUnitData());
 //        taskDetails.setApplicationVersion(split[1]);
-        List<DataObjectType> experimentInputs = nodeDetails.getNodeInputs();
+        List<InputDataObjectType> experimentInputs = nodeDetails.getNodeInputs();
         if (experimentInputs != null){
             taskDetails.setApplicationInputs(experimentInputs);
         }
 
-        List<DataObjectType> experimentOutputs = nodeDetails.getNodeOutputs();
+        List<OutputDataObjectType> experimentOutputs = nodeDetails.getNodeOutputs();
         if (experimentOutputs != null){
             taskDetails.setApplicationOutputs(experimentOutputs);
         }
@@ -186,7 +187,7 @@ public class ExperimentModelUtil {
         return taskDetails;
     }
     public static WorkflowNodeDetails createWorkflowNode (String nodeName,
-                                                          List<DataObjectType> nodeInputs){
+                                                          List<InputDataObjectType>
nodeInputs){
         WorkflowNodeDetails wfnod = new WorkflowNodeDetails();
         wfnod.setNodeName(nodeName);
         wfnod.setNodeInputs(nodeInputs);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f9fdf53e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index 03ca6fc..a83f5f1 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -24,6 +24,8 @@ package org.apache.airavata.persistance.registry.jpa.impl;
 import org.apache.airavata.common.logger.AiravataLogger;
 import org.apache.airavata.common.logger.AiravataLoggerFactory;
 import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
@@ -81,7 +83,7 @@ public class ExperimentRegistry {
             experimentResource.setWorkflowTemplateVersion(experiment.getWorkflowTemplateVersion());
             experimentResource.setWorkflowExecutionId(experiment.getWorkflowExecutionInstanceId());
             experimentResource.save();
-            List<DataObjectType> experimentInputs = experiment.getExperimentInputs();
+            List<InputDataObjectType> experimentInputs = experiment.getExperimentInputs();
             if (experimentInputs != null) {
                 addExpInputs(experimentInputs, experimentResource);
             }
@@ -91,9 +93,9 @@ public class ExperimentRegistry {
                 addUserConfigData(userConfigurationData, experimentID);
             }
 
-            List<DataObjectType> experimentOutputs = experiment.getExperimentOutputs();
+            List<OutputDataObjectType> experimentOutputs = experiment.getExperimentOutputs();
             if (experimentOutputs != null && !experimentOutputs.isEmpty()){
-                for (DataObjectType output : experimentOutputs){
+                for (OutputDataObjectType output : experimentOutputs){
                     output.setValue("");
                 }
                 addExpOutputs(experimentOutputs, experimentID);
@@ -260,12 +262,12 @@ public class ExperimentRegistry {
 
     }
 
-    public void addExpInputs(List<DataObjectType> exInputs, ExperimentResource experimentResource)
throws RegistryException {
+    public void addExpInputs(List<InputDataObjectType> exInputs, ExperimentResource
experimentResource) throws RegistryException {
         try {
-            for (DataObjectType input : exInputs) {
+            for (InputDataObjectType input : exInputs) {
                 ExperimentInputResource resource = (ExperimentInputResource) experimentResource.create(ResourceType.EXPERIMENT_INPUT);
                 resource.setExperimentResource(experimentResource);
-                resource.setExperimentKey(input.getKey());
+                resource.setExperimentKey(input.getName());
                 resource.setValue(input.getValue());
                 if (input.getType() != null){
                     resource.setInputType(input.getType().toString());
@@ -279,12 +281,12 @@ public class ExperimentRegistry {
         }
     }
 
-    public void updateExpInputs(List<DataObjectType> exInputs, ExperimentResource experimentResource)
throws RegistryException {
+    public void updateExpInputs(List<InputDataObjectType> exInputs, ExperimentResource
experimentResource) throws RegistryException {
         try {
             List<ExperimentInputResource> experimentInputs = experimentResource.getExperimentInputs();
-            for (DataObjectType input : exInputs) {
+            for (InputDataObjectType input : exInputs) {
                 for (ExperimentInputResource exinput : experimentInputs) {
-                    if (exinput.getExperimentKey().equals(input.getKey())) {
+                    if (exinput.getExperimentKey().equals(input.getName())) {
                         exinput.setValue(input.getValue());
                         if (input.getType() != null){
                             exinput.setInputType(input.getType().toString());
@@ -301,18 +303,18 @@ public class ExperimentRegistry {
 
     }
 
-    public String addExpOutputs(List<DataObjectType> exOutput, String expId) throws
RegistryException {
+    public String addExpOutputs(List<OutputDataObjectType> exOutput, String expId)
throws RegistryException {
         try {
             ExperimentResource experiment = gatewayResource.getExperiment(expId);
-            for (DataObjectType output : exOutput) {
+            for (OutputDataObjectType output : exOutput) {
                 ExperimentOutputResource resource = (ExperimentOutputResource) experiment.create(ResourceType.EXPERIMENT_OUTPUT);
                 resource.setExperimentResource(experiment);
-                resource.setExperimentKey(output.getKey());
+                resource.setExperimentKey(output.getName());
                 resource.setValue(output.getValue());
                 if (output.getType() != null){
                     resource.setOutputType(output.getType().toString());
                 }
-                resource.setMetadata(output.getMetaData());
+//                resource.setMetadata(output.get());
                 resource.save();
             }
         } catch (Exception e) {
@@ -322,20 +324,20 @@ public class ExperimentRegistry {
         return expId;
     }
 
-    public void updateExpOutputs(List<DataObjectType> exOutput, String expId) throws
RegistryException {
+    public void updateExpOutputs(List<OutputDataObjectType> exOutput, String expId)
throws RegistryException {
         try {
             ExperimentResource experiment = gatewayResource.getExperiment(expId);
             List<ExperimentOutputResource> existingExpOutputs = experiment.getExperimentOutputs();
-            for (DataObjectType output : exOutput) {
+            for (OutputDataObjectType output : exOutput) {
                 for (ExperimentOutputResource resource : existingExpOutputs) {
-                    if (resource.getExperimentKey().equals(output.getKey())) {
+                    if (resource.getExperimentKey().equals(output.getName())) {
                         resource.setExperimentResource(experiment);
-                        resource.setExperimentKey(output.getKey());
+                        resource.setExperimentKey(output.getName());
                         resource.setValue(output.getValue());
                         if (output.getType() != null){
                             resource.setOutputType(output.getType().toString());
                         }
-                        resource.setMetadata(output.getMetaData());
+//                        resource.setMetadata(output.getMetaData());
                         resource.save();
                     }
                 }
@@ -346,19 +348,19 @@ public class ExperimentRegistry {
         }
     }
 
-    public String addNodeOutputs(List<DataObjectType> wfOutputs, CompositeIdentifier
ids) throws RegistryException {
+    public String addNodeOutputs(List<OutputDataObjectType> wfOutputs, CompositeIdentifier
ids) throws RegistryException {
         try {
             ExperimentResource experiment = gatewayResource.getExperiment((String) ids.getTopLevelIdentifier());
             WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode((String)
ids.getSecondLevelIdentifier());
-            for (DataObjectType output : wfOutputs) {
+            for (OutputDataObjectType output : wfOutputs) {
                 NodeOutputResource resource = (NodeOutputResource) workflowNode.create(ResourceType.NODE_OUTPUT);
                 resource.setNodeDetailResource(workflowNode);
-                resource.setOutputKey(output.getKey());
+                resource.setOutputKey(output.getName());
                 resource.setValue(output.getValue());
                 if (output.getType() != null){
                     resource.setOutputType(output.getType().toString());
                 }
-                resource.setMetadata(output.getMetaData());
+//                resource.setMetadata(output.getMetaData());
                 resource.save();
             }
         } catch (Exception e) {
@@ -368,20 +370,20 @@ public class ExperimentRegistry {
         return (String) ids.getSecondLevelIdentifier();
     }
 
-    public void updateNodeOutputs(List<DataObjectType> wfOutputs, String nodeId) throws
RegistryException {
+    public void updateNodeOutputs(List<OutputDataObjectType> wfOutputs, String nodeId)
throws RegistryException {
         try {
             ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
             WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode(nodeId);
             List<NodeOutputResource> nodeOutputs = workflowNode.getNodeOutputs();
-            for (DataObjectType output : wfOutputs) {
+            for (OutputDataObjectType output : wfOutputs) {
                 for (NodeOutputResource resource : nodeOutputs) {
                     resource.setNodeDetailResource(workflowNode);
-                    resource.setOutputKey(output.getKey());
+                    resource.setOutputKey(output.getName());
                     resource.setValue(output.getValue());
                     if (output.getType() != null){
                         resource.setOutputType(output.getType().toString());
                     }
-                    resource.setMetadata(output.getMetaData());
+//                    resource.setMetadata(output.getMetaData());
                     resource.save();
                 }
             }
@@ -391,20 +393,20 @@ public class ExperimentRegistry {
         }
     }
 
-    public String addApplicationOutputs(List<DataObjectType> appOutputs, CompositeIdentifier
ids) throws RegistryException {
+    public String addApplicationOutputs(List<OutputDataObjectType> appOutputs, CompositeIdentifier
ids) throws RegistryException {
         try {
             ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
             WorkflowNodeDetailResource workflowNode = experiment.getWorkflowNode((String)
ids.getTopLevelIdentifier());
             TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getSecondLevelIdentifier());
-            for (DataObjectType output : appOutputs) {
+            for (OutputDataObjectType output : appOutputs) {
                 ApplicationOutputResource resource = (ApplicationOutputResource) taskDetail.create(ResourceType.APPLICATION_OUTPUT);
                 resource.setTaskDetailResource(taskDetail);
-                resource.setOutputKey(output.getKey());
+                resource.setOutputKey(output.getName());
                 resource.setValue(output.getValue());
                 if (output.getType() != null){
                     resource.setOutputType(output.getType().toString());
                 }
-                resource.setMetadata(output.getMetaData());
+//                resource.setMetadata(output.getMetaData());
                 resource.save();
             }
         } catch (Exception e) {
@@ -704,11 +706,11 @@ public class ExperimentRegistry {
             resource.setNodeInstanceId(getNodeInstanceID(nodeDetails.getNodeName()));
             resource.save();
             String nodeId = resource.getNodeInstanceId();
-            List<DataObjectType> nodeInputs = nodeDetails.getNodeInputs();
+            List<InputDataObjectType> nodeInputs = nodeDetails.getNodeInputs();
             if (nodeInputs != null) {
                 addWorkflowInputs(nodeDetails.getNodeInputs(), resource);
             }
-            List<DataObjectType> nodeOutputs = nodeDetails.getNodeOutputs();
+            List<OutputDataObjectType> nodeOutputs = nodeDetails.getNodeOutputs();
             if (nodeOutputs != null && !nodeOutputs.isEmpty()){
                 CompositeIdentifier ids = new CompositeIdentifier(expId, nodeId);
                 addNodeOutputs(nodeOutputs, ids);
@@ -761,11 +763,11 @@ public class ExperimentRegistry {
             workflowNode.setNodeInstanceId(nodeId);
             workflowNode.save();
             String expID = workflowNode.getExperimentResource().getExpID();
-            List<DataObjectType> nodeInputs = nodeDetails.getNodeInputs();
+            List<InputDataObjectType> nodeInputs = nodeDetails.getNodeInputs();
             if (nodeInputs != null) {
                 updateWorkflowInputs(nodeDetails.getNodeInputs(), workflowNode);
             }
-            List<DataObjectType> nodeOutputs = nodeDetails.getNodeOutputs();
+            List<OutputDataObjectType> nodeOutputs = nodeDetails.getNodeOutputs();
             if (nodeOutputs != null && !nodeOutputs.isEmpty()){
                 updateNodeOutputs(nodeOutputs, nodeId);
             }
@@ -802,12 +804,12 @@ public class ExperimentRegistry {
     }
 
 
-    public void addWorkflowInputs(List<DataObjectType> wfInputs, WorkflowNodeDetailResource
nodeDetailResource) throws RegistryException {
+    public void addWorkflowInputs(List<InputDataObjectType> wfInputs, WorkflowNodeDetailResource
nodeDetailResource) throws RegistryException {
         try {
-            for (DataObjectType input : wfInputs) {
+            for (InputDataObjectType input : wfInputs) {
                 NodeInputResource resource = (NodeInputResource) nodeDetailResource.create(ResourceType.NODE_INPUT);
                 resource.setNodeDetailResource(nodeDetailResource);
-                resource.setInputKey(input.getKey());
+                resource.setInputKey(input.getName());
                 resource.setValue(input.getValue());
                 if (input.getType() != null){
                     resource.setInputType(input.getType().toString());
@@ -822,13 +824,13 @@ public class ExperimentRegistry {
 
     }
 
-    public void updateWorkflowInputs(List<DataObjectType> wfInputs, WorkflowNodeDetailResource
nodeDetailResource) throws RegistryException {
+    public void updateWorkflowInputs(List<InputDataObjectType> wfInputs, WorkflowNodeDetailResource
nodeDetailResource) throws RegistryException {
         try {
             List<NodeInputResource> nodeInputs = nodeDetailResource.getNodeInputs();
-            for (DataObjectType input : wfInputs) {
+            for (InputDataObjectType input : wfInputs) {
                 for (NodeInputResource resource : nodeInputs) {
                     resource.setNodeDetailResource(nodeDetailResource);
-                    resource.setInputKey(input.getKey());
+                    resource.setInputKey(input.getName());
                     resource.setValue(input.getValue());
                     if (input.getType() != null){
                         resource.setInputType(input.getType().toString());
@@ -855,11 +857,11 @@ public class ExperimentRegistry {
             taskDetail.setApplicationVersion(taskDetails.getApplicationVersion());
             taskDetail.setCreationTime(AiravataUtils.getTime(taskDetails.getCreationTime()));
             taskDetail.save();
-            List<DataObjectType> applicationInputs = taskDetails.getApplicationInputs();
+            List<InputDataObjectType> applicationInputs = taskDetails.getApplicationInputs();
             if (applicationInputs != null) {
                 addAppInputs(applicationInputs, taskDetail);
             }
-            List<DataObjectType> applicationOutput = taskDetails.getApplicationOutputs();
+            List<OutputDataObjectType> applicationOutput = taskDetails.getApplicationOutputs();
             if (applicationOutput != null) {
                 addAppOutputs(applicationOutput, taskDetail);
             }
@@ -931,7 +933,7 @@ public class ExperimentRegistry {
             taskDetail.setApplicationDeploymentId(taskDetails.getApplicationDeploymentId());
 
             taskDetail.save();
-            List<DataObjectType> applicationInputs = taskDetails.getApplicationInputs();
+            List<InputDataObjectType> applicationInputs = taskDetails.getApplicationInputs();
             if (applicationInputs != null) {
                 updateAppInputs(applicationInputs, taskDetail);
             }
@@ -980,12 +982,12 @@ public class ExperimentRegistry {
         }
     }
 
-    public void addAppInputs(List<DataObjectType> appInputs, TaskDetailResource taskDetailResource)
throws RegistryException {
+    public void addAppInputs(List<InputDataObjectType> appInputs, TaskDetailResource
taskDetailResource) throws RegistryException {
         try {
-            for (DataObjectType input : appInputs) {
+            for (InputDataObjectType input : appInputs) {
                 ApplicationInputResource resource = (ApplicationInputResource) taskDetailResource.create(ResourceType.APPLICATION_INPUT);
                 resource.setTaskDetailResource(taskDetailResource);
-                resource.setInputKey(input.getKey());
+                resource.setInputKey(input.getName());
                 resource.setValue(input.getValue());
                 if (input.getType() != null){
                     resource.setInputType(input.getType().toString());
@@ -1000,17 +1002,17 @@ public class ExperimentRegistry {
 
     }
 
-    public void addAppOutputs(List<DataObjectType> appOytputs, TaskDetailResource taskDetailResource)
throws RegistryException {
+    public void addAppOutputs(List<OutputDataObjectType> appOytputs, TaskDetailResource
taskDetailResource) throws RegistryException {
         try {
-            for (DataObjectType output : appOytputs) {
+            for (OutputDataObjectType output : appOytputs) {
                 ApplicationOutputResource resource = (ApplicationOutputResource) taskDetailResource.create(ResourceType.APPLICATION_OUTPUT);
                 resource.setTaskDetailResource(taskDetailResource);
-                resource.setOutputKey(output.getKey());
+                resource.setOutputKey(output.getName());
                 resource.setValue(output.getValue());
                 if (output.getType() != null){
                     resource.setOutputType(output.getType().toString());
                 }
-                resource.setMetadata(output.getMetaData());
+//                resource.setMetadata(output.getMetaData());
                 resource.save();
             }
         } catch (Exception e) {
@@ -1020,21 +1022,21 @@ public class ExperimentRegistry {
 
     }
 
-    public void updateAppOutputs(List<DataObjectType> appOutputs, String taskId) throws
RegistryException {
+    public void updateAppOutputs(List<OutputDataObjectType> appOutputs, String taskId)
throws RegistryException {
         try {
             ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
             WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
             TaskDetailResource taskDetail = workflowNode.getTaskDetail(taskId);
             List<ApplicationOutputResource> outputs = taskDetail.getApplicationOutputs();
-            for (DataObjectType output : appOutputs) {
+            for (OutputDataObjectType output : appOutputs) {
                 for (ApplicationOutputResource resource : outputs) {
                     resource.setTaskDetailResource(taskDetail);
-                    resource.setOutputKey(output.getKey());
+                    resource.setOutputKey(output.getName());
                     resource.setValue(output.getValue());
                     if (output.getType() != null){
                         resource.setOutputType(output.getType().toString());
                     }
-                    resource.setMetadata(output.getMetaData());
+//                    resource.setMetadata(output.getMetaData());
                     resource.save();
                 }
             }
@@ -1044,13 +1046,13 @@ public class ExperimentRegistry {
         }
     }
 
-    public void updateAppInputs(List<DataObjectType> appInputs, TaskDetailResource
taskDetailResource) throws RegistryException {
+    public void updateAppInputs(List<InputDataObjectType> appInputs, TaskDetailResource
taskDetailResource) throws RegistryException {
         try {
             List<ApplicationInputResource> inputs = taskDetailResource.getApplicationInputs();
-            for (DataObjectType input : appInputs) {
+            for (InputDataObjectType input : appInputs) {
                 for (ApplicationInputResource resource : inputs) {
                     resource.setTaskDetailResource(taskDetailResource);
-                    resource.setInputKey(input.getKey());
+                    resource.setInputKey(input.getName());
                     resource.setValue(input.getValue());
                     if (input.getType() != null){
                         resource.setInputType(input.getType().toString());
@@ -1517,7 +1519,7 @@ public class ExperimentRegistry {
             existingExperiment.setWorkflowTemplateVersion(experiment.getWorkflowTemplateVersion());
             existingExperiment.setWorkflowExecutionId(experiment.getWorkflowExecutionInstanceId());
             existingExperiment.save();
-            List<DataObjectType> experimentInputs = experiment.getExperimentInputs();
+            List<InputDataObjectType> experimentInputs = experiment.getExperimentInputs();
             if (experimentInputs != null && !experimentInputs.isEmpty()){
                 updateExpInputs(experimentInputs, existingExperiment);
             }
@@ -1527,7 +1529,7 @@ public class ExperimentRegistry {
                 updateUserConfigData(userConfigurationData, expId);
             }
 
-            List<DataObjectType> experimentOutputs = experiment.getExperimentOutputs();
+            List<OutputDataObjectType> experimentOutputs = experiment.getExperimentOutputs();
             if (experimentOutputs != null && !experimentOutputs.isEmpty()){
                 updateExpOutputs(experimentOutputs, expId);
             }
@@ -1946,7 +1948,7 @@ public class ExperimentRegistry {
         return null;
     }
 
-    public List<DataObjectType> getExperimentOutputs(String expId) throws RegistryException
{
+    public List<OutputDataObjectType> getExperimentOutputs(String expId) throws RegistryException
{
         try {
             ExperimentResource resource = gatewayResource.getExperiment(expId);
             List<ExperimentOutputResource> experimentOutputs = resource.getExperimentOutputs();
@@ -2095,7 +2097,7 @@ public class ExperimentRegistry {
         }
     }
 
-    public List<DataObjectType> getNodeOutputs(String nodeId) throws RegistryException
{
+    public List<OutputDataObjectType> getNodeOutputs(String nodeId) throws RegistryException
{
         try {
             ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
             WorkflowNodeDetailResource workflowNode = resource.getWorkflowNode(nodeId);
@@ -2128,7 +2130,7 @@ public class ExperimentRegistry {
         }
     }
     
-    public List<DataObjectType> getApplicationOutputs(String taskId) throws RegistryException
{
+    public List<OutputDataObjectType> getApplicationOutputs(String taskId) throws RegistryException
{
         try {
             ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
             WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f9fdf53e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
index 71de056..a76bb5d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
@@ -23,6 +23,7 @@ package org.apache.airavata.persistance.registry.jpa.impl;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
@@ -130,7 +131,7 @@ public class RegistryImpl implements Registry {
                 case EXPERIMENT_CONFIGURATION_DATA:
                     return experimentRegistry.addUserConfigData((UserConfigurationData) newObjectToAdd,
(String) dependentIdentifier);
                 case EXPERIMENT_OUTPUT:
-                    return experimentRegistry.addExpOutputs((List<DataObjectType>)
newObjectToAdd, (String) dependentIdentifier);
+                    return experimentRegistry.addExpOutputs((List<OutputDataObjectType>)
newObjectToAdd, (String) dependentIdentifier);
                 case EXPERIMENT_STATUS:
                     return experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToAdd,
(String) dependentIdentifier);
                 case WORKFLOW_NODE_DETAIL:
@@ -138,11 +139,11 @@ public class RegistryImpl implements Registry {
                 case WORKFLOW_NODE_STATUS:
                     return experimentRegistry.addWorkflowNodeStatus((WorkflowNodeStatus)
newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
                 case NODE_OUTPUT:
-                    return experimentRegistry.addNodeOutputs((List<DataObjectType>)
newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                    return experimentRegistry.addNodeOutputs((List<OutputDataObjectType>)
newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
                 case TASK_DETAIL:
                     return experimentRegistry.addTaskDetails((TaskDetails) newObjectToAdd,
(String) dependentIdentifier);
                 case APPLICATION_OUTPUT:
-                    return experimentRegistry.addApplicationOutputs((List<DataObjectType>)
newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                    return experimentRegistry.addApplicationOutputs((List<OutputDataObjectType>)
newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
                 case TASK_STATUS:
                     return experimentRegistry.addTaskStatus((TaskStatus) newObjectToAdd,
(CompositeIdentifier) dependentIdentifier);
                 case JOB_DETAIL:
@@ -201,7 +202,7 @@ public class RegistryImpl implements Registry {
                     experimentRegistry.updateUserConfigData((UserConfigurationData) newObjectToUpdate,
(String) identifier);
                     break;
                 case EXPERIMENT_OUTPUT:
-                    experimentRegistry.updateExpOutputs((List<DataObjectType>) newObjectToUpdate,
(String) identifier);
+                    experimentRegistry.updateExpOutputs((List<OutputDataObjectType>)
newObjectToUpdate, (String) identifier);
                     break;
                 case EXPERIMENT_STATUS:
                     experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToUpdate,
(String) identifier);
@@ -213,13 +214,13 @@ public class RegistryImpl implements Registry {
                     experimentRegistry.updateWorkflowNodeStatus((WorkflowNodeStatus) newObjectToUpdate,
(String) identifier);
                     break;
                 case NODE_OUTPUT:
-                    experimentRegistry.updateNodeOutputs((List<DataObjectType>) newObjectToUpdate,
(String) identifier);
+                    experimentRegistry.updateNodeOutputs((List<OutputDataObjectType>)
newObjectToUpdate, (String) identifier);
                     break;
                 case TASK_DETAIL:
                     experimentRegistry.updateTaskDetails((TaskDetails) newObjectToUpdate,
(String) identifier);
                     break;
                 case APPLICATION_OUTPUT:
-                    experimentRegistry.updateAppOutputs((List<DataObjectType>) newObjectToUpdate,
(String) identifier);
+                    experimentRegistry.updateAppOutputs((List<OutputDataObjectType>)
newObjectToUpdate, (String) identifier);
                     break;
                 case TASK_STATUS:
                     experimentRegistry.updateTaskStatus((TaskStatus) newObjectToUpdate, (String)
identifier);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f9fdf53e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
index 775518b..306bd3f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
@@ -24,6 +24,9 @@ package org.apache.airavata.persistance.registry.jpa.utils;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.model.workspace.experiment.ActionableGroup;
 import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
@@ -31,9 +34,7 @@ import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling
 import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.DataObjectType;
 import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
-import org.apache.airavata.model.workspace.experiment.DataType;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;
 import org.apache.airavata.model.workspace.experiment.ErrorDetails;
 import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
@@ -178,62 +179,72 @@ public class ThriftDataModelConversion {
         return null;
     }
 
-    public static DataObjectType getInputOutput(Object object){
+    public static InputDataObjectType getInput(Object object){
         if (object != null){
-            DataObjectType dataObjectType = new DataObjectType();
+            InputDataObjectType dataObjectType = new InputDataObjectType();
             if (object instanceof  ExperimentInputResource){
                 ExperimentInputResource expInput = (ExperimentInputResource) object;
-                dataObjectType.setKey(expInput.getExperimentKey());
+                dataObjectType.setName(expInput.getExperimentKey());
                 dataObjectType.setValue(expInput.getValue());
                 if (expInput.getInputType() != null){
                     dataObjectType.setType(DataType.valueOf(expInput.getInputType()));
                 }
                 dataObjectType.setMetaData(expInput.getMetadata());
                 return dataObjectType;
-            }else if (object instanceof ExperimentOutputResource){
-                ExperimentOutputResource expOutput = (ExperimentOutputResource)object;
-                dataObjectType.setKey(expOutput.getExperimentKey());
-                dataObjectType.setValue(expOutput.getValue());
-                if (expOutput.getOutputType() != null){
-                    dataObjectType.setType(DataType.valueOf(expOutput.getOutputType()));
-                }
-                dataObjectType.setMetaData(expOutput.getMetadata());
-                return dataObjectType;
             }else if (object instanceof NodeInputResource){
                 NodeInputResource nodeInputResource = (NodeInputResource)object;
-                dataObjectType.setKey(nodeInputResource.getInputKey());
+                dataObjectType.setName(nodeInputResource.getInputKey());
                 dataObjectType.setValue(nodeInputResource.getValue());
                 if (nodeInputResource.getInputType() != null){
                     dataObjectType.setType(DataType.valueOf(nodeInputResource.getInputType()));
                 }
                 dataObjectType.setMetaData(nodeInputResource.getMetadata());
                 return dataObjectType;
-            }else if (object instanceof NodeOutputResource){
-                NodeOutputResource nodeOutputResource = (NodeOutputResource)object;
-                dataObjectType.setKey(nodeOutputResource.getOutputKey());
-                dataObjectType.setValue(nodeOutputResource.getValue());
-                if (nodeOutputResource.getOutputType() != null){
-                    dataObjectType.setType(DataType.valueOf(nodeOutputResource.getOutputType()));
-                }
-                dataObjectType.setMetaData(nodeOutputResource.getMetadata());
-                return dataObjectType;
             }else if (object instanceof ApplicationInputResource){
                 ApplicationInputResource inputResource = (ApplicationInputResource)object;
-                dataObjectType.setKey(inputResource.getInputKey());
+                dataObjectType.setName(inputResource.getInputKey());
                 dataObjectType.setValue(inputResource.getValue());
                 if (inputResource.getInputType() != null){
                     dataObjectType.setType(DataType.valueOf(inputResource.getInputType()));
                 }
                 dataObjectType.setMetaData(inputResource.getMetadata());
                 return dataObjectType;
+            }else {
+                return null;
+            }
+        }
+        return null;
+    }
+
+    public static OutputDataObjectType getOutput(Object object){
+        if (object != null){
+            OutputDataObjectType dataObjectType = new OutputDataObjectType();
+            if (object instanceof ExperimentOutputResource){
+                ExperimentOutputResource expOutput = (ExperimentOutputResource)object;
+                dataObjectType.setName(expOutput.getExperimentKey());
+                dataObjectType.setValue(expOutput.getValue());
+                if (expOutput.getOutputType() != null){
+                    dataObjectType.setType(DataType.valueOf(expOutput.getOutputType()));
+                }
+//                dataObjectType.setMetaData(expOutput.getMetadata());
+                return dataObjectType;
+            }else if (object instanceof NodeOutputResource){
+                NodeOutputResource nodeOutputResource = (NodeOutputResource)object;
+                dataObjectType.setName(nodeOutputResource.getOutputKey());
+                dataObjectType.setValue(nodeOutputResource.getValue());
+                if (nodeOutputResource.getOutputType() != null){
+                    dataObjectType.setType(DataType.valueOf(nodeOutputResource.getOutputType()));
+                }
+//                dataObjectType.setMetaData(nodeOutputResource.getMetadata());
+                return dataObjectType;
             }else if (object instanceof ApplicationOutputResource){
                 ApplicationOutputResource outputResource = (ApplicationOutputResource)object;
-                dataObjectType.setKey(outputResource.getOutputKey());
+                dataObjectType.setName(outputResource.getOutputKey());
                 dataObjectType.setValue(outputResource.getValue());
                 if (outputResource.getOutputType() != null){
                     dataObjectType.setType(DataType.valueOf(outputResource.getOutputType()));
                 }
-                dataObjectType.setMetaData(outputResource.getMetadata());
+//                dataObjectType.setMetaData(outputResource.getMetadata());
                 return dataObjectType;
             }else {
                 return null;
@@ -242,66 +253,66 @@ public class ThriftDataModelConversion {
         return null;
     }
 
-    public static List<DataObjectType> getExpInputs (List<ExperimentInputResource>
exInputList){
-        List<DataObjectType> expInputs = new ArrayList<DataObjectType>();
+    public static List<InputDataObjectType> getExpInputs (List<ExperimentInputResource>
exInputList){
+        List<InputDataObjectType> expInputs = new ArrayList<InputDataObjectType>();
         if (exInputList != null && !exInputList.isEmpty()){
             for (ExperimentInputResource inputResource : exInputList){
-                DataObjectType exInput = getInputOutput(inputResource);
+                InputDataObjectType exInput = getInput(inputResource);
                 expInputs.add(exInput);
             }
         }
         return expInputs;
     }
 
-    public static List<DataObjectType> getExpOutputs (List<ExperimentOutputResource>
experimentOutputResourceList){
-        List<DataObjectType> exOutputs = new ArrayList<DataObjectType>();
+    public static List<OutputDataObjectType> getExpOutputs (List<ExperimentOutputResource>
experimentOutputResourceList){
+        List<OutputDataObjectType> exOutputs = new ArrayList<OutputDataObjectType>();
         if (experimentOutputResourceList != null && !experimentOutputResourceList.isEmpty()){
             for (ExperimentOutputResource outputResource : experimentOutputResourceList){
-                DataObjectType output = getInputOutput(outputResource);
+                OutputDataObjectType output = getOutput(outputResource);
                 exOutputs.add(output);
             }
         }
         return exOutputs;
     }
 
-    public static List<DataObjectType> getNodeInputs (List<NodeInputResource>
nodeInputResources){
-        List<DataObjectType> nodeInputs = new ArrayList<DataObjectType>();
+    public static List<InputDataObjectType> getNodeInputs (List<NodeInputResource>
nodeInputResources){
+        List<InputDataObjectType> nodeInputs = new ArrayList<InputDataObjectType>();
         if (nodeInputResources != null && !nodeInputResources.isEmpty()){
             for (NodeInputResource inputResource : nodeInputResources){
-                DataObjectType nodeInput = getInputOutput(inputResource);
+                InputDataObjectType nodeInput = getInput(inputResource);
                 nodeInputs.add(nodeInput);
             }
         }
         return nodeInputs;
     }
 
-    public static List<DataObjectType> getNodeOutputs (List<NodeOutputResource>
nodeOutputResourceList){
-        List<DataObjectType> nodeOutputs = new ArrayList<DataObjectType>();
+    public static List<OutputDataObjectType> getNodeOutputs (List<NodeOutputResource>
nodeOutputResourceList){
+        List<OutputDataObjectType> nodeOutputs = new ArrayList<OutputDataObjectType>();
         if (nodeOutputResourceList != null && !nodeOutputResourceList.isEmpty()){
             for (NodeOutputResource outputResource : nodeOutputResourceList){
-                DataObjectType output = getInputOutput(outputResource);
+                OutputDataObjectType output = getOutput(outputResource);
                 nodeOutputs.add(output);
             }
         }
         return nodeOutputs;
     }
 
-    public static List<DataObjectType> getApplicationInputs (List<ApplicationInputResource>
applicationInputResources){
-        List<DataObjectType> appInputs = new ArrayList<DataObjectType>();
+    public static List<InputDataObjectType> getApplicationInputs (List<ApplicationInputResource>
applicationInputResources){
+        List<InputDataObjectType> appInputs = new ArrayList<InputDataObjectType>();
         if (applicationInputResources != null && !applicationInputResources.isEmpty()){
             for (ApplicationInputResource inputResource : applicationInputResources){
-                DataObjectType appInput = getInputOutput(inputResource);
+                InputDataObjectType appInput = getInput(inputResource);
                 appInputs.add(appInput);
             }
         }
         return appInputs;
     }
 
-    public static List<DataObjectType> getApplicationOutputs (List<ApplicationOutputResource>
outputResources){
-        List<DataObjectType> appOutputs = new ArrayList<DataObjectType>();
+    public static List<OutputDataObjectType> getApplicationOutputs (List<ApplicationOutputResource>
outputResources){
+        List<OutputDataObjectType> appOutputs = new ArrayList<OutputDataObjectType>();
         if (outputResources != null && !outputResources.isEmpty()){
             for (ApplicationOutputResource outputResource : outputResources){
-                DataObjectType output = getInputOutput(outputResource);
+                OutputDataObjectType output = getOutput(outputResource);
                 appOutputs.add(output);
             }
         }


Mime
View raw message