airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1419658 - /airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
Date Mon, 10 Dec 2012 18:50:43 GMT
Author: chathuri
Date: Mon Dec 10 18:50:43 2012
New Revision: 1419658

URL: http://svn.apache.org/viewvc?rev=1419658&view=rev
Log:
updating experiment data retriever

Modified:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java?rev=1419658&r1=1419657&r2=1419658&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
Mon Dec 10 18:50:43 2012
@@ -120,8 +120,12 @@ public class ExperimentDataRetriever {
         }
         WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(workflowInstanceData.getWorkflowInstance(),
rs.getString(10));
         WorkflowInstanceNodeData workflowInstanceNodeData = new WorkflowInstanceNodeData(workflowInstanceNode);
-        workflowInstanceNodeData.setInput(rs.getString(11));
-        workflowInstanceNodeData.setOutput(rs.getString(12));
+
+        String inputData = getStringValue(11, rs);
+        String outputData = getStringValue(12, rs);
+
+        workflowInstanceNodeData.setInput(inputData);
+        workflowInstanceNodeData.setOutput(outputData);
         workflowInstanceNodeData.setStatus(createExecutionStatus(rs.getString(16)), getTime(rs.getString(18)));
         workflowInstanceData.getNodeDataList().add(workflowInstanceNodeData);
     }
@@ -130,6 +134,13 @@ public class ExperimentDataRetriever {
        return status == null ? ExecutionStatus.UNKNOWN : ExecutionStatus.valueOf(status);
     }
 
+    private String getStringValue (int parameterNumber,  ResultSet rs) throws SQLException
{
+        Blob input = rs.getBlob(parameterNumber);
+        byte[] inputBytes = input.getBytes(1, (int) input.length());
+        String inputData = new String(inputBytes);
+        return inputData;
+    }
+
     private Date getTime (String date) throws ParseException {
         if (date != null){
             DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");



Mime
View raw message