Search in sources :

Example 26 with ExperimentCatResource

use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.

the class JobResource method getJobStatuses.

public List<JobStatusResource> getJobStatuses() throws RegistryException {
    List<JobStatusResource> jobStatusResources = new ArrayList();
    List<ExperimentCatResource> resources = get(ResourceType.JOB_STATUS);
    for (ExperimentCatResource resource : resources) {
        JobStatusResource statusResource = (JobStatusResource) resource;
        jobStatusResources.add(statusResource);
    }
    return jobStatusResources;
}
Also used : ArrayList(java.util.ArrayList) ExperimentCatResource(org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource)

Example 27 with ExperimentCatResource

use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.

the class ProcessResource method getProcessErrors.

public List<ProcessErrorResource> getProcessErrors() throws RegistryException {
    List<ProcessErrorResource> processErrorResources = new ArrayList();
    List<ExperimentCatResource> resources = get(ResourceType.PROCESS_ERROR);
    for (ExperimentCatResource resource : resources) {
        ProcessErrorResource errorResource = (ProcessErrorResource) resource;
        processErrorResources.add(errorResource);
    }
    return processErrorResources;
}
Also used : ArrayList(java.util.ArrayList) ExperimentCatResource(org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource)

Example 28 with ExperimentCatResource

use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.

the class ProcessResource method getTaskList.

public List<TaskResource> getTaskList() throws RegistryException {
    List<TaskResource> taskResources = new ArrayList<TaskResource>();
    List<ExperimentCatResource> resources = get(ResourceType.TASK);
    for (ExperimentCatResource resource : resources) {
        TaskResource taskResource = (TaskResource) resource;
        taskResources.add(taskResource);
    }
    return taskResources;
}
Also used : ArrayList(java.util.ArrayList) ExperimentCatResource(org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource)

Example 29 with ExperimentCatResource

use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.

the class ProcessResource method getProcessStatuses.

public List<ProcessStatusResource> getProcessStatuses() throws RegistryException {
    List<ProcessStatusResource> processStatusResources = new ArrayList();
    List<ExperimentCatResource> resources = get(ResourceType.PROCESS_STATUS);
    for (ExperimentCatResource resource : resources) {
        ProcessStatusResource statusResource = (ProcessStatusResource) resource;
        processStatusResources.add(statusResource);
    }
    return processStatusResources;
}
Also used : ArrayList(java.util.ArrayList) ExperimentCatResource(org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource)

Example 30 with ExperimentCatResource

use of org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource in project airavata by apache.

the class ProjectResource method getExperiments.

/**
 * @return  list of experiments
 */
public List<ExperimentResource> getExperiments() throws RegistryException {
    List<ExperimentCatResource> list = get(ResourceType.EXPERIMENT);
    List<ExperimentResource> result = new ArrayList<ExperimentResource>();
    for (ExperimentCatResource resource : list) {
        result.add((ExperimentResource) resource);
    }
    return result;
}
Also used : ArrayList(java.util.ArrayList) ExperimentCatResource(org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource)

Aggregations

ExperimentCatResource (org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource)36 ArrayList (java.util.ArrayList)31 RegistryException (org.apache.airavata.registry.cpi.RegistryException)12 EntityManager (javax.persistence.EntityManager)11 Query (javax.persistence.Query)11 QueryGenerator (org.apache.airavata.registry.core.experiment.catalog.utils.QueryGenerator)10 List (java.util.List)8 Notification (org.apache.airavata.model.workspace.Notification)1 Job (org.apache.airavata.registry.core.experiment.catalog.model.Job)1 JobStatus (org.apache.airavata.registry.core.experiment.catalog.model.JobStatus)1 Notification (org.apache.airavata.registry.core.experiment.catalog.model.Notification)1 Process (org.apache.airavata.registry.core.experiment.catalog.model.Process)1 QueueStatus (org.apache.airavata.registry.core.experiment.catalog.model.QueueStatus)1 TaskError (org.apache.airavata.registry.core.experiment.catalog.model.TaskError)1 TaskStatus (org.apache.airavata.registry.core.experiment.catalog.model.TaskStatus)1 NotificationResource (org.apache.airavata.registry.core.experiment.catalog.resources.NotificationResource)1 QueueStatusResource (org.apache.airavata.registry.core.experiment.catalog.resources.QueueStatusResource)1 Test (org.junit.Test)1