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

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


                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


        if (resource != null){
            UserConfigurationData data = new UserConfigurationData();
            data.setAiravataAutoSchedule(resource.isAiravataAutoSchedule());
            data.setOverrideManualScheduledParams(resource.isOverrideManualParams());
            data.setShareExperimentPublicly(resource.isShareExp());
            ExperimentResource experimentResource = resource.getExperimentResource();
            String expID = experimentResource.getExpID();
            if (experimentResource.isExists(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, expID)){
                ComputationSchedulingResource computationScheduling = experimentResource.getComputationScheduling(expID);
                data.setComputationalResourceScheduling(getComputationalResourceScheduling(computationScheduling));
            }

            if (experimentResource.isExists(ResourceType.ADVANCE_INPUT_DATA_HANDLING, expID)){
                AdvanceInputDataHandlingResource inputDataHandling = experimentResource.getInputDataHandling(expID);
                data.setAdvanceInputDataHandling(getAdvanceInputDataHandling(inputDataHandling));
            }

            if (experimentResource.isExists(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, expID)){
                AdvancedOutputDataHandlingResource outputDataHandling = experimentResource.getOutputDataHandling(expID);
                data.setAdvanceOutputDataHandling(getAdvanceOutputDataHandling(outputDataHandling));
            }

            if (experimentResource.isExists(ResourceType.QOS_PARAM, expID)){
                QosParamResource qoSparams = experimentResource.getQOSparams(expID);
                data.setQosParams(getQOSParams(qoSparams));
            }
            return data;
        }
        return null;
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

            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

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.