airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [2/8] new datamodels for AIRAVATA-1017
Date Mon, 17 Feb 2014 19:29:59 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/a0c1cbde/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
index bd85c4d..09b417f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -269,89 +269,89 @@ public class Utils {
                     throw  new IllegalArgumentException("Object should be a Gateway Worker.");
                 }
             case EXPERIMENT_METADATA:
-                if (o instanceof  Experiment_Metadata){
-                    return createExperimentMetadata((Experiment_Metadata)o);
-                }else {
-                    logger.error("Object should be a Experiment MetaData.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment MetaData.");
-                }
+//                if (o instanceof  Experiment_Metadata){
+//                    return createExperimentMetadata((Experiment_Metadata)o);
+//                }else {
+//                    logger.error("Object should be a Experiment MetaData.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Experiment MetaData.");
+//                }
             case EXPERIMENT_CONFIG_DATA:
-                if (o instanceof  Experiment_Configuration_Data){
-                    return createExperimentConfigData((Experiment_Configuration_Data)o);
-                }else {
-                    logger.error("Object should be a Experiment Config data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment Config data.");
-                }
+//                if (o instanceof  Experiment_Configuration_Data){
+//                    return createExperimentConfigData((Experiment_Configuration_Data)o);
+//                }else {
+//                    logger.error("Object should be a Experiment Config data.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Experiment Config data.");
+//                }
             case EXPERIMENT_SUMMARY:
-                if (o instanceof  Experiment_Summary){
-                    return createExperimentSummary((Experiment_Summary)o);
-                }else {
-                    logger.error("Object should be a Experiment Summary data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment Summary data.");
-                }
+//                if (o instanceof  Experiment_Summary){
+//                    return createExperimentSummary((Experiment_Summary)o);
+//                }else {
+//                    logger.error("Object should be a Experiment Summary data.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Experiment Summary data.");
+//                }
             case EXPERIMENT_INPUT:
-                if (o instanceof  Experiment_Input){
-                    return createExperimentInput((Experiment_Input)o);
-                }else {
-                    logger.error("Object should be a Experiment input data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment input data.");
-                }
+//                if (o instanceof  Experiment_Input){
+//                    return createExperimentInput((Experiment_Input)o);
+//                }else {
+//                    logger.error("Object should be a Experiment input data.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Experiment input data.");
+//                }
             case EXPERIMENT_OUTPUT:
-                if (o instanceof  Experiment_Output){
-                    return createExperimentOutput((Experiment_Output)o);
-                }else {
-                    logger.error("Object should be a Experiment output data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment output data.");
-                }
+//                if (o instanceof  Experiment_Output){
+//                    return createExperimentOutput((Experiment_Output)o);
+//                }else {
+//                    logger.error("Object should be a Experiment output data.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Experiment output data.");
+//                }
             case WORKFLOW_DATA:
-                if (o instanceof  Workflow_Data){
-                    return createWorkflowData((Workflow_Data) o);
-                }else {
-                    logger.error("Object should be a Workflow Data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Workflow Data.");
-                }
+//                if (o instanceof  Workflow_Data){
+//                    return createWorkflowData((Workflow_Data) o);
+//                }else {
+//                    logger.error("Object should be a Workflow Data.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Workflow Data.");
+//                }
             case NODE_DATA:
-                if (o instanceof  Node_Data){
-                    return createNodeData((Node_Data) o);
-                }else {
-                    logger.error("Object should be a Node Data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Node Data.");
-                }
+//                if (o instanceof  Node_Data){
+//                    return createNodeData((Node_Data) o);
+//                }else {
+//                    logger.error("Object should be a Node Data.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Node Data.");
+//                }
             case GRAM_DATA:
-                if (o instanceof  Gram_Data){
-                    return createGramData((Gram_Data) o);
-                }else {
-                    logger.error("Object should be a Gram Data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Gram Data.");
-                }
+//                if (o instanceof  Gram_Data){
+//                    return createGramData((Gram_Data) o);
+//                }else {
+//                    logger.error("Object should be a Gram Data.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Gram Data.");
+//                }
             case EXECUTION_ERROR:
-                if (o instanceof Execution_Error){
-                    return createExecutionError((Execution_Error) o);
-                }else {
-                    logger.error("Object should be a Node Error type.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Node Error.");
-                }
+//                if (o instanceof Execution_Error){
+//                    return createExecutionError((Execution_Error) o);
+//                }else {
+//                    logger.error("Object should be a Node Error type.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a Node Error.");
+//                }
             case GFAC_JOB_DATA:
-                if (o instanceof GFac_Job_Data){
-                    return createGfacJobData((GFac_Job_Data) o);
-                }else {
-                    logger.error("Object should be a GFac Job Data type.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a GFac Job Data.");
-                }
+//                if (o instanceof GFac_Job_Data){
+//                    return createGfacJobData((GFac_Job_Data) o);
+//                }else {
+//                    logger.error("Object should be a GFac Job Data type.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a GFac Job Data.");
+//                }
             case GFAC_JOB_STATUS:
-                if (o instanceof GFac_Job_Status){
-                    return createGfacJobStatus((GFac_Job_Status) o);
-                }else {
-                    logger.error("Object should be a GFac Job Status type.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a GFac Job Status.");
-                }
+//                if (o instanceof GFac_Job_Status){
+//                    return createGfacJobStatus((GFac_Job_Status) o);
+//                }else {
+//                    logger.error("Object should be a GFac Job Status type.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a GFac Job Status.");
+//                }
             case ORCHESTRATOR:
-            	if(o instanceof Orchestrator){
-            		return createOrchestratorData((Orchestrator)o);
-            	}else{
-            		 logger.error("Object should be orchestrator data.", new IllegalArgumentException());
-                     throw new IllegalArgumentException("Object should be orchestrator data.");
-            	}
+//            	if(o instanceof Orchestrator){
+//            		return createOrchestratorData((Orchestrator)o);
+//            	}else{
+//            		 logger.error("Object should be orchestrator data.", new IllegalArgumentException());
+//                     throw new IllegalArgumentException("Object should be orchestrator data.");
+//            	}
             default:
         }
         return null;
