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

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


            provenanceRegistry.updateExperimentName(experimentId, experimentName);
        }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


            return provenanceRegistry.getExperimentMetadata(experimentId);
        }
    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

            provenanceRegistry.updateExperimentMetadata(experimentId, metadata);
        }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{
View Full Code Here

            return provenanceRegistry.getExperimentWorkflowInstances(experimentId);
        }
    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());
View Full Code Here

                throw new ExperimentDoesNotExistsException(experimentId);
            }
            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

            ProjectResource project = jpa.getWorker().getProject(createProjName(workspaceProject.getProjectName()));
            String experimentId = experiment.getExperimentId();
            if (isExperimentExists(experimentId)){
                throw new ExperimentDoesNotExistsException(experimentId);
            }
            ExperimentResource experimentResource = project.createExperiment(experimentId);
            if (experiment.getSubmittedDate()!=null) {
                experimentResource.setSubmittedDate(new Timestamp(experiment.getSubmittedDate().getTime()));
            }
            experimentResource.save();
        }
    }
View Full Code Here

            provenanceRegistry.updateExperimentExecutionUser(experimentId, user);
        }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

            return provenanceRegistry.getExperimentExecutionUser(experimentId);
        }
    if (!isExperimentExists(experimentId)){
      throw new ExperimentDoesNotExistsException(experimentId);
    }
    ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
    return experiment.getData().getUserName();
  }
View Full Code Here

            provenanceRegistry.updateExperimentName(experimentId, experimentName);
        }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

            return provenanceRegistry.getExperimentMetadata(experimentId);
        }
    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

TOP

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

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.