Package org.apache.airavata.persistance.registry.jpa.resources

Examples of org.apache.airavata.persistance.registry.jpa.resources.ExperimentDataResource


        }
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    ExperimentDataResource data = experiment.getData();
    List<WorkflowExecution> result=new ArrayList<WorkflowExecution>();
    List<WorkflowDataResource> workflowInstances = data.getWorkflowInstances();
    for (WorkflowDataResource resource : workflowInstances) {
      WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
      workflowInstance.setTemplateName(resource.getTemplateName());
      result.add(workflowInstance);
    }
View Full Code Here


            }
            if (isWorkflowInstanceExists(workflowInstanceId)){
                throw new WorkflowInstanceAlreadyExistsException(workflowInstanceId);
            }
            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
            ExperimentDataResource data = experiment.getData();
            WorkflowDataResource workflowInstanceResource = data.createWorkflowInstanceResource(workflowInstanceId);
            workflowInstanceResource.setTemplateName(templateName);
            workflowInstanceResource.save();
        }
  }
View Full Code Here

      throw new ApplicationJobAlreadyExistsException(job.getJobId());
    }
//    if (!isWorkflowInstanceNodePresent(job.getWorkflowExecutionId(), job.getNodeId())){
//      throw new WorkflowInstanceNodeDoesNotExistsException(job.getWorkflowExecutionId(), job.getNodeId());
//    }
    ExperimentDataResource expData = jpa.getWorker().getExperiment(job.getExperimentId()).getData();
    GFacJobDataResource gfacJob = expData.createGFacJob(job.getJobId());
    gfacJob.setExperimentDataResource(expData);
    gfacJob.setWorkflowDataResource(expData.getWorkflowInstance(job.getWorkflowExecutionId()));
    gfacJob.setNodeID(job.getNodeId());
    setupValues(job, gfacJob);
    gfacJob.save();
    addApplicationJobStatusData(job.getJobId(), job.getStatus(), job.getStatusUpdateTime(),gfacJob);
  }
View Full Code Here

        }else {
            if (!isExperimentExists(experimentId, true)){
                throw new ExperimentDoesNotExistsException(experimentId);
            }
            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
            ExperimentDataResource data = experiment.getData();
            data.setExpName(experimentName);
            data.save();
        }
  }
View Full Code Here

        }
    if (!isExperimentExists(experimentId, true)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    ExperimentDataResource data = experiment.getData();
    if (data.isExperimentMetadataPresent()){
      return data.getExperimentMetadata().getMetadata();
    }
    return null;
  }
View Full Code Here

        }else {
            if (!isExperimentExists(experimentId, true)){
                throw new ExperimentDoesNotExistsException(experimentId);
            }
            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
            ExperimentDataResource data = experiment.getData();
            ExperimentMetadataResource experimentMetadata;
            if (data.isExperimentMetadataPresent()){
                experimentMetadata = data.getExperimentMetadata();
                experimentMetadata.setMetadata(metadata);
            }else{
                experimentMetadata = data.createExperimentMetadata();
                experimentMetadata.setMetadata(metadata);
            }
            experimentMetadata.save();
        }
  }
View Full Code Here

        }
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    ExperimentDataResource data = experiment.getData();
    List<WorkflowExecution> result=new ArrayList<WorkflowExecution>();
    List<WorkflowDataResource> workflowInstances = data.getWorkflowInstances();
    for (WorkflowDataResource resource : workflowInstances) {
      WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
      workflowInstance.setTemplateName(resource.getTemplateName());
      result.add(workflowInstance);
    }
View Full Code Here

            }
            if (isWorkflowInstanceExists(workflowInstanceId)){
                throw new WorkflowInstanceAlreadyExistsException(workflowInstanceId);
            }
            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
            ExperimentDataResource data = experiment.getData();
            WorkflowDataResource workflowInstanceResource = data.createWorkflowInstanceResource(workflowInstanceId);
            workflowInstanceResource.setTemplateName(templateName);
            workflowInstanceResource.save();
        }
  }
View Full Code Here

      throw new ApplicationJobAlreadyExistsException(job.getJobId());
    }
//    if (!isWorkflowInstanceNodePresent(job.getWorkflowExecutionId(), job.getNodeId())){
//      throw new WorkflowInstanceNodeDoesNotExistsException(job.getWorkflowExecutionId(), job.getNodeId());
//    }
    ExperimentDataResource expData = jpa.getWorker().getExperiment(job.getExperimentId()).getData();
    GFacJobDataResource gfacJob = expData.createGFacJob(job.getJobId());
    gfacJob.setExperimentDataResource(expData);
    gfacJob.setWorkflowDataResource(expData.getWorkflowInstance(job.getWorkflowExecutionId()));
    gfacJob.setNodeID(job.getNodeId());
    setupValues(job, gfacJob);
    gfacJob.save();
    addApplicationJobStatusData(job.getJobId(), job.getStatus(), job.getStatusUpdateTime(),gfacJob);
  }
View Full Code Here

        }else {
            if (!isExperimentExists(experimentId, true)){
                throw new ExperimentDoesNotExistsException(experimentId);
            }
            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
            ExperimentDataResource data = experiment.getData();
            data.setUserName(user);
            data.save();
        }
  }
View Full Code Here

TOP

Related Classes of org.apache.airavata.persistance.registry.jpa.resources.ExperimentDataResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.