@@ -547,206 +547,206 @@ public class Utils {
 //        return experimentDataResource;
 //    }
 
-    private static Resource createExperimentConfigData(Experiment_Configuration_Data o){
-        ExperimentConfigDataResource exConfigDataResource = new ExperimentConfigDataResource();
-        ExperimentMetadataResource experimentMetadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
-        exConfigDataResource.setExMetadata(experimentMetadata);
-        exConfigDataResource.setAiravataAutoSchedule(o.isAiravata_auto_schedule());
-        exConfigDataResource.setCleanAfterJob(o.isClean_after_job());
-        exConfigDataResource.setCpuCount(o.getTotal_cpu_count());
-        exConfigDataResource.setDataRegURL(o.getData_reg_url());
-        exConfigDataResource.setJobStartTime(o.getJob_start_time());
-        exConfigDataResource.setNodeCount(o.getNode_count());
-        exConfigDataResource.setNumberOfThreads(o.getNumber_of_threads());
-        exConfigDataResource.setOutputDataDir(o.getOutput_data_dir());
-        exConfigDataResource.setOverrideManualSchedule(o.isOverride_manual_schedule());
-        exConfigDataResource.setPersistOutputData(o.isPersist_output_data());
-        exConfigDataResource.setPhysicalMemory(o.getTotal_physical_memory());
-        exConfigDataResource.setProjectAccount(o.getComputational_project_account());
-        exConfigDataResource.setQueueName(o.getQueue_name());
-        exConfigDataResource.setResourceHostID(o.getResource_host_id());
-        exConfigDataResource.setStageInputsToWDir(o.isStage_input_files_to_working_dir());
-        exConfigDataResource.setWallTimeLimit(o.getWalltime_limit());
-        exConfigDataResource.setOverrideManualSchedule(o.isOverride_manual_schedule());
-        exConfigDataResource.setWorkingDir(o.getUnique_working_dir());
-        exConfigDataResource.setWorkingDirParent(o.getWorking_dir_parent());
-        exConfigDataResource.setApplicationID(o.getApplication_id());
-        exConfigDataResource.setApplicationVersion(o.getApplication_version());
-        exConfigDataResource.setWorkflowTemplateId(o.getWorkflow_template_id());
-        exConfigDataResource.setWorkflowTemplateVersion(o.getWorkflow_template_version());
-        exConfigDataResource.setStartExecutionAt(o.getStart_execution_at());
-        exConfigDataResource.setExecuteBefore(o.getExecute_before());
-        exConfigDataResource.setNumberOfRetries(o.getNumber_of_retries());
-        return exConfigDataResource;
-    }
+//    private static Resource createExperimentConfigData(Experiment_Configuration_Data o){
+//        ExperimentConfigDataResource exConfigDataResource = new ExperimentConfigDataResource();
+//        ExperimentMetadataResource experimentMetadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+//        exConfigDataResource.setExMetadata(experimentMetadata);
+//        exConfigDataResource.setAiravataAutoSchedule(o.isAiravata_auto_schedule());
+//        exConfigDataResource.setCleanAfterJob(o.isClean_after_job());
+//        exConfigDataResource.setCpuCount(o.getTotal_cpu_count());
+//        exConfigDataResource.setDataRegURL(o.getData_reg_url());
+//        exConfigDataResource.setJobStartTime(o.getJob_start_time());
+//        exConfigDataResource.setNodeCount(o.getNode_count());
+//        exConfigDataResource.setNumberOfThreads(o.getNumber_of_threads());
+//        exConfigDataResource.setOutputDataDir(o.getOutput_data_dir());
+//        exConfigDataResource.setOverrideManualSchedule(o.isOverride_manual_schedule());
+//        exConfigDataResource.setPersistOutputData(o.isPersist_output_data());
+//        exConfigDataResource.setPhysicalMemory(o.getTotal_physical_memory());
+//        exConfigDataResource.setProjectAccount(o.getComputational_project_account());
+//        exConfigDataResource.setQueueName(o.getQueue_name());
+//        exConfigDataResource.setResourceHostID(o.getResource_host_id());
+//        exConfigDataResource.setStageInputsToWDir(o.isStage_input_files_to_working_dir());
+//        exConfigDataResource.setWallTimeLimit(o.getWalltime_limit());
+//        exConfigDataResource.setOverrideManualSchedule(o.isOverride_manual_schedule());
+//        exConfigDataResource.setWorkingDir(o.getUnique_working_dir());
+//        exConfigDataResource.setWorkingDirParent(o.getWorking_dir_parent());
+//        exConfigDataResource.setApplicationID(o.getApplication_id());
+//        exConfigDataResource.setApplicationVersion(o.getApplication_version());
+//        exConfigDataResource.setWorkflowTemplateId(o.getWorkflow_template_id());
+//        exConfigDataResource.setWorkflowTemplateVersion(o.getWorkflow_template_version());
+//        exConfigDataResource.setStartExecutionAt(o.getStart_execution_at());
+//        exConfigDataResource.setExecuteBefore(o.getExecute_before());
+//        exConfigDataResource.setNumberOfRetries(o.getNumber_of_retries());
+//        return exConfigDataResource;
+//    }
 
     /**
      *
      * @param o Experiment MetaData model object
      * @return Experiment MetaData resource object
      */
-    private static Resource createExperimentMetadata(Experiment_Metadata o) {
-        ExperimentMetadataResource experimentMetadataResource = new ExperimentMetadataResource();
-        experimentMetadataResource.setExpID(o.getExperiment_id());
-        experimentMetadataResource.setDescription(o.getDescription());
-        Gateway_Worker gw = new Gateway_Worker();
-        gw.setGateway(o.getGateway());
-        experimentMetadataResource.setExecutionUser(o.getExecution_user());
-        experimentMetadataResource.setShareExp(o.isShare_experiment());
-        experimentMetadataResource.setSubmittedDate(o.getSubmitted_date());
-        GatewayResource gResource = (GatewayResource)createGateway(o.getGateway());
-        experimentMetadataResource.setGateway(gResource);
-        ProjectResource pResource = (ProjectResource)createProject(o.getProject());
-        experimentMetadataResource.setProject(pResource);
-        experimentMetadataResource.setExperimentName(o.getExperiment_name());
-        return experimentMetadataResource;
-    }
+//    private static Resource createExperimentMetadata(Experiment_Metadata o) {
+//        ExperimentMetadataResource experimentMetadataResource = new ExperimentMetadataResource();
+//        experimentMetadataResource.setExpID(o.getExperiment_id());
+//        experimentMetadataResource.setDescription(o.getDescription());
+//        Gateway_Worker gw = new Gateway_Worker();
+//        gw.setGateway(o.getGateway());
+//        experimentMetadataResource.setExecutionUser(o.getExecution_user());
+//        experimentMetadataResource.setShareExp(o.isShare_experiment());
+//        experimentMetadataResource.setSubmittedDate(o.getSubmitted_date());
+//        GatewayResource gResource = (GatewayResource)createGateway(o.getGateway());
+//        experimentMetadataResource.setGateway(gResource);
+//        ProjectResource pResource = (ProjectResource)createProject(o.getProject());
+//        experimentMetadataResource.setProject(pResource);
+//        experimentMetadataResource.setExperimentName(o.getExperiment_name());
+//        return experimentMetadataResource;
+//    }
 
-    private static Resource createExperimentSummary (Experiment_Summary o){
-        ExperimentSummaryResource summaryResource = new ExperimentSummaryResource();
-        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
-        summaryResource.setExperimentMetadataResource(metadata);
-        summaryResource.setLastUpdateTime(o.getLast_update_time());
-        summaryResource.setStatus(o.getStatus());
-        return summaryResource;
-    }
+//    private static Resource createExperimentSummary (Experiment_Summary o){
+//        ExperimentSummaryResource summaryResource = new ExperimentSummaryResource();
+//        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+//        summaryResource.setExperimentMetadataResource(metadata);
+//        summaryResource.setLastUpdateTime(o.getLast_update_time());
+//        summaryResource.setStatus(o.getStatus());
+//        return summaryResource;
+//    }
 
-    private static Resource createExperimentInput (Experiment_Input o){
-        ExperimentInputResource eInputResource = new ExperimentInputResource();
-        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
-        eInputResource.setExperimentMetadataResource(metadata);
-        eInputResource.setExperimentKey(o.getEx_key());
-        eInputResource.setValue(o.getValue());
-        return eInputResource;
-    }
+//    private static Resource createExperimentInput (Experiment_Input o){
+//        ExperimentInputResource eInputResource = new ExperimentInputResource();
+//        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+//        eInputResource.setExperimentMetadataResource(metadata);
+//        eInputResource.setExperimentKey(o.getEx_key());
+//        eInputResource.setValue(o.getValue());
+//        return eInputResource;
+//    }
 
-    private static Resource createExperimentOutput (Experiment_Output o){
-        ExperimentOutputResource eOutputResource = new ExperimentOutputResource();
-        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
-        eOutputResource.setExperimentMetadataResource(metadata);
-        eOutputResource.setExperimentKey(o.getEx_key());
-        eOutputResource.setValue(o.getValue());
-        return eOutputResource;
-    }
+//    private static Resource createExperimentOutput (Experiment_Output o){
+//        ExperimentOutputResource eOutputResource = new ExperimentOutputResource();
+//        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+//        eOutputResource.setExperimentMetadataResource(metadata);
+//        eOutputResource.setExperimentKey(o.getEx_key());
+//        eOutputResource.setValue(o.getValue());
+//        return eOutputResource;
+//    }
 
     /**
      *
      * @param o  Workflow_Data model object
      * @return  WorkflowDataResource object
      */
-    private static Resource createWorkflowData(Workflow_Data o){
-        WorkflowDataResource workflowDataResource = new WorkflowDataResource();
-        workflowDataResource.setExperimentID(o.getExperiment_data().getExperiment_id());
-        workflowDataResource.setWorkflowInstanceID(o.getWorkflow_instanceID());
-        workflowDataResource.setTemplateName(o.getTemplate_name());
-        workflowDataResource.setStatus(o.getStatus());
-        workflowDataResource.setStartTime(o.getStart_time());
-        workflowDataResource.setLastUpdatedTime(o.getLast_update_time());
-        return workflowDataResource;
-    }
+//    private static Resource createWorkflowData(Workflow_Data o){
+//        WorkflowDataResource workflowDataResource = new WorkflowDataResource();
+//        workflowDataResource.setExperimentID(o.getExperiment_data().getExperiment_id());
+//        workflowDataResource.setWorkflowInstanceID(o.getWorkflow_instanceID());
+//        workflowDataResource.setTemplateName(o.getTemplate_name());
+//        workflowDataResource.setStatus(o.getStatus());
+//        workflowDataResource.setStartTime(o.getStart_time());
+//        workflowDataResource.setLastUpdatedTime(o.getLast_update_time());
+//        return workflowDataResource;
+//    }
 
     /**
      *
      * @param o  Node_Data model object
      * @return Node Data resource
      */
-    private static Resource createNodeData (Node_Data o){
-        NodeDataResource nodeDataResource = new NodeDataResource();
-        WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
-        nodeDataResource.setWorkflowDataResource(workflowDataResource);
-        nodeDataResource.setNodeID(o.getNode_id());
-        nodeDataResource.setNodeType(o.getNode_type());
-        if (o.getInputs()!=null) {
-			nodeDataResource.setInputs(new String(o.getInputs()));
-		}
-		if (o.getOutputs()!=null) {
-			nodeDataResource.setOutputs(new String(o.getOutputs()));
-		}
-		nodeDataResource.setStatus(o.getStatus());
-        nodeDataResource.setStartTime(o.getStart_time());
-        nodeDataResource.setLastUpdateTime(o.getLast_update_time());
-        nodeDataResource.setExecutionIndex(o.getExecution_index());
-        return nodeDataResource;
-    }
+//    private static Resource createNodeData (Node_Data o){
+//        NodeDataResource nodeDataResource = new NodeDataResource();
+//        WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
+//        nodeDataResource.setWorkflowDataResource(workflowDataResource);
+//        nodeDataResource.setNodeID(o.getNode_id());
+//        nodeDataResource.setNodeType(o.getNode_type());
+//        if (o.getInputs()!=null) {
+//			nodeDataResource.setInputs(new String(o.getInputs()));
+//		}
+//		if (o.getOutputs()!=null) {
+//			nodeDataResource.setOutputs(new String(o.getOutputs()));
+//		}
+//		nodeDataResource.setStatus(o.getStatus());
+//        nodeDataResource.setStartTime(o.getStart_time());
+//        nodeDataResource.setLastUpdateTime(o.getLast_update_time());
+//        nodeDataResource.setExecutionIndex(o.getExecution_index());
+//        return nodeDataResource;
+//    }
 
     /**
      *
      * @param o GramData model object
      * @return GramData Resource object
      */
-    private static Resource createGramData (Gram_Data o){
-        GramDataResource gramDataResource = new GramDataResource();
-        WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
-        gramDataResource.setWorkflowDataResource(workflowDataResource);
-        gramDataResource.setNodeID(o.getNode_id());
-        gramDataResource.setRsl(new String(o.getRsl()));
-        gramDataResource.setInvokedHost(o.getInvoked_host());
-        gramDataResource.setLocalJobID(o.getLocal_Job_ID());
-        return gramDataResource;
-    }
+//    private static Resource createGramData (Gram_Data o){
+//        GramDataResource gramDataResource = new GramDataResource();
+//        WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
+//        gramDataResource.setWorkflowDataResource(workflowDataResource);
+//        gramDataResource.setNodeID(o.getNode_id());
+//        gramDataResource.setRsl(new String(o.getRsl()));
+//        gramDataResource.setInvokedHost(o.getInvoked_host());
+//        gramDataResource.setLocalJobID(o.getLocal_Job_ID());
+//        return gramDataResource;
+//    }
 
-    private static Resource createExecutionError(Execution_Error o){
-        ExecutionErrorResource executionErrorResource = new ExecutionErrorResource();
-        ExperimentMetadataResource experimentDataResource = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_MetaData());
-        executionErrorResource.setMetadataResource(experimentDataResource);
-        WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
-        executionErrorResource.setWorkflowDataResource(workflowDataResource);
-        executionErrorResource.setNodeID(o.getNode_id());
-        executionErrorResource.setErrorID(o.getError_id());
-        executionErrorResource.setGfacJobID(o.getGfacJobID());
-        executionErrorResource.setSourceType(o.getSource_type());
-        executionErrorResource.setErrorTime(o.getError_date());
-        executionErrorResource.setErrorMsg(o.getError_msg());
-        executionErrorResource.setErrorDes(o.getError_des());
-        executionErrorResource.setErrorCode(o.getError_code());
-        executionErrorResource.setErrorReporter(o.getError_reporter());
-        executionErrorResource.setErrorLocation(o.getError_location());
-        executionErrorResource.setActionTaken(o.getAction_taken());
-        executionErrorResource.setErrorReference(o.getError_reference());
-        return executionErrorResource;
-    }
+//    private static Resource createExecutionError(Execution_Error o){
+//        ExecutionErrorResource executionErrorResource = new ExecutionErrorResource();
+//        ExperimentMetadataResource experimentDataResource = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_MetaData());
+//        executionErrorResource.setMetadataResource(experimentDataResource);
+//        WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
+//        executionErrorResource.setWorkflowDataResource(workflowDataResource);
+//        executionErrorResource.setNodeID(o.getNode_id());
+//        executionErrorResource.setErrorID(o.getError_id());
+//        executionErrorResource.setGfacJobID(o.getGfacJobID());
+//        executionErrorResource.setSourceType(o.getSource_type());
+//        executionErrorResource.setErrorTime(o.getError_date());
+//        executionErrorResource.setErrorMsg(o.getError_msg());
+//        executionErrorResource.setErrorDes(o.getError_des());
+//        executionErrorResource.setErrorCode(o.getError_code());
+//        executionErrorResource.setErrorReporter(o.getError_reporter());
+//        executionErrorResource.setErrorLocation(o.getError_location());
+//        executionErrorResource.setActionTaken(o.getAction_taken());
+//        executionErrorResource.setErrorReference(o.getError_reference());
+//        return executionErrorResource;
+//    }
 
-    private static Resource createGfacJobData (GFac_Job_Data o){
-        GFacJobDataResource gFacJobDataResource = new GFacJobDataResource();
-        ExperimentMetadataResource experimentDataResource = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
-        WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
-        gFacJobDataResource.setMetadataResource(experimentDataResource);
-        gFacJobDataResource.setWorkflowDataResource(workflowDataResource);
-        gFacJobDataResource.setNodeID(o.getNode_id());
-        gFacJobDataResource.setApplicationDescID(o.getApplication_descriptor_ID());
-        gFacJobDataResource.setServiceDescID(o.getService_descriptor_ID());
-        gFacJobDataResource.setHostDescID(o.getHost_descriptor_ID());
-        gFacJobDataResource.setJobData(o.getJob_data());
-        gFacJobDataResource.setLocalJobID(o.getLocal_Job_ID());
-        gFacJobDataResource.setSubmittedTime(o.getSubmitted_time());
-        gFacJobDataResource.setStatusUpdateTime(o.getStatus_update_time());
-        gFacJobDataResource.setStatus(o.getStatus());
-        gFacJobDataResource.setMetadata(o.getMetadata());
-        return gFacJobDataResource;
-    }
+//    private static Resource createGfacJobData (GFac_Job_Data o){
+//        GFacJobDataResource gFacJobDataResource = new GFacJobDataResource();
+//        ExperimentMetadataResource experimentDataResource = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+//        WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
+//        gFacJobDataResource.setMetadataResource(experimentDataResource);
+//        gFacJobDataResource.setWorkflowDataResource(workflowDataResource);
+//        gFacJobDataResource.setNodeID(o.getNode_id());
+//        gFacJobDataResource.setApplicationDescID(o.getApplication_descriptor_ID());
+//        gFacJobDataResource.setServiceDescID(o.getService_descriptor_ID());
+//        gFacJobDataResource.setHostDescID(o.getHost_descriptor_ID());
+//        gFacJobDataResource.setJobData(o.getJob_data());
+//        gFacJobDataResource.setLocalJobID(o.getLocal_Job_ID());
+//        gFacJobDataResource.setSubmittedTime(o.getSubmitted_time());
+//        gFacJobDataResource.setStatusUpdateTime(o.getStatus_update_time());
+//        gFacJobDataResource.setStatus(o.getStatus());
+//        gFacJobDataResource.setMetadata(o.getMetadata());
+//        return gFacJobDataResource;
+//    }
 
-    private static Resource createGfacJobStatus(GFac_Job_Status o) {
-        GFacJobStatusResource gFacJobStatusResource = new GFacJobStatusResource();
-        gFacJobStatusResource.setLocalJobID(o.getLocal_Job_ID());
-        gFacJobStatusResource.setStatus(o.getStatus());
-        gFacJobStatusResource.setStatusUpdateTime(o.getStatus_update_time());
-        GFacJobDataResource gFacJobDataResource = (GFacJobDataResource)createGfacJobData(o.getgFac_job_data());
-        gFacJobStatusResource.setgFacJobDataResource(gFacJobDataResource);
-        return gFacJobStatusResource;
-    }
+//    private static Resource createGfacJobStatus(GFac_Job_Status o) {
+//        GFacJobStatusResource gFacJobStatusResource = new GFacJobStatusResource();
+//        gFacJobStatusResource.setLocalJobID(o.getLocal_Job_ID());
+//        gFacJobStatusResource.setStatus(o.getStatus());
+//        gFacJobStatusResource.setStatusUpdateTime(o.getStatus_update_time());
+//        GFacJobDataResource gFacJobDataResource = (GFacJobDataResource)createGfacJobData(o.getgFac_job_data());
+//        gFacJobStatusResource.setgFacJobDataResource(gFacJobDataResource);
+//        return gFacJobStatusResource;
+//    }
 
-    private static Resource createOrchestratorData(Orchestrator data){
-    	OrchestratorDataResource dataResource = new OrchestratorDataResource();
-    	dataResource.setExperimentID(data.getExperiment_ID());
-    	dataResource.setUserName(data.getUserName());
-    	dataResource.setApplicationName(data.getApplicationName());
-    	dataResource.setStatus(data.getStatus());
-    	dataResource.setGfacEPR(data.getGfacEPR());
-    	dataResource.setJobRequest(data.getJobRequest());
-    	dataResource.setSubmittedTime(data.getSubmittedTime());
-    	dataResource.setStatusUpdateTime(data.getStatusUpdateTime());
-    	return dataResource;
-    }
+//    private static Resource createOrchestratorData(Orchestrator data){
+//    	OrchestratorDataResource dataResource = new OrchestratorDataResource();
+//    	dataResource.setExperimentID(data.getExperiment_ID());
+//    	dataResource.setUserName(data.getUserName());
+//    	dataResource.setApplicationName(data.getApplicationName());
+//    	dataResource.setStatus(data.getStatus());
+//    	dataResource.setGfacEPR(data.getGfacEPR());
+//    	dataResource.setJobRequest(data.getJobRequest());
+//    	dataResource.setSubmittedTime(data.getSubmittedTime());
+//    	dataResource.setStatusUpdateTime(data.getStatusUpdateTime());
+//    	return dataResource;
+//    }
 //    public static byte[] getByteArray(String content){
 //        byte[] contentBytes = content.getBytes();
 //        return contentBytes;

http://git-wip-us.apache.org/repos/asf/airavata/blob/a0c1cbde/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
index 32e8941..5f5467f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
@@ -79,10 +79,10 @@ public class WorkerResource extends AbstractResource {
 				result=userWorkflowResource;
                 break;
             case EXPERIMENT_METADATA:
-                ExperimentMetadataResource experimentResource = new ExperimentMetadataResource();
-                experimentResource.setExecutionUser(user);
-                experimentResource.setGateway(gateway);
-                result=experimentResource;
+//                ExperimentMetadataResource experimentResource = new ExperimentMetadataResource();
+//                experimentResource.setExecutionUser(user);
+//                experimentResource.setGateway(gateway);
+//                result=experimentResource;
                 break;
 			default:
                 logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
@@ -167,28 +167,28 @@ public class WorkerResource extends AbstractResource {
                 result= Utils.getResource(ResourceType.USER_WORKFLOW, userWorkflow);
 	            break;
 			case EXPERIMENT_METADATA:
-                generator = new QueryGenerator(EXPERIMENT_METADATA);
-                generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
-                q = generator.selectQuery(em);
-	            Experiment_Metadata experiment = (Experiment_Metadata) q.getSingleResult();
-                result= Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
-				break;
+//                generator = new QueryGenerator(EXPERIMENT_METADATA);
+//                generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
+//                q = generator.selectQuery(em);
+//	            Experiment_Metadata experiment = (Experiment_Metadata) q.getSingleResult();
+//                result= Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
+//				break;
 			case WORKFLOW_DATA:
-                generator = new QueryGenerator(WORKFLOW_DATA);
-                generator.setParameter(WorkflowDataConstants.WORKFLOW_INSTANCE_ID, name);
-                q = generator.selectQuery(em);
-                Workflow_Data eworkflowData = (Workflow_Data)q.getSingleResult();
-                WorkflowDataResource workflowDataResource = (WorkflowDataResource)Utils.getResource(ResourceType.WORKFLOW_DATA, eworkflowData);
-                result= workflowDataResource;
-                break;
+//                generator = new QueryGenerator(WORKFLOW_DATA);
+//                generator.setParameter(WorkflowDataConstants.WORKFLOW_INSTANCE_ID, name);
+//                q = generator.selectQuery(em);
+//                Workflow_Data eworkflowData = (Workflow_Data)q.getSingleResult();
+//                WorkflowDataResource workflowDataResource = (WorkflowDataResource)Utils.getResource(ResourceType.WORKFLOW_DATA, eworkflowData);
+//                result= workflowDataResource;
+//                break;
             case GFAC_JOB_DATA:
-                generator = new QueryGenerator(GFAC_JOB_DATA);
-                generator.setParameter(GFacJobDataConstants.LOCAL_JOB_ID, name);
-                q = generator.selectQuery(em);
-                GFac_Job_Data gFacJobData = (GFac_Job_Data)q.getSingleResult();
-                GFacJobDataResource gFacJobDataResource = (GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFacJobData);
-                result= gFacJobDataResource;
-                break;
+//                generator = new QueryGenerator(GFAC_JOB_DATA);
+//                generator.setParameter(GFacJobDataConstants.LOCAL_JOB_ID, name);
+//                q = generator.selectQuery(em);
+//                GFac_Job_Data gFacJobData = (GFac_Job_Data)q.getSingleResult();
+//                GFacJobDataResource gFacJobDataResource = (GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFacJobData);
+//                result= gFacJobDataResource;
+//                break;
 			default:
                 logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
                 break;
@@ -198,43 +198,43 @@ public class WorkerResource extends AbstractResource {
 		return result;
 	}
 	
-	public List<GFacJobDataResource> getGFacJobs(String serviceDescriptionId, String hostDescriptionId, String applicationDescriptionId){
-		List<GFacJobDataResource> result = new ArrayList<GFacJobDataResource>();
-        EntityManager em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        QueryGenerator generator;
-        Query q;
-        generator = new QueryGenerator(GFAC_JOB_DATA);
-        generator.setParameter(GFacJobDataConstants.SERVICE_DESC_ID, serviceDescriptionId);
-        generator.setParameter(GFacJobDataConstants.HOST_DESC_ID, hostDescriptionId);
-        generator.setParameter(GFacJobDataConstants.APP_DESC_ID, applicationDescriptionId);
-        q = generator.selectQuery(em);
-        for (Object o : q.getResultList()) {
-            GFac_Job_Data gFacJobData = (GFac_Job_Data)o;
-            result.add((GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFacJobData));
-        }
-        em.getTransaction().commit();
-        em.close();
-		return result;
-	}
-	
-	public List<GFacJobStatusResource> getGFacJobStatuses(String jobId){
-		List<GFacJobStatusResource> resourceList = new ArrayList<GFacJobStatusResource>();
-        EntityManager em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        QueryGenerator generator;
-        Query q;
-        generator = new QueryGenerator(GFAC_JOB_STATUS);
-        generator.setParameter(GFacJobStatusConstants.LOCAL_JOB_ID, jobId);
-        q = generator.selectQuery(em);
-        for (Object result : q.getResultList()) {
-            GFac_Job_Status gFacJobStatus = (GFac_Job_Status) result;
-            GFacJobStatusResource gFacJobStatusResource =
-                    (GFacJobStatusResource)Utils.getResource(ResourceType.GFAC_JOB_STATUS, gFacJobStatus);
-            resourceList.add(gFacJobStatusResource);
-        }
-        return resourceList;
-	}
+//	public List<GFacJobDataResource> getGFacJobs(String serviceDescriptionId, String hostDescriptionId, String applicationDescriptionId){
+//		List<GFacJobDataResource> result = new ArrayList<GFacJobDataResource>();
+//        EntityManager em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+//        QueryGenerator generator;
+//        Query q;
+//        generator = new QueryGenerator(GFAC_JOB_DATA);
+//        generator.setParameter(GFacJobDataConstants.SERVICE_DESC_ID, serviceDescriptionId);
+//        generator.setParameter(GFacJobDataConstants.HOST_DESC_ID, hostDescriptionId);
+//        generator.setParameter(GFacJobDataConstants.APP_DESC_ID, applicationDescriptionId);
+//        q = generator.selectQuery(em);
+//        for (Object o : q.getResultList()) {
+//            GFac_Job_Data gFacJobData = (GFac_Job_Data)o;
+//            result.add((GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFacJobData));
+//        }
+//        em.getTransaction().commit();
+//        em.close();
+//		return result;
+//	}
+//
+//	public List<GFacJobStatusResource> getGFacJobStatuses(String jobId){
+//		List<GFacJobStatusResource> resourceList = new ArrayList<GFacJobStatusResource>();
+//        EntityManager em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+//        QueryGenerator generator;
+//        Query q;
+//        generator = new QueryGenerator(GFAC_JOB_STATUS);
+//        generator.setParameter(GFacJobStatusConstants.LOCAL_JOB_ID, jobId);
+//        q = generator.selectQuery(em);
+//        for (Object result : q.getResultList()) {
+//            GFac_Job_Status gFacJobStatus = (GFac_Job_Status) result;
+//            GFacJobStatusResource gFacJobStatusResource =
+//                    (GFacJobStatusResource)Utils.getResource(ResourceType.GFAC_JOB_STATUS, gFacJobStatus);
+//            resourceList.add(gFacJobStatusResource);
+//        }
+//        return resourceList;
+//	}
 
     /**
      *
@@ -275,16 +275,16 @@ public class WorkerResource extends AbstractResource {
 	            }
 	            break;
 			case EXPERIMENT_METADATA:
-                generator = new QueryGenerator(EXPERIMENT_METADATA);
-                generator.setParameter(ExperimentMetadataConstants.GATEWAY_NAME, gateway.getGatewayName());
-                generator.setParameter(ExperimentMetadataConstants.EXECUTION_USER, user);
-                q = generator.selectQuery(em);
-	            for (Object o : q.getResultList()) {
-	            	Experiment_Metadata experiment = (Experiment_Metadata) o;
-	            	ExperimentMetadataResource experimentResource = (ExperimentMetadataResource)Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
-		            result.add(experimentResource);
-	            }
-	            break;
+//                generator = new QueryGenerator(EXPERIMENT_METADATA);
+//                generator.setParameter(ExperimentMetadataConstants.GATEWAY_NAME, gateway.getGatewayName());
+//                generator.setParameter(ExperimentMetadataConstants.EXECUTION_USER, user);
+//                q = generator.selectQuery(em);
+//	            for (Object o : q.getResultList()) {
+//	            	Experiment_Metadata experiment = (Experiment_Metadata) o;
+//	            	ExperimentMetadataResource experimentResource = (ExperimentMetadataResource)Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
+//		            result.add(experimentResource);
+//	            }
+//	            break;
 			default:
                 logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
                 break;
@@ -476,26 +476,26 @@ public class WorkerResource extends AbstractResource {
      * @param name experiment name
      * @return experiment resource
      */
-    public ExperimentMetadataResource getExperiment(String name){
-		return (ExperimentMetadataResource)get(ResourceType.EXPERIMENT_METADATA, name);
-	}
-    
-    public GFacJobDataResource getGFacJob(String jobId){
-    	return (GFacJobDataResource)get(ResourceType.GFAC_JOB_DATA,jobId);
-    }
+//    public ExperimentMetadataResource getExperiment(String name){
+//		return (ExperimentMetadataResource)get(ResourceType.EXPERIMENT_METADATA, name);
+//	}
+//
+//    public GFacJobDataResource getGFacJob(String jobId){
+//    	return (GFacJobDataResource)get(ResourceType.GFAC_JOB_DATA,jobId);
+//    }
 
     /**
      *
      * @return list of experiments for the user
      */
-	public List<ExperimentMetadataResource> getExperiments(){
-		List<ExperimentMetadataResource> result=new ArrayList<ExperimentMetadataResource>();
-		List<Resource> list = get(ResourceType.EXPERIMENT_METADATA);
-		for (Resource resource : list) {
-			result.add((ExperimentMetadataResource) resource);
-		}
-		return result;
-	}
+//	public List<ExperimentMetadataResource> getExperiments(){
+//		List<ExperimentMetadataResource> result=new ArrayList<ExperimentMetadataResource>();
+//		List<Resource> list = get(ResourceType.EXPERIMENT_METADATA);
+//		for (Resource resource : list) {
+//			result.add((ExperimentMetadataResource) resource);
+//		}
+//		return result;
+//	}
 
     /**
      *

http://git-wip-us.apache.org/repos/asf/airavata/blob/a0c1cbde/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
index 23b9858..403a180 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
@@ -97,27 +97,27 @@ public class WorkflowDataResource extends AbstractResource{
     }
 
     public Resource create(ResourceType type) {
-       switch (type){
-           case NODE_DATA:
-               NodeDataResource nodeDataResource = new NodeDataResource();
-               nodeDataResource.setWorkflowDataResource(this);
-               return nodeDataResource;
-           case GRAM_DATA:
-               GramDataResource gramDataResource = new GramDataResource();
-               gramDataResource.setWorkflowDataResource(this);
-               return gramDataResource;
-           case EXECUTION_ERROR:
-               ExecutionErrorResource executionErrorResource = new ExecutionErrorResource();
-               executionErrorResource.setWorkflowDataResource(this);
-               return executionErrorResource;
-           case GFAC_JOB_DATA:
-               GFacJobDataResource gFacJobDataResource = new GFacJobDataResource();
-               gFacJobDataResource.setWorkflowDataResource(this);
-               return gFacJobDataResource;
-           default:
+//       switch (type){
+//           case NODE_DATA:
+////               NodeDataResource nodeDataResource = new NodeDataResource();
+////               nodeDataResource.setWorkflowDataResource(this);
+////               return nodeDataResource;
+//           case GRAM_DATA:
+//               GramDataResource gramDataResource = new GramDataResource();
+//               gramDataResource.setWorkflowDataResource(this);
+//               return gramDataResource;
+//           case EXECUTION_ERROR:
+//               ExecutionErrorResource executionErrorResource = new ExecutionErrorResource();
+//               executionErrorResource.setWorkflowDataResource(this);
+//               return executionErrorResource;
+//           case GFAC_JOB_DATA:
+//               GFacJobDataResource gFacJobDataResource = new GFacJobDataResource();
+//               gFacJobDataResource.setWorkflowDataResource(this);
+//               return gFacJobDataResource;
+//           default:
                logger.error("Unsupported resource type for workflow data resource.", new IllegalArgumentException());
                throw new IllegalArgumentException("Unsupported resource type for workflow data resource.");
-       }
+//       }
     }
 
     public void remove(ResourceType type, Object name) {
@@ -161,55 +161,55 @@ public class WorkflowDataResource extends AbstractResource{
     }
 
     public Resource get(ResourceType type, Object name) {
-        EntityManager em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        QueryGenerator generator;
-        Query q;
-        switch (type) {
-            case NODE_DATA:
-                generator = new QueryGenerator(NODE_DATA);
-                generator.setParameter(NodeDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
-                generator.setParameter(NodeDataConstants.NODE_ID, name);
-                q = generator.selectQuery(em);
-                Node_Data enodeDeata = (Node_Data)q.getSingleResult();
-                NodeDataResource nodeDataResource = (NodeDataResource)Utils.getResource(ResourceType.NODE_DATA, enodeDeata);
-                em.getTransaction().commit();
-                em.close();
-                return nodeDataResource;
-            case GRAM_DATA:
-                generator = new QueryGenerator(GRAM_DATA);
-                generator.setParameter(GramDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
-                generator.setParameter(GramDataConstants.NODE_ID, name);
-                q = generator.selectQuery(em);
-                Gram_Data egramData = (Gram_Data)q.getSingleResult();
-                GramDataResource gramDataResource = (GramDataResource)Utils.getResource(ResourceType.GRAM_DATA, egramData);
-                em.getTransaction().commit();
-                em.close();
-                return gramDataResource;
-            case EXECUTION_ERROR:
-                generator = new QueryGenerator(EXECUTION_ERROR);
-                generator.setParameter(ExecutionErrorConstants.ERROR_ID, name);
-                q = generator.selectQuery(em);
-                Execution_Error execution_error = (Execution_Error)q.getSingleResult();
-                ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR, execution_error);
-                em.getTransaction().commit();
-                em.close();
-                return executionErrorResource;
-            case GFAC_JOB_DATA:
-                generator = new QueryGenerator(GFAC_JOB_DATA);
-                generator.setParameter(GFacJobDataConstants.LOCAL_JOB_ID, name);
-                q = generator.selectQuery(em);
-                GFac_Job_Data gFac_job_data = (GFac_Job_Data)q.getSingleResult();
-                GFacJobDataResource gFacJobDataResource = (GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFac_job_data);
-                em.getTransaction().commit();
-                em.close();
-                return gFacJobDataResource;
-            default:
-                em.getTransaction().commit();
-                em.close();
+//        EntityManager em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+//        QueryGenerator generator;
+//        Query q;
+//        switch (type) {
+//            case NODE_DATA:
+//                generator = new QueryGenerator(NODE_DATA);
+//                generator.setParameter(NodeDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
+//                generator.setParameter(NodeDataConstants.NODE_ID, name);
+//                q = generator.selectQuery(em);
+//                Node_Data enodeDeata = (Node_Data)q.getSingleResult();
+//                NodeDataResource nodeDataResource = (NodeDataResource)Utils.getResource(ResourceType.NODE_DATA, enodeDeata);
+//                em.getTransaction().commit();
+//                em.close();
+//                return nodeDataResource;
+//            case GRAM_DATA:
+//                generator = new QueryGenerator(GRAM_DATA);
+//                generator.setParameter(GramDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
+//                generator.setParameter(GramDataConstants.NODE_ID, name);
+//                q = generator.selectQuery(em);
+//                Gram_Data egramData = (Gram_Data)q.getSingleResult();
+//                GramDataResource gramDataResource = (GramDataResource)Utils.getResource(ResourceType.GRAM_DATA, egramData);
+//                em.getTransaction().commit();
+//                em.close();
+//                return gramDataResource;
+//            case EXECUTION_ERROR:
+//                generator = new QueryGenerator(EXECUTION_ERROR);
+//                generator.setParameter(ExecutionErrorConstants.ERROR_ID, name);
+//                q = generator.selectQuery(em);
+//                Execution_Error execution_error = (Execution_Error)q.getSingleResult();
+//                ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR, execution_error);
+//                em.getTransaction().commit();
+//                em.close();
+//                return executionErrorResource;
+//            case GFAC_JOB_DATA:
+//                generator = new QueryGenerator(GFAC_JOB_DATA);
+//                generator.setParameter(GFacJobDataConstants.LOCAL_JOB_ID, name);
+//                q = generator.selectQuery(em);
+//                GFac_Job_Data gFac_job_data = (GFac_Job_Data)q.getSingleResult();
+//                GFacJobDataResource gFacJobDataResource = (GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFac_job_data);
+//                em.getTransaction().commit();
+//                em.close();
+//                return gFacJobDataResource;
+//            default:
+//                em.getTransaction().commit();
+//                em.close();
                 logger.error("Unsupported resource type for workflow data resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported resource type for workflow data resource.");
-        }
+//        }
     }
 
     public List<Resource> get(ResourceType type) {
@@ -219,70 +219,70 @@ public class WorkflowDataResource extends AbstractResource{
         Query q;
         QueryGenerator generator;
         List<?> results;
-        switch (type){
-            case NODE_DATA:
-                generator = new QueryGenerator(NODE_DATA);
-                generator.setParameter(NodeDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        Node_Data nodeData = (Node_Data)result;
-                        NodeDataResource nodeDataResource = (NodeDataResource)Utils.getResource(ResourceType.NODE_DATA,nodeData);
-                        resourceList.add(nodeDataResource);
-
-                    }
-                }
-                break;
-            case GRAM_DATA:
-                generator = new QueryGenerator(GRAM_DATA);
-                generator.setParameter(GramDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        Gram_Data gramData = (Gram_Data)result;
-                        GramDataResource gramDataResource = (GramDataResource)Utils.getResource(ResourceType.GRAM_DATA, gramData);
-                        resourceList.add(gramDataResource);
-                    }
-                }
-                break;
-            case EXECUTION_ERROR:
-                generator = new QueryGenerator(EXECUTION_ERROR);
-                generator.setParameter(ExecutionErrorConstants.WORKFLOW_ID, workflowInstanceID);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        Execution_Error executionError = (Execution_Error)result;
-                        ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR, executionError);
-                        resourceList.add(executionErrorResource);
-                    }
-                }
-                break;
-            case GFAC_JOB_DATA:
-                generator = new QueryGenerator(GFAC_JOB_DATA);
-                generator.setParameter(GFacJobDataConstants.EXPERIMENT_ID, experimentID);
-                generator.setParameter(GFacJobDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        GFac_Job_Data gFac_job_data = (GFac_Job_Data)result;
-                        GFacJobDataResource gFacJobDataResource = (GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFac_job_data);
-                        resourceList.add(gFacJobDataResource);
-                    }
-                }
-                break;
-            default:
-                em.getTransaction().commit();
-                em.close();
+//        switch (type){
+//            case NODE_DATA:
+//                generator = new QueryGenerator(NODE_DATA);
+//                generator.setParameter(NodeDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
+//                q = generator.selectQuery(em);
+//                results = q.getResultList();
+//                if (results.size() != 0) {
+//                    for (Object result : results) {
+//                        Node_Data nodeData = (Node_Data)result;
+//                        NodeDataResource nodeDataResource = (NodeDataResource)Utils.getResource(ResourceType.NODE_DATA,nodeData);
+//                        resourceList.add(nodeDataResource);
+//
+//                    }
+//                }
+//                break;
+//            case GRAM_DATA:
+//                generator = new QueryGenerator(GRAM_DATA);
+//                generator.setParameter(GramDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
+//                q = generator.selectQuery(em);
+//                results = q.getResultList();
+//                if (results.size() != 0) {
+//                    for (Object result : results) {
+//                        Gram_Data gramData = (Gram_Data)result;
+//                        GramDataResource gramDataResource = (GramDataResource)Utils.getResource(ResourceType.GRAM_DATA, gramData);
+//                        resourceList.add(gramDataResource);
+//                    }
+//                }
+//                break;
+//            case EXECUTION_ERROR:
+//                generator = new QueryGenerator(EXECUTION_ERROR);
+//                generator.setParameter(ExecutionErrorConstants.WORKFLOW_ID, workflowInstanceID);
+//                q = generator.selectQuery(em);
+//                results = q.getResultList();
+//                if (results.size() != 0) {
+//                    for (Object result : results) {
+//                        Execution_Error executionError = (Execution_Error)result;
+//                        ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR, executionError);
+//                        resourceList.add(executionErrorResource);
+//                    }
+//                }
+//                break;
+//            case GFAC_JOB_DATA:
+//                generator = new QueryGenerator(GFAC_JOB_DATA);
+//                generator.setParameter(GFacJobDataConstants.EXPERIMENT_ID, experimentID);
+//                generator.setParameter(GFacJobDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
+//                q = generator.selectQuery(em);
+//                results = q.getResultList();
+//                if (results.size() != 0) {
+//                    for (Object result : results) {
+//                        GFac_Job_Data gFac_job_data = (GFac_Job_Data)result;
+//                        GFacJobDataResource gFacJobDataResource = (GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFac_job_data);
+//                        resourceList.add(gFacJobDataResource);
+//                    }
+//                }
+//                break;
+//            default:
+//                em.getTransaction().commit();
+//                em.close();
                 logger.error("Unsupported resource type for workflow data resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported resource type for workflow data resource.");
-        }
-        em.getTransaction().commit();
-        em.close();
-        return resourceList;
+//        }
+//        em.getTransaction().commit();
+//        em.close();
+//        return resourceList;
     }
 
     public List<Resource> getGFacJobs(){
@@ -290,36 +290,36 @@ public class WorkflowDataResource extends AbstractResource{
     }
     
     public void save() {
-        if(lastUpdatedTime == null){
-            java.util.Date date= new java.util.Date();
-            lastUpdatedTime = new Timestamp(date.getTime());
-        }
-        EntityManager em = ResourceUtils.getEntityManager();
-        Workflow_Data existingWFData = em.find(Workflow_Data.class, workflowInstanceID);
-        em.close();
-
-        em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        Workflow_Data workflowData = new Workflow_Data();
-        Experiment_Metadata expData = em.find(Experiment_Metadata.class, experimentID);
-        workflowData.setExperiment_data(expData);
-        workflowData.setWorkflow_instanceID(workflowInstanceID);
-        workflowData.setLast_update_time(lastUpdatedTime);
-        workflowData.setStart_time(startTime);
-        workflowData.setTemplate_name(templateName);
-        workflowData.setStatus(status);
-        if(existingWFData != null){
-            existingWFData.setExperiment_data(expData);
-            existingWFData.setLast_update_time(lastUpdatedTime);
-            existingWFData.setStart_time(startTime);
-            existingWFData.setStatus(status);
-            existingWFData.setTemplate_name(templateName);
-            workflowData = em.merge(existingWFData);
-        }else {
-            em.persist(workflowData);
-        }
-        em.getTransaction().commit();
-        em.close();
+//        if(lastUpdatedTime == null){
+//            java.util.Date date= new java.util.Date();
+//            lastUpdatedTime = new Timestamp(date.getTime());
+//        }
+//        EntityManager em = ResourceUtils.getEntityManager();
+////        Workflow_Data existingWFData = em.find(Workflow_Data.class, workflowInstanceID);
+//        em.close();
+//
+//        em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+////        Workflow_Data workflowData = new Workflow_Data();
+////        Experiment_Metadata expData = em.find(Experiment_Metadata.class, experimentID);
+////        workflowData.setExperiment_data(expData);
+////        workflowData.setWorkflow_instanceID(workflowInstanceID);
+////        workflowData.setLast_update_time(lastUpdatedTime);
+////        workflowData.setStart_time(startTime);
+////        workflowData.setTemplate_name(templateName);
+////        workflowData.setStatus(status);
+//        if(existingWFData != null){
+//            existingWFData.setExperiment_data(expData);
+//            existingWFData.setLast_update_time(lastUpdatedTime);
+//            existingWFData.setStart_time(startTime);
+//            existingWFData.setStatus(status);
+//            existingWFData.setTemplate_name(templateName);
+//            workflowData = em.merge(existingWFData);
+//        }else {
+//            em.persist(workflowData);
+//        }
+//        em.getTransaction().commit();
+//        em.close();
     }
     
     public boolean isNodeExists(String nodeId){
@@ -330,33 +330,33 @@ public class WorkflowDataResource extends AbstractResource{
     	return isExists(ResourceType.GRAM_DATA, nodeId);
     }
     
-    public NodeDataResource getNodeData(String nodeId){
-		return (NodeDataResource) get(ResourceType.NODE_DATA,nodeId);
-    }
-    
-    public GramDataResource getGramData(String nodeId){
-    	return (GramDataResource) get(ResourceType.GRAM_DATA,nodeId);
-    }
-    
-    public List<NodeDataResource> getNodeData(){
-    	return getResourceList(get(ResourceType.NODE_DATA),NodeDataResource.class);
-    }
-    
-    public List<GramDataResource> getGramData(){
-    	return getResourceList(get(ResourceType.GRAM_DATA),GramDataResource.class);
-    }
-
-    public NodeDataResource createNodeData(String nodeId){
-    	NodeDataResource data=(NodeDataResource)create(ResourceType.NODE_DATA);
-    	data.setNodeID(nodeId);
-    	return data;
-    }
-    
-    public GramDataResource createGramData(String nodeId){
-    	GramDataResource data=(GramDataResource)create(ResourceType.GRAM_DATA);
-    	data.setNodeID(nodeId);
-    	return data;
-    }
+//    public NodeDataResource getNodeData(String nodeId){
+//		return (NodeDataResource) get(ResourceType.NODE_DATA,nodeId);
+//    }
+//
+//    public GramDataResource getGramData(String nodeId){
+//    	return (GramDataResource) get(ResourceType.GRAM_DATA,nodeId);
+//    }
+//
+//    public List<NodeDataResource> getNodeData(){
+//    	return getResourceList(get(ResourceType.NODE_DATA),NodeDataResource.class);
+//    }
+//
+//    public List<GramDataResource> getGramData(){
+//    	return getResourceList(get(ResourceType.GRAM_DATA),GramDataResource.class);
+//    }
+//
+//    public NodeDataResource createNodeData(String nodeId){
+//    	NodeDataResource data=(NodeDataResource)create(ResourceType.NODE_DATA);
+//    	data.setNodeID(nodeId);
+//    	return data;
+//    }
+//
+//    public GramDataResource createGramData(String nodeId){
+//    	GramDataResource data=(GramDataResource)create(ResourceType.GRAM_DATA);
+//    	data.setNodeID(nodeId);
+//    	return data;
+//    }
     
     public void removeNodeData(String nodeId){
     	remove(ResourceType.NODE_DATA, nodeId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/a0c1cbde/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 27da417..d5c425b 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
@@ -1,114 +1,114 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.utils;
-
-import org.apache.airavata.model.experiment.*;
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.resources.ExperimentConfigDataResource;
-import org.apache.airavata.persistance.registry.jpa.resources.ExperimentInputResource;
-import org.apache.airavata.persistance.registry.jpa.resources.ExperimentMetadataResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class ThriftDataModelConversion {
-    private final static Logger logger = LoggerFactory.getLogger(ThriftDataModelConversion.class);
-
-    public static BasicMetadata getBasicMetadata (ExperimentMetadataResource exmetadata){
-        BasicMetadata bsmd = new BasicMetadata();
-        bsmd.setUserName(exmetadata.getExecutionUser());
-        bsmd.setShareExperimentPublicly(exmetadata.isShareExp());
-        bsmd.setExperimentDescription(exmetadata.getDescription());
-        bsmd.setExperimentName(exmetadata.getExperimentName());
-        return bsmd;
-    }
-
-    public static ConfigurationData getConfigurationData (ExperimentConfigDataResource excd){
-        ConfigurationData configData = new ConfigurationData();
-        configData.setBasicMetadata(getBasicMetadata(excd.getExMetadata()));
-        configData.setApplicationId(excd.getApplicationID());
-        configData.setApplicationVersion(excd.getApplicationVersion());
-        configData.setWorkflowTemplateId(excd.getWorkflowTemplateId());
-        configData.setWorklfowTemplateVersion(excd.getWorkflowTemplateVersion());
-        configData.setExperimentInputs(getExperimentInputs(excd.getExMetadata()));
-        configData.setAdvanceInputDataHandling(getAdvanceInputDataHandling(excd));
-        configData.setAdvanceOutputDataHandling(getAdvanceOutputDataHandling(excd));
-        configData.setComputationalResourceScheduling(getComputationalResourceScheduling(excd));
-        configData.setQosParams(getQOSParams(excd));
-        return configData;
-    }
-
-    public static Map<String, String> getExperimentInputs (ExperimentMetadataResource exmdr){
-        List<Resource> resources = exmdr.get(ResourceType.EXPERIMENT_INPUT);
-        Map<String, String> exInputs = new HashMap<String, String>();
-        for (Resource resource : resources){
-            ExperimentInputResource exInput = (ExperimentInputResource)resource;
-            exInputs.put(exInput.getExperimentKey(), exInput.getValue());
-        }
-        return exInputs;
-    }
-
-    public static ComputationalResourceScheduling getComputationalResourceScheduling (ExperimentConfigDataResource excdr){
-        ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
-        scheduling.setAiravataAutoSchedule(excdr.isAiravataAutoSchedule());
-        scheduling.setOverrideManualScheduledParams(excdr.isOverrideManualSchedule());
-        scheduling.setResourceHostId(excdr.getResourceHostID());
-        scheduling.setTotalCPUCount(excdr.getCpuCount());
-        scheduling.setNodeCount(excdr.getNodeCount());
-        scheduling.setNumberOfThreads(excdr.getNumberOfThreads());
-        scheduling.setQueueName(excdr.getQueueName());
-        scheduling.setWallTimeLimit(excdr.getWallTimeLimit());
-        scheduling.setJobStartTime((int)excdr.getJobStartTime().getTime());
-        scheduling.setTotalPhysicalMemory(excdr.getPhysicalMemory());
-        scheduling.setComputationalProjectAccount(excdr.getProjectAccount());
-        return scheduling;
-    }
-
-    public static AdvancedInputDataHandling getAdvanceInputDataHandling(ExperimentConfigDataResource excd){
-        AdvancedInputDataHandling adih = new AdvancedInputDataHandling();
-        adih.setStageInputFilesToWorkingDir(excd.isStageInputsToWDir());
-        adih.setWorkingDirectoryParent(excd.getWorkingDirParent());
-        adih.setUniqueWorkingDirectory(excd.getWorkingDir());
-        adih.setCleanUpWorkingDirAfterJob(excd.isCleanAfterJob());
-        return adih;
-    }
-
-    public static AdvancedOutputDataHandling getAdvanceOutputDataHandling(ExperimentConfigDataResource excd){
-        AdvancedOutputDataHandling outputDataHandling = new AdvancedOutputDataHandling();
-        outputDataHandling.setOutputdataDir(excd.getOutputDataDir());
-        outputDataHandling.setDataRegistryURL(excd.getDataRegURL());
-        outputDataHandling.setPersistOutputData(excd.isPersistOutputData());
-        return outputDataHandling;
-    }
-
-    public static QualityOfServiceParams getQOSParams (ExperimentConfigDataResource excd){
-        QualityOfServiceParams qosParams = new QualityOfServiceParams();
-        qosParams.setStartExecutionAt(excd.getStartExecutionAt());
-        qosParams.setExecuteBefore(excd.getExecuteBefore());
-        qosParams.setNumberofRetries(excd.getNumberOfRetries());
-        return qosParams;
-    }
-}
+///*
+// *
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements.  See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership.  The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License.  You may obtain a copy of the License at
+// *
+// *   http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied.  See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// *
+// */
+//
+//package org.apache.airavata.persistance.registry.jpa.utils;
+//
+//import org.apache.airavata.model.experiment.*;
+//import org.apache.airavata.persistance.registry.jpa.Resource;
+//import org.apache.airavata.persistance.registry.jpa.ResourceType;
+//import org.apache.airavata.persistance.registry.jpa.resources.ExperimentConfigDataResource;
+//import org.apache.airavata.persistance.registry.jpa.resources.ExperimentInputResource;
+//import org.apache.airavata.persistance.registry.jpa.resources.ExperimentMetadataResource;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//public class ThriftDataModelConversion {
+//    private final static Logger logger = LoggerFactory.getLogger(ThriftDataModelConversion.class);
+//
+//    public static BasicMetadata getBasicMetadata (ExperimentMetadataResource exmetadata){
+//        BasicMetadata bsmd = new BasicMetadata();
+//        bsmd.setUserName(exmetadata.getExecutionUser());
+//        bsmd.setShareExperimentPublicly(exmetadata.isShareExp());
+//        bsmd.setExperimentDescription(exmetadata.getDescription());
+//        bsmd.setExperimentName(exmetadata.getExperimentName());
+//        return bsmd;
+//    }
+//
+//    public static ConfigurationData getConfigurationData (ExperimentConfigDataResource excd){
+//        ConfigurationData configData = new ConfigurationData();
+//        configData.setBasicMetadata(getBasicMetadata(excd.getExMetadata()));
+//        configData.setApplicationId(excd.getApplicationID());
+//        configData.setApplicationVersion(excd.getApplicationVersion());
+//        configData.setWorkflowTemplateId(excd.getWorkflowTemplateId());
+//        configData.setWorklfowTemplateVersion(excd.getWorkflowTemplateVersion());
+//        configData.setExperimentInputs(getExperimentInputs(excd.getExMetadata()));
+//        configData.setAdvanceInputDataHandling(getAdvanceInputDataHandling(excd));
+//        configData.setAdvanceOutputDataHandling(getAdvanceOutputDataHandling(excd));
+//        configData.setComputationalResourceScheduling(getComputationalResourceScheduling(excd));
+//        configData.setQosParams(getQOSParams(excd));
+//        return configData;
+//    }
+//
+//    public static Map<String, String> getExperimentInputs (ExperimentMetadataResource exmdr){
+//        List<Resource> resources = exmdr.get(ResourceType.EXPERIMENT_INPUT);
+//        Map<String, String> exInputs = new HashMap<String, String>();
+//        for (Resource resource : resources){
+//            ExperimentInputResource exInput = (ExperimentInputResource)resource;
+//            exInputs.put(exInput.getExperimentKey(), exInput.getValue());
+//        }
+//        return exInputs;
+//    }
+//
+//    public static ComputationalResourceScheduling getComputationalResourceScheduling (ExperimentConfigDataResource excdr){
+//        ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
+//        scheduling.setAiravataAutoSchedule(excdr.isAiravataAutoSchedule());
+//        scheduling.setOverrideManualScheduledParams(excdr.isOverrideManualSchedule());
+//        scheduling.setResourceHostId(excdr.getResourceHostID());
+//        scheduling.setTotalCPUCount(excdr.getCpuCount());
+//        scheduling.setNodeCount(excdr.getNodeCount());
+//        scheduling.setNumberOfThreads(excdr.getNumberOfThreads());
+//        scheduling.setQueueName(excdr.getQueueName());
+//        scheduling.setWallTimeLimit(excdr.getWallTimeLimit());
+//        scheduling.setJobStartTime((int)excdr.getJobStartTime().getTime());
+//        scheduling.setTotalPhysicalMemory(excdr.getPhysicalMemory());
+//        scheduling.setComputationalProjectAccount(excdr.getProjectAccount());
+//        return scheduling;
+//    }
+//
+//    public static AdvancedInputDataHandling getAdvanceInputDataHandling(ExperimentConfigDataResource excd){
+//        AdvancedInputDataHandling adih = new AdvancedInputDataHandling();
+//        adih.setStageInputFilesToWorkingDir(excd.isStageInputsToWDir());
+//        adih.setWorkingDirectoryParent(excd.getWorkingDirParent());
+//        adih.setUniqueWorkingDirectory(excd.getWorkingDir());
+//        adih.setCleanUpWorkingDirAfterJob(excd.isCleanAfterJob());
+//        return adih;
+//    }
+//
+//    public static AdvancedOutputDataHandling getAdvanceOutputDataHandling(ExperimentConfigDataResource excd){
+//        AdvancedOutputDataHandling outputDataHandling = new AdvancedOutputDataHandling();
+//        outputDataHandling.setOutputdataDir(excd.getOutputDataDir());
+//        outputDataHandling.setDataRegistryURL(excd.getDataRegURL());
+//        outputDataHandling.setPersistOutputData(excd.isPersistOutputData());
+//        return outputDataHandling;
+//    }
+//
+//    public static QualityOfServiceParams getQOSParams (ExperimentConfigDataResource excd){
+//        QualityOfServiceParams qosParams = new QualityOfServiceParams();
+//        qosParams.setStartExecutionAt(excd.getStartExecutionAt());
+//        qosParams.setExecuteBefore(excd.getExecuteBefore());
+//        qosParams.setNumberofRetries(excd.getNumberOfRetries());
+//        return qosParams;
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a0c1cbde/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml b/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
index c9cc9e0..10fbee4 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
@@ -33,18 +33,24 @@
         <class>org.apache.airavata.persistance.registry.jpa.model.Host_Descriptor</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Service_Descriptor</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Application_Descriptor</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Metadata</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Configuration_Data</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Summary</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Input</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Output</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.Workflow_Data</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.Node_Data</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.Gram_Data</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.Execution_Error</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.GFac_Job_Data</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.GFac_Job_Status</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.Orchestrator</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.TaskDetail</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.ErrorDetails</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.ApplicationInput</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.ApplicationOutput</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.NodeInput</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.NodeOutput</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.JobDetail</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.DataTransferDetail</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.Status</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.ExperimentConfigData</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.Computational_Resource_Scheduling</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.AdvancedInputDataHandling</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.AdvancedOutputDataHandling</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.QosParam</class>
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
         <!--properties>
             <property name="openjpa.ConnectionURL"

http://git-wip-us.apache.org/repos/asf/airavata/blob/a0c1cbde/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
index 37d746f..df9fc95 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
@@ -165,51 +165,6 @@ CREATE TABLE EXPERIMENT_OUTPUTS
         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );
 
-CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
-(
-        RESOURCE_SCHEDULING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-        EXPERIMENT_ID VARCHAR(255),
-        TASK_ID VARCHAR(255),
-        RESOURCE_HOST_ID VARCHAR(255),
-        CPU_COUNT INTEGER,
-        NODE_COUNT INTEGER,
-        NO_OF_THREADS INTEGER,
-        QUEUE_NAME VARCHAR(255),
-        WALLTIME_LIMIT INTEGER,
-        JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        TOTAL_PHYSICAL_MEMORY INTEGER,
-        COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
-        PRIMARY KEY(RESOURCE_SCHEDULING_ID),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE ADVANCE_INPUT_DATA_HANDLING
-(
-       INPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-       EXPERIMENT_ID VARCHAR(255),
-       TASK_ID VARCHAR(255),
-       WORKING_DIR_PARENT VARCHAR(255),
-       UNIQUE_WORKING_DIR VARCHAR(255),
-       STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
-       CLEAN_AFTER_JOB SMALLINT,
-       PRIMARY KEY(INPUT_DATA_HANDLING_ID),
-       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE ADVANCE_OUTPUT_DATA_HANDLING
-(
-       OUTPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-       EXPERIMENT_ID VARCHAR(255),
-       TASK_ID VARCHAR(255),
-       OUTPUT_DATA_DIR VARCHAR(255),
-       DATA_REG_URL VARCHAR (255),
-       PERSIST_OUTPUT_DATA SMALLINT,
-       PRIMARY KEY(OUTPUT_DATA_HANDLING_ID),
-       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
-       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
-);
 
 CREATE TABLE WORKFLOW_NODE_DETAIL
 (
@@ -330,6 +285,7 @@ CREATE TABLE STATUS
         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
         FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TRANSFER_ID) REFERENCES DATA_TRANSFER_DETAIL(TRANSFER_ID) ON DELETE CASCADE
 );
 
 CREATE TABLE CONFIG_DATA
@@ -341,6 +297,52 @@ CREATE TABLE CONFIG_DATA
         PRIMARY KEY(EXPERIMENT_ID)
 );
 
+CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
+(
+        RESOURCE_SCHEDULING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        RESOURCE_HOST_ID VARCHAR(255),
+        CPU_COUNT INTEGER,
+        NODE_COUNT INTEGER,
+        NO_OF_THREADS INTEGER,
+        QUEUE_NAME VARCHAR(255),
+        WALLTIME_LIMIT INTEGER,
+        JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        TOTAL_PHYSICAL_MEMORY INTEGER,
+        COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+        PRIMARY KEY(RESOURCE_SCHEDULING_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_INPUT_DATA_HANDLING
+(
+       INPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       WORKING_DIR_PARENT VARCHAR(255),
+       UNIQUE_WORKING_DIR VARCHAR(255),
+       STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
+       CLEAN_AFTER_JOB SMALLINT,
+       PRIMARY KEY(INPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_OUTPUT_DATA_HANDLING
+(
+       OUTPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       OUTPUT_DATA_DIR VARCHAR(255),
+       DATA_REG_URL VARCHAR (255),
+       PERSIST_OUTPUT_DATA SMALLINT,
+       PRIMARY KEY(OUTPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
 CREATE TABLE QOS_PARAMS
 (
         QOS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,


Mime
View raw message