airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [2/4] adding resources to data models - AIRAVATA-1017
Date Tue, 18 Feb 2014 05:28:14 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
index 7b7d6ad..63f1e48 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
@@ -1,111 +1,153 @@
-///*
-// *
-// * 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.resources;
-//
-//import java.sql.Timestamp;
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//import javax.persistence.EntityManager;
-//import javax.persistence.Query;
-//
-//import org.apache.airavata.persistance.registry.jpa.Resource;
-//import org.apache.airavata.persistance.registry.jpa.ResourceType;
-//import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-//import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-//import org.apache.airavata.persistance.registry.jpa.model.Experiment_Data;
-//import org.apache.airavata.persistance.registry.jpa.model.Gateway;
-//import org.apache.airavata.persistance.registry.jpa.model.Project;
-//import org.apache.airavata.persistance.registry.jpa.model.Users;
-//import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-///**
-// * @deprecated
-// */
-//public class ExperimentResource extends AbstractResource {
-//    private static final Logger logger = LoggerFactory.getLogger(ExperimentResource.class);
-//    private WorkerResource worker;
-//    private String expID;
-//    private Timestamp submittedDate;
-//    private GatewayResource gateway;
-//    private ProjectResource project;
-//
-//    /**
-//     *
-//     */
-//    public ExperimentResource() {
-//    }
-//
-//    /**
-//     *
-//     * @return  experiment ID
-//     */
-//    public String getExpID() {
-//        return expID;
-//    }
-//
-//    /**
-//     *
-//     * @return submitted date
-//     */
-//    public Timestamp getSubmittedDate() {
-//        return submittedDate;
-//    }
-//
-//    /**
-//     *
-//     * @param submittedDate  submitted date
-//     */
-//    public void setSubmittedDate(Timestamp submittedDate) {
-//        this.submittedDate = submittedDate;
-//    }
-//
-//    /**
-//     * Since experiments are at the leaf level, this method is not
-//     * valid for an experiment
-//     * @param type  child resource types
-//     * @return UnsupportedOperationException
-//     */
-//    public Resource create(ResourceType type) {
-//    	switch (type){
-//	        case EXPERIMENT_DATA:
-//	        	ExperimentDataResource expDataResource = new ExperimentDataResource();
-//	        	expDataResource.setUserName(getWorker().getUser());
-//	            expDataResource.setExperimentID(getExpID());
-//	            return expDataResource;
-//	        default:
-//                logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
-//	            throw new IllegalArgumentException("Unsupported resource type for experiment resource.");
-//	    }
-//    }
-//
-//    /**
-//     *
-//     * @param type  child resource types
-//     * @param name name of the child resource
-//     * @return UnsupportedOperationException
-//     */
-//    public void remove(ResourceType type, Object name) {
+/*
+*
+* 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.resources;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.Gateway;
+import org.apache.airavata.persistance.registry.jpa.model.Project;
+import org.apache.airavata.persistance.registry.jpa.model.Users;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.bouncycastle.jce.provider.JDKPSSSigner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(ExperimentResource.class);
+    private WorkerResource worker;
+    private String expID;
+    private Timestamp creationTime;
+    private GatewayResource gateway;
+    private ProjectResource project;
+    private String expName;
+    private String applicationId;
+    private String applicationVersion;
+    private String workflowTemplateId;
+    private String workflowTemplateVersion;
+    private String workflowExecutionId;
+
+    /**
+     *
+     * @return  experiment ID
+     */
+    public String getExpID() {
+        return expID;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getExpName() {
+        return expName;
+    }
+
+    public void setExpName(String expName) {
+        this.expName = expName;
+    }
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public String getApplicationVersion() {
+        return applicationVersion;
+    }
+
+    public void setApplicationVersion(String applicationVersion) {
+        this.applicationVersion = applicationVersion;
+    }
+
+    public String getWorkflowTemplateId() {
+        return workflowTemplateId;
+    }
+
+    public void setWorkflowTemplateId(String workflowTemplateId) {
+        this.workflowTemplateId = workflowTemplateId;
+    }
+
+    public String getWorkflowTemplateVersion() {
+        return workflowTemplateVersion;
+    }
+
+    public void setWorkflowTemplateVersion(String workflowTemplateVersion) {
+        this.workflowTemplateVersion = workflowTemplateVersion;
+    }
+
+    public String getWorkflowExecutionId() {
+        return workflowExecutionId;
+    }
+
+    public void setWorkflowExecutionId(String workflowExecutionId) {
+        this.workflowExecutionId = workflowExecutionId;
+    }
+
+    /**
+     * Since experiments are at the leaf level, this method is not
+     * valid for an experiment
+     * @param type  child resource types
+     * @return UnsupportedOperationException
+     */
+    public Resource create(ResourceType type) {
+    	switch (type){
+	        case EXPERIMENT_INPUT:
+	        	ExperimentInputResource inputResource = new ExperimentInputResource();
+	            inputResource.setExperimentResource(this);
+	            return inputResource;
+            case EXPERIMENT_OUTPUT:
+                ExperimentOutputResource experimentOutputResource = new ExperimentOutputResource();
+                experimentOutputResource.setExperimentResource(this);
+                return experimentOutputResource;
+            case WORKFLOW_NODE_DETAIL:
+                WorkflowNodeDetailResource nodeDetailResource = new WorkflowNodeDetailResource();
+	        default:
+                logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
+	            throw new IllegalArgumentException("Unsupported resource type for experiment resource.");
+	    }
+    }
+
+    /**
+     *
+     * @param type  child resource types
+     * @param name name of the child resource
+     * @return UnsupportedOperationException
+     */
+    public void remove(ResourceType type, Object name) {
 //        EntityManager em = ResourceUtils.getEntityManager();
 //        em.getTransaction().begin();
 //        Query q;
@@ -120,21 +162,21 @@
 //        }
 //        em.getTransaction().commit();
 //        em.close();
-//
-//    }
-//
-//    /**
-//     *
-//     * @param type  child resource types
-//     * @param name name of the child resource
-//     * @return UnsupportedOperationException
-//     */
-//    public Resource get(ResourceType type, Object name) {
-//    	EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        QueryGenerator generator;
-//        Query q;
-//        switch (type) {
+
+    }
+
+    /**
+     *
+     * @param type  child resource types
+     * @param name name of the child resource
+     * @return UnsupportedOperationException
+     */
+    public Resource get(ResourceType type, Object name) {
+    	EntityManager em = ResourceUtils.getEntityManager();
+        em.getTransaction().begin();
+        QueryGenerator generator;
+        Query q;
+        switch (type) {
 //            case EXPERIMENT_DATA:
 //                generator = new QueryGenerator(EXPERIMENT_DATA);
 //                generator.setParameter(ExperimentDataConstants.EXPERIMENT_ID, name);
@@ -144,51 +186,51 @@
 //                em.getTransaction().commit();
 //                em.close();
 //                return experimentDataResource;
-//            default:
-//                em.getTransaction().commit();
-//                em.close();
-//                logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
-//                throw new IllegalArgumentException("Unsupported resource type for experiment data resource.");
-//        }
-//
-//    }
-//
-//    /**
-//     * key should be the experiment ID
-//     * @param keys experiment ID
-//     * @return ExperimentResource
-//     */
-//    public List<Resource> populate(Object[] keys) {
-//        List<Resource> list = new ArrayList<Resource>();
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        QueryGenerator queryGenerator = new QueryGenerator(EXPERIMENT);
-//        queryGenerator.setParameter(ExperimentConstants.EXPERIMENT_ID, keys[0]);
-//        Query q = queryGenerator.selectQuery(em);
-//        Experiment experiment = (Experiment)q.getSingleResult();
-//        ExperimentResource experimentResource =
-//                (ExperimentResource)Utils.getResource(ResourceType.EXPERIMENT, experiment);
-//        em.getTransaction().commit();
-//        em.close();
-//        list.add(experimentResource);
-//        return list;
-//
-//    }
-//
-//    /**
-//     *
-//     * @param type  child resource types
-//     * @return UnsupportedOperationException
-//     */
-//    public List<Resource> get(ResourceType type) {
-//        logger.error("Unsupported resource type for experiment resource.", new UnsupportedOperationException());
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    /**
-//     * save experiment
-//     */
-//    public void save() {
+            default:
+                em.getTransaction().commit();
+                em.close();
+                logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
+                throw new IllegalArgumentException("Unsupported resource type for experiment data resource.");
+        }
+
+    }
+
+    /**
+     * key should be the experiment ID
+     * @param keys experiment ID
+     * @return ExperimentResource
+     */
+    public List<Resource> populate(Object[] keys) {
+        List<Resource> list = new ArrayList<Resource>();
+        EntityManager em = ResourceUtils.getEntityManager();
+        em.getTransaction().begin();
+        QueryGenerator queryGenerator = new QueryGenerator(EXPERIMENT);
+        queryGenerator.setParameter(ExperimentConstants.EXPERIMENT_ID, keys[0]);
+        Query q = queryGenerator.selectQuery(em);
+        Experiment experiment = (Experiment)q.getSingleResult();
+        ExperimentResource experimentResource =
+                (ExperimentResource)Utils.getResource(ResourceType.EXPERIMENT, experiment);
+        em.getTransaction().commit();
+        em.close();
+        list.add(experimentResource);
+        return list;
+
+    }
+
+    /**
+     *
+     * @param type  child resource types
+     * @return UnsupportedOperationException
+     */
+    public List<Resource> get(ResourceType type) {
+        logger.error("Unsupported resource type for experiment resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * save experiment
+     */
+    public void save() {
 //        EntityManager em = ResourceUtils.getEntityManager();
 //        Experiment existingExp = em.find(Experiment.class, expID);
 //        em.close();
@@ -217,71 +259,71 @@
 //
 //        em.getTransaction().commit();
 //        em.close();
+    }
+
+    /**
+     *
+     * @param expID experiment ID
+     */
+    public void setExpID(String expID) {
+		this.expID = expID;
+	}
+
+    /**
+     *
+     * @return gatewayResource
+     */
+    public GatewayResource getGateway() {
+		return gateway;
+	}
+
+    /**
+     *
+     * @param gateway gateway
+     */
+    public void setGateway(GatewayResource gateway) {
+		this.gateway = gateway;
+	}
+
+    /**
+     *
+     * @return worker for the gateway
+     */
+    public WorkerResource getWorker() {
+		return worker;
+	}
+
+    /**
+     *
+     * @param worker gateway worker
+     */
+    public void setWorker(WorkerResource worker) {
+		this.worker = worker;
+	}
+
+    /**
+     *
+     * @return project
+     */
+    public ProjectResource getProject() {
+		return project;
+	}
+
+    /**
+     *
+     * @param project  project
+     */
+    public void setProject(ProjectResource project) {
+		this.project = project;
+	}
+
+//    public ExperimentDataResource getData(){
+//    	if (isExists(ResourceType.EXPERIMENT_DATA, getExpID())){
+//    		return (ExperimentDataResource) get(ResourceType.EXPERIMENT_DATA, getExpID());
+//    	}else{
+//    		ExperimentDataResource data = (ExperimentDataResource) create(ResourceType.EXPERIMENT_DATA);
+//            data.save();
+//			return data;
+//    	}
 //    }
-//
-//    /**
-//     *
-//     * @param expID experiment ID
-//     */
-//    public void setExpID(String expID) {
-//		this.expID = expID;
-//	}
-//
-//    /**
-//     *
-//     * @return gatewayResource
-//     */
-//    public GatewayResource getGateway() {
-//		return gateway;
-//	}
-//
-//    /**
-//     *
-//     * @param gateway gateway
-//     */
-//    public void setGateway(GatewayResource gateway) {
-//		this.gateway = gateway;
-//	}
-//
-//    /**
-//     *
-//     * @return worker for the gateway
-//     */
-//    public WorkerResource getWorker() {
-//		return worker;
-//	}
-//
-//    /**
-//     *
-//     * @param worker gateway worker
-//     */
-//    public void setWorker(WorkerResource worker) {
-//		this.worker = worker;
-//	}
-//
-//    /**
-//     *
-//     * @return project
-//     */
-//    public ProjectResource getProject() {
-//		return project;
-//	}
-//
-//    /**
-//     *
-//     * @param project  project
-//     */
-//    public void setProject(ProjectResource project) {
-//		this.project = project;
-//	}
-//
-////    public ExperimentDataResource getData(){
-////    	if (isExists(ResourceType.EXPERIMENT_DATA, getExpID())){
-////    		return (ExperimentDataResource) get(ResourceType.EXPERIMENT_DATA, getExpID());
-////    	}else{
-////    		ExperimentDataResource data = (ExperimentDataResource) create(ResourceType.EXPERIMENT_DATA);
-////            data.save();
-////			return data;
-////    	}
-////    }
-//}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentSummaryResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentSummaryResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentSummaryResource.java
deleted file mode 100644
index 08a2aed..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentSummaryResource.java
+++ /dev/null
@@ -1,112 +0,0 @@
-///*
-// *
-// * 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.resources;
-//
-//import org.apache.airavata.persistance.registry.jpa.Resource;
-//import org.apache.airavata.persistance.registry.jpa.ResourceType;
-//import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-//import org.apache.airavata.persistance.registry.jpa.model.Experiment_Metadata;
-//import org.apache.airavata.persistance.registry.jpa.model.Experiment_Summary;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import javax.persistence.EntityManager;
-//import java.sql.Timestamp;
-//import java.util.List;
-//
-//public class ExperimentSummaryResource extends AbstractResource {
-//    private static final Logger logger = LoggerFactory.getLogger(ExperimentSummaryResource.class);
-//    private ExperimentMetadataResource experimentMetadataResource;
-//    private String status;
-//    private Timestamp lastUpdateTime;
-//
-//    public ExperimentMetadataResource getExperimentMetadataResource() {
-//        return experimentMetadataResource;
-//    }
-//
-//    public void setExperimentMetadataResource(ExperimentMetadataResource experimentMetadataResource) {
-//        this.experimentMetadataResource = experimentMetadataResource;
-//    }
-//
-//    public String getStatus() {
-//        return status;
-//    }
-//
-//    public void setStatus(String status) {
-//        this.status = status;
-//    }
-//
-//    public Timestamp getLastUpdateTime() {
-//        return lastUpdateTime;
-//    }
-//
-//    public void setLastUpdateTime(Timestamp lastUpdateTime) {
-//        this.lastUpdateTime = lastUpdateTime;
-//    }
-//
-//    public Resource create(ResourceType type) {
-//        logger.error("Unsupported resource type for experiment summary data resource.", new UnsupportedOperationException());
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public void remove(ResourceType type, Object name) {
-//        logger.error("Unsupported resource type for experiment summary data resource.", new UnsupportedOperationException());
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public Resource get(ResourceType type, Object name) {
-//        logger.error("Unsupported resource type for experiment summary data resource.", new UnsupportedOperationException());
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public List<Resource> get(ResourceType type) {
-//        logger.error("Unsupported resource type for experiment summary data resource.", new UnsupportedOperationException());
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public void save() {
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        Experiment_Summary existingExSummary = em.find(Experiment_Summary.class, experimentMetadataResource.getExpID());
-//        em.close();
-//
-//        em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        Experiment_Summary exSummary = new Experiment_Summary();
-//        exSummary.setLast_update_time(lastUpdateTime);
-//        exSummary.setStatus(status);
-//        Experiment_Metadata metadata = em.find(Experiment_Metadata.class, experimentMetadataResource.getExpID());
-//        exSummary.setExperiment_metadata(metadata);
-//        exSummary.setExperimentID(metadata.getExperiment_id());
-//
-//        if (existingExSummary != null){
-//            existingExSummary.setLast_update_time(lastUpdateTime);
-//            existingExSummary.setStatus(status);
-//            existingExSummary.setExperiment_metadata(metadata);
-//            existingExSummary.setExperimentID(metadata.getExperiment_id());
-//            exSummary = em.merge(existingExSummary);
-//        }  else {
-//            em.persist(exSummary);
-//        }
-//        em.getTransaction().commit();
-//        em.close();
-//    }
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GFacJobDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GFacJobDataResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GFacJobDataResource.java
deleted file mode 100644
index 16a476d..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GFacJobDataResource.java
+++ /dev/null
@@ -1,257 +0,0 @@
-///*
-// *
-// * 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.resources;
-//
-//import org.apache.airavata.persistance.registry.jpa.Resource;
-//import org.apache.airavata.persistance.registry.jpa.ResourceType;
-//import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-//import org.apache.airavata.persistance.registry.jpa.model.*;
-//import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import javax.persistence.EntityManager;
-//import javax.persistence.Query;
-//import java.sql.Timestamp;
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//public class GFacJobDataResource extends AbstractResource {
-//    private final static Logger logger = LoggerFactory.getLogger(GFacJobDataResource.class);
-//    private ExperimentMetadataResource metadataResource;
-//    private WorkflowDataResource workflowDataResource;
-//    private String nodeID;
-//    private String applicationDescID;
-//    private String hostDescID;
-//    private String serviceDescID;
-//    private String jobData;
-//    private String localJobID;
-//    private Timestamp submittedTime;
-//    private Timestamp statusUpdateTime;
-//    private String status;
-//    private String metadata;
-//
-//    public ExperimentMetadataResource getMetadataResource() {
-//        return metadataResource;
-//    }
-//
-//    public WorkflowDataResource getWorkflowDataResource() {
-//        return workflowDataResource;
-//    }
-//
-//    public String getNodeID() {
-//        return nodeID;
-//    }
-//
-//    public String getApplicationDescID() {
-//        return applicationDescID;
-//    }
-//
-//    public String getHostDescID() {
-//        return hostDescID;
-//    }
-//
-//    public String getServiceDescID() {
-//        return serviceDescID;
-//    }
-//
-//    public String getJobData() {
-//        return jobData;
-//    }
-//
-//    public String getLocalJobID() {
-//        return localJobID;
-//    }
-//
-//    public Timestamp getSubmittedTime() {
-//        return submittedTime;
-//    }
-//
-//    public Timestamp getStatusUpdateTime() {
-//        return statusUpdateTime;
-//    }
-//
-//    public String getStatus() {
-//        return status;
-//    }
-//
-//    public String getMetadata() {
-//        return metadata;
-//    }
-//
-//    public void setMetadataResource(ExperimentMetadataResource metadataResource) {
-//        this.metadataResource = metadataResource;
-//    }
-//
-//    public void setWorkflowDataResource(WorkflowDataResource workflowDataResource) {
-//        this.workflowDataResource = workflowDataResource;
-//    }
-//
-//    public void setNodeID(String nodeID) {
-//        this.nodeID = nodeID;
-//    }
-//
-//    public void setApplicationDescID(String applicationDescID) {
-//        this.applicationDescID = applicationDescID;
-//    }
-//
-//    public void setHostDescID(String hostDescID) {
-//        this.hostDescID = hostDescID;
-//    }
-//
-//    public void setServiceDescID(String serviceDescID) {
-//        this.serviceDescID = serviceDescID;
-//    }
-//
-//    public void setJobData(String jobData) {
-//        this.jobData = jobData;
-//    }
-//
-//    public void setLocalJobID(String localJobID) {
-//        this.localJobID = localJobID;
-//    }
-//
-//    public void setSubmittedTime(Timestamp submittedTime) {
-//        this.submittedTime = submittedTime;
-//    }
-//
-//    public void setStatusUpdateTime(Timestamp statusUpdateTime) {
-//        this.statusUpdateTime = statusUpdateTime;
-//    }
-//
-//    public void setStatus(String status) {
-//        this.status = status;
-//    }
-//
-//    public void setMetadata(String metadata) {
-//        this.metadata = metadata;
-//    }
-//
-//    @Override
-//    public Resource create(ResourceType type) {
-//        switch (type){
-//            case GFAC_JOB_STATUS:
-//                GFacJobStatusResource gFacJobStatusResource = new GFacJobStatusResource();
-//                gFacJobStatusResource.setLocalJobID(localJobID);
-//                gFacJobStatusResource.setgFacJobDataResource(this);
-//                return gFacJobStatusResource;
-//            default:
-//                logger.error("Unsupported resource type for GFac Job status resource" ,new UnsupportedOperationException() );
-//                throw new UnsupportedOperationException();
-//        }
-//    }
-//
-//    @Override
-//    public void remove(ResourceType type, Object name) {
-//        logger.error("Unsupported resource type for GFac Job data resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    @Override
-//    public Resource get(ResourceType type, Object name) {
-//        logger.error("Unsupported resource type for GFac Job data resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    @Override
-//    public List<Resource> get(ResourceType type) {
-//        List<Resource> resourceList = new ArrayList<Resource>();
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        Query q;
-//        QueryGenerator generator;
-//        List results;
-//        switch (type){
-//            case GFAC_JOB_STATUS:
-//                generator = new QueryGenerator(GFAC_JOB_STATUS);
-//                generator.setParameter(GFacJobStatusConstants.LOCAL_JOB_ID, localJobID);
-//                q = generator.selectQuery(em);
-//                results = q.getResultList();
-//                if (results.size() != 0) {
-//                    for (Object result : results) {
-//                        GFac_Job_Status gFacJobStatus = (GFac_Job_Status) result;
-//                        GFacJobStatusResource gFacJobStatusResource =
-//                                (GFacJobStatusResource)Utils.getResource(ResourceType.GFAC_JOB_STATUS, gFacJobStatus);
-//                        resourceList.add(gFacJobStatusResource);
-//                    }
-//                }
-//                break;
-//            default:
-//                em.getTransaction().commit();
-//                em.close();
-//                logger.error("Unsupported resource type for gfac job data resource.", new IllegalArgumentException());
-//                throw new IllegalArgumentException("Unsupported resource type for gfac job data resource.");
-//        }
-//        em.getTransaction().commit();
-//        em.close();
-//        return resourceList;
-//    }
-//
-//    @Override
-//    public void save() {
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        GFac_Job_Data existingGfacJobData = em.find(GFac_Job_Data.class, localJobID);
-//        em.close();
-//
-//        em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        GFac_Job_Data gFacJobData = new GFac_Job_Data();
-//        Experiment_Metadata experiment_data = em.find(Experiment_Metadata.class, metadataResource.getExpID());
-//        gFacJobData.setExperiment_metadata(experiment_data);
-//        gFacJobData.setExperiment_ID(metadataResource.getExpID());
-//        Workflow_Data workflow_data = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
-//        gFacJobData.setWorkflow_Data(workflow_data);
-//        gFacJobData.setWorkflow_instanceID(workflowDataResource.getWorkflowInstanceID());
-//        gFacJobData.setNode_id(nodeID);
-//        gFacJobData.setApplication_descriptor_ID(applicationDescID);
-//        gFacJobData.setLocal_Job_ID(localJobID);
-//        gFacJobData.setService_descriptor_ID(serviceDescID);
-//        gFacJobData.setHost_descriptor_ID(hostDescID);
-//        gFacJobData.setJob_data(jobData);
-//        gFacJobData.setSubmitted_time(submittedTime);
-//        gFacJobData.setStatus_update_time(statusUpdateTime);
-//        gFacJobData.setStatus(status);
-//        gFacJobData.setMetadata(metadata);
-//        if(existingGfacJobData != null){
-//            existingGfacJobData.setExperiment_metadata(experiment_data);
-//            existingGfacJobData.setExperiment_ID(metadataResource.getExpID());
-//            Workflow_Data workflow_data1 = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
-//            existingGfacJobData.setWorkflow_Data(workflow_data1);
-//            existingGfacJobData.setWorkflow_instanceID(workflowDataResource.getWorkflowInstanceID());
-//            existingGfacJobData.setNode_id(nodeID);
-//            existingGfacJobData.setApplication_descriptor_ID(applicationDescID);
-//            existingGfacJobData.setLocal_Job_ID(localJobID);
-//            existingGfacJobData.setService_descriptor_ID(serviceDescID);
-//            existingGfacJobData.setHost_descriptor_ID(hostDescID);
-//            existingGfacJobData.setJob_data(jobData);
-//            existingGfacJobData.setSubmitted_time(submittedTime);
-//            existingGfacJobData.setStatus_update_time(statusUpdateTime);
-//            existingGfacJobData.setStatus(status);
-//            existingGfacJobData.setMetadata(metadata);
-//            gFacJobData = em.merge(existingGfacJobData);
-//        }  else {
-//            em.persist(gFacJobData);
-//        }
-//        em.getTransaction().commit();
-//        em.close();
-//    }
-//
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GFacJobStatusResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GFacJobStatusResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GFacJobStatusResource.java
deleted file mode 100644
index 1ff7612..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GFacJobStatusResource.java
+++ /dev/null
@@ -1,113 +0,0 @@
-///*
-// *
-// * 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.resources;
-//
-//import org.apache.airavata.persistance.registry.jpa.Resource;
-//import org.apache.airavata.persistance.registry.jpa.ResourceType;
-//import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-//import org.apache.airavata.persistance.registry.jpa.model.GFac_Job_Data;
-//import org.apache.airavata.persistance.registry.jpa.model.GFac_Job_Status;
-//import org.apache.airavata.persistance.registry.jpa.model.Workflow_Data;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import javax.persistence.EntityManager;
-//import java.sql.Timestamp;
-//import java.util.List;
-//
-//public class GFacJobStatusResource extends AbstractResource {
-//    private final static Logger logger = LoggerFactory.getLogger(GFacJobStatusResource.class);
-//    private GFacJobDataResource gFacJobDataResource;
-//    private String localJobID;
-//    private Timestamp statusUpdateTime;
-//    private String status;
-//
-//    public String getLocalJobID() {
-//        return localJobID;
-//    }
-//
-//    public Timestamp getStatusUpdateTime() {
-//        return statusUpdateTime;
-//    }
-//
-//    public String getStatus() {
-//        return status;
-//    }
-//
-//    public void setLocalJobID(String localJobID) {
-//        this.localJobID = localJobID;
-//    }
-//
-//    public void setStatusUpdateTime(Timestamp statusUpdateTime) {
-//        this.statusUpdateTime = statusUpdateTime;
-//    }
-//
-//    public void setStatus(String status) {
-//        this.status = status;
-//    }
-//
-//    public GFacJobDataResource getgFacJobDataResource() {
-//        return gFacJobDataResource;
-//    }
-//
-//    public void setgFacJobDataResource(GFacJobDataResource gFacJobDataResource) {
-//        this.gFacJobDataResource = gFacJobDataResource;
-//    }
-//
-//    @Override
-//    public Resource create(ResourceType type) {
-//        logger.error("Unsupported resource type for GFac Job status resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    @Override
-//    public void remove(ResourceType type, Object name) {
-//        logger.error("Unsupported resource type for GFac Job status resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    @Override
-//    public Resource get(ResourceType type, Object name) {
-//        logger.error("Unsupported resource type for GFac Job status resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    @Override
-//    public List<Resource> get(ResourceType type) {
-//        logger.error("Unsupported resource type for GFac Job status resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    @Override
-//    public void save() {
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        GFac_Job_Status gFacJobStatus = new GFac_Job_Status();
-//        GFac_Job_Data gFacJobData = em.find(GFac_Job_Data.class, localJobID);
-//        gFacJobStatus.setgFac_job_data(gFacJobData);
-//        gFacJobStatus.setLocal_Job_ID(localJobID);
-//        gFacJobStatus.setStatus_update_time(statusUpdateTime);
-//        gFacJobStatus.setStatus(status);
-//        em.persist(gFacJobStatus);
-//        em.getTransaction().commit();
-//        em.close();
-//    }
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
index ec18eb1..05e3d6e 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
@@ -132,10 +132,6 @@ public class GatewayResource extends AbstractResource {
                 WorkerResource workerResource = new WorkerResource();
                 workerResource.setGateway(this);
                 return workerResource;
-            case ORCHESTRATOR:
-//                OrchestratorDataResource orchestratorDataResource = new OrchestratorDataResource();
-//                orchestratorDataResource.setGateway(this);
-//                return orchestratorDataResource;
             default:
                 logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
@@ -180,13 +176,13 @@ public class GatewayResource extends AbstractResource {
                 q = generator.deleteQuery(em);
                 q.executeUpdate();
                 break;
-            case EXPERIMENT_METADATA:
-                generator = new QueryGenerator(EXPERIMENT_METADATA);
-                generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
-                generator.setParameter(ExperimentMetadataConstants.GATEWAY_NAME, gatewayName);
-                q = generator.deleteQuery(em);
-                q.executeUpdate();
-                break;
+//            case EXPERIMENT_METADATA:
+//                generator = new QueryGenerator(EXPERIMENT_METADATA);
+//                generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
+//                generator.setParameter(ExperimentMetadataConstants.GATEWAY_NAME, gatewayName);
+//                q = generator.deleteQuery(em);
+//                q.executeUpdate();
+//                break;
             case APPLICATION_DESCRIPTOR:
                 generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
                 generator.setParameter(ApplicationDescriptorConstants.APPLICATION_DESC_ID, name);
@@ -194,12 +190,6 @@ public class GatewayResource extends AbstractResource {
                 q = generator.deleteQuery(em);
                 q.executeUpdate();
                 break;
-            case ORCHESTRATOR:
-                generator = new QueryGenerator(ORCHESTRATOR);
-                generator.setParameter(OrchestratorDataConstants.EXPERIMENT_ID, name);
-                q = generator.deleteQuery(em);
-                q.executeUpdate();
-                break;
             default:
                 logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
                 break;
@@ -254,7 +244,7 @@ public class GatewayResource extends AbstractResource {
                 em.getTransaction().commit();
                 em.close();
                 return hostDescriptorResource;
-            case EXPERIMENT_METADATA:
+//            case EXPERIMENT_METADATA:
 //                generator = new QueryGenerator(EXPERIMENT_METADATA);
 //                generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
 ////                generator.setParameter(ExperimentMetadataConstants.GATEWAY_NAME, gatewayName);
@@ -287,16 +277,6 @@ public class GatewayResource extends AbstractResource {
                 em.getTransaction().commit();
                 em.close();
                 return applicationDescriptorResource;
-            case ORCHESTRATOR:
-//                generator = new QueryGenerator(ORCHESTRATOR);
-//                generator.setParameter(OrchestratorDataConstants.EXPERIMENT_ID, name);
-//                q = generator.selectQuery(em);
-//                Orchestrator orchData = (Orchestrator) q.getSingleResult();
-//                OrchestratorDataResource orchestratorDataResource =
-//                        (OrchestratorDataResource)Utils.getResource(ResourceType.ORCHESTRATOR, orchData);
-//                em.getTransaction().commit();
-//                em.close();
-//                return orchestratorDataResource;
             default:
                 em.getTransaction().commit();
                 em.close();

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GramDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GramDataResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GramDataResource.java
deleted file mode 100644
index 81a6ac7..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GramDataResource.java
+++ /dev/null
@@ -1,133 +0,0 @@
-///*
-// *
-// * 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.resources;
-//
-//
-//import org.apache.airavata.persistance.registry.jpa.Resource;
-//import org.apache.airavata.persistance.registry.jpa.ResourceType;
-//import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-//import org.apache.airavata.persistance.registry.jpa.model.Gram_Data;
-//import org.apache.airavata.persistance.registry.jpa.model.Gram_DataPK;
-//import org.apache.airavata.persistance.registry.jpa.model.Node_Data;
-//import org.apache.airavata.persistance.registry.jpa.model.Workflow_Data;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import javax.persistence.EntityManager;
-//import java.util.List;
-//
-//public class GramDataResource extends AbstractResource{
-//    private final static Logger logger = LoggerFactory.getLogger(GramDataResource.class);
-//    private WorkflowDataResource workflowDataResource;
-//    private String nodeID;
-//    private String rsl;
-//    private String invokedHost;
-//    private String localJobID;
-//
-//    public String getNodeID() {
-//        return nodeID;
-//    }
-//
-//    public String getRsl() {
-//        return rsl;
-//    }
-//
-//    public String getInvokedHost() {
-//        return invokedHost;
-//    }
-//
-//    public String getLocalJobID() {
-//        return localJobID;
-//    }
-//
-//    public WorkflowDataResource getWorkflowDataResource() {
-//        return workflowDataResource;
-//    }
-//
-//    public void setWorkflowDataResource(WorkflowDataResource workflowDataResource) {
-//        this.workflowDataResource = workflowDataResource;
-//    }
-//
-//    public void setNodeID(String nodeID) {
-//        this.nodeID = nodeID;
-//    }
-//
-//    public void setRsl(String rsl) {
-//        this.rsl = rsl;
-//    }
-//
-//    public void setInvokedHost(String invokedHost) {
-//        this.invokedHost = invokedHost;
-//    }
-//
-//    public void setLocalJobID(String localJobID) {
-//        this.localJobID = localJobID;
-//    }
-//
-//    public Resource create(ResourceType type) {
-//        logger.error("Unsupported resource type for Gram data resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public void remove(ResourceType type, Object name) {
-//        logger.error("Unsupported resource type for Gram data resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public Resource get(ResourceType type, Object name) {
-//        logger.error("Unsupported resource type for Gram data resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public List<Resource> get(ResourceType type) {
-//        logger.error("Unsupported resource type for Gram data resource" ,new UnsupportedOperationException() );
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public void save() {
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        Gram_Data existingGramData = em.find(Gram_Data.class, new Gram_DataPK(workflowDataResource.getWorkflowInstanceID(), nodeID));
-//        em.close();
-//
-//        em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        Gram_Data gramData = new Gram_Data();
-//        gramData.setNode_id(nodeID);
-//        Workflow_Data workflow_data = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
-//        gramData.setWorkflow_Data(workflow_data);
-//        gramData.setNode_id(nodeID);
-//        gramData.setInvoked_host(invokedHost);
-//        gramData.setLocal_Job_ID(localJobID);
-//        byte[] bytes = rsl.getBytes();
-//        gramData.setRsl(bytes);
-//        if(existingGramData != null){
-//            existingGramData.setInvoked_host(invokedHost);
-//            existingGramData.setLocal_Job_ID(localJobID);
-//            existingGramData.setRsl(bytes);
-//            gramData = em.merge(existingGramData);
-//        }  else {
-//            em.persist(gramData);
-//        }
-//        em.getTransaction().commit();
-//        em.close();
-//    }
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
new file mode 100644
index 0000000..b4f731b
--- /dev/null
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
@@ -0,0 +1,92 @@
+/*
+ *
+ * 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.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+
+import java.sql.Timestamp;
+import java.util.List;
+
+public class JobDetailResource extends AbstractResource {
+    private String jobId;
+    private String taskId;
+    private String jobDescription;
+    private Timestamp creationTime;
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getJobDescription() {
+        return jobDescription;
+    }
+
+    public void setJobDescription(String jobDescription) {
+        this.jobDescription = jobDescription;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    @Override
+    public Resource create(ResourceType type) {
+        return null;
+    }
+
+    @Override
+    public void remove(ResourceType type, Object name) {
+
+    }
+
+    @Override
+    public Resource get(ResourceType type, Object name) {
+        return null;
+    }
+
+    @Override
+    public List<Resource> get(ResourceType type) {
+        return null;
+    }
+
+    @Override
+    public void save() {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java
deleted file mode 100644
index efbfcb6..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeDataResource.java
+++ /dev/null
@@ -1,274 +0,0 @@
-///*
-// *
-// * 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.resources;
-//
-//
-//import org.apache.airavata.persistance.registry.jpa.Resource;
-//import org.apache.airavata.persistance.registry.jpa.ResourceType;
-//import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-//import org.apache.airavata.persistance.registry.jpa.model.*;
-//import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import javax.persistence.EntityManager;
-//import javax.persistence.Query;
-//import java.sql.Timestamp;
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//public class NodeDataResource extends AbstractResource{
-//    private final static Logger logger = LoggerFactory.getLogger(NodeDataResource.class);
-//    private WorkflowDataResource workflowDataResource;
-//    private String nodeID;
-//    private String nodeType;
-//    private String inputs;
-//    private String outputs;
-//    private String status;
-//    private Timestamp startTime;
-//    private Timestamp lastUpdateTime;
-//    private int executionIndex;
-//
-//    public WorkflowDataResource getWorkflowDataResource() {
-//        return workflowDataResource;
-//    }
-//
-//    public String getNodeID() {
-//        return nodeID;
-//    }
-//
-//    public String getNodeType() {
-//        return nodeType;
-//    }
-//
-//    public String getInputs() {
-//        return inputs;
-//    }
-//
-//    public String getOutputs() {
-//        return outputs;
-//    }
-//
-//    public String getStatus() {
-//        return status;
-//    }
-//
-//    public Timestamp getStartTime() {
-//        return startTime;
-//    }
-//
-//    public Timestamp getLastUpdateTime() {
-//        return lastUpdateTime;
-//    }
-//
-//    public void setWorkflowDataResource(WorkflowDataResource workflowDataResource) {
-//        this.workflowDataResource = workflowDataResource;
-//    }
-//
-//    public void setNodeID(String nodeID) {
-//        this.nodeID = nodeID;
-//    }
-//
-//    public void setNodeType(String nodeType) {
-//        this.nodeType = nodeType;
-//    }
-//
-//    public void setInputs(String inputs) {
-//        this.inputs = inputs;
-//    }
-//
-//    public void setOutputs(String outputs) {
-//        this.outputs = outputs;
-//    }
-//
-//    public void setStatus(String status) {
-//        this.status = status;
-//    }
-//
-//    public void setStartTime(Timestamp startTime) {
-//        this.startTime = startTime;
-//    }
-//
-//    public void setLastUpdateTime(Timestamp lastUpdateTime) {
-//        this.lastUpdateTime = lastUpdateTime;
-//    }
-//
-//    public Resource create(ResourceType type) {
-//        switch (type){
-//            case GFAC_JOB_DATA:
-//                GFacJobDataResource gFacJobDataResource = new GFacJobDataResource();
-//                gFacJobDataResource.setWorkflowDataResource(workflowDataResource);
-//                gFacJobDataResource.setNodeID(nodeID);
-//                return gFacJobDataResource;
-//            default:
-//                logger.error("Unsupported resource type for node data resource.", new IllegalArgumentException());
-//                throw new IllegalArgumentException("Unsupported resource type for node data resource.");
-//        }
-//    }
-//
-//    public void remove(ResourceType type, Object name) {
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        Query q;
-//        QueryGenerator generator;
-//        switch (type){
-//            case GFAC_JOB_DATA:
-//                generator = new QueryGenerator(GFAC_JOB_DATA);
-//                generator.setParameter(GFacJobDataConstants.LOCAL_JOB_ID, name);
-//                q = generator.deleteQuery(em);
-//                q.executeUpdate();
-//                break;
-//            default:
-//                logger.error("Unsupported resource type for node data resource.", new IllegalArgumentException());
-//                break;
-//        }
-//        em.getTransaction().commit();
-//        em.close();
-//    }
-//
-//    public Resource get(ResourceType type, Object name) {
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        QueryGenerator generator;
-//        Query q;
-//        switch (type) {
-//            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 node data resource.", new IllegalArgumentException());
-//                throw new IllegalArgumentException("Unsupported resource type for node data resource.");
-//        }
-//    }
-//
-//    public List<Resource> getGFacJobs(){
-//    	return get(ResourceType.GFAC_JOB_DATA);
-//    }
-//    public List<Resource> get(ResourceType type) {
-//        List<Resource> resourceList = new ArrayList<Resource>();
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        Query q;
-//        QueryGenerator generator;
-//        List<?> results;
-//        switch (type){
-//            case EXECUTION_ERROR:
-//                generator = new QueryGenerator(EXECUTION_ERROR);
-//                generator.setParameter(ExecutionErrorConstants.NODE_ID, nodeID);
-//                q = generator.selectQuery(em);
-//                results = q.getResultList();
-//                if (results.size() != 0) {
-//                    for (Object result : results) {
-//                        Execution_Error execution_error = (Execution_Error)result;
-//                        ExecutionErrorResource executionErrorResource = (ExecutionErrorResource)Utils.getResource(ResourceType.EXECUTION_ERROR, execution_error);
-//                        resourceList.add(executionErrorResource);
-//                    }
-//                }
-//                break;
-//            case GFAC_JOB_DATA:
-//                generator = new QueryGenerator(GFAC_JOB_DATA);
-//                generator.setParameter(GFacJobDataConstants.EXPERIMENT_ID, workflowDataResource.getExperimentID());
-//                generator.setParameter(GFacJobDataConstants.WORKFLOW_INSTANCE_ID, workflowDataResource.getWorkflowInstanceID());
-//                generator.setParameter(GFacJobDataConstants.NODE_ID, nodeID);
-//                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 node data resource.", new IllegalArgumentException());
-//                throw new IllegalArgumentException("Unsupported resource type for node data resource.");
-//        }
-//        em.getTransaction().commit();
-//        em.close();
-//        return resourceList;
-//    }
-//
-//    public void save() {
-//        if(lastUpdateTime == null){
-//            java.util.Date date= new java.util.Date();
-//            lastUpdateTime = new Timestamp(date.getTime());
-//        }
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        Node_Data existingNodeData = em.find(Node_Data.class, new Node_DataPK(workflowDataResource.getWorkflowInstanceID(), nodeID, executionIndex));
-//        em.close();
-//
-//        em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        Node_Data nodeData = new Node_Data();
-//        nodeData.setNode_id(nodeID);
-//        Workflow_Data workflow_data = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
-//        nodeData.setWorkflow_Data(workflow_data);
-//        byte[] inputsByte = null;
-//        if (inputs!=null) {
-//			inputsByte = inputs.getBytes();
-//			nodeData.setInputs(inputsByte);
-//		}
-//		byte[] outputsByte = null;
-//        if (outputs!=null) {
-//			outputsByte = outputs.getBytes();
-//			nodeData.setOutputs(outputsByte);
-//		}
-//		nodeData.setNode_type(nodeType);
-//        nodeData.setLast_update_time(lastUpdateTime);
-//        nodeData.setStart_time(startTime);
-//        nodeData.setStatus(status);
-//        nodeData.setExecution_index(executionIndex);
-//        if(existingNodeData != null){
-//            existingNodeData.setInputs(inputsByte);
-//            existingNodeData.setOutputs(outputsByte);
-//            existingNodeData.setLast_update_time(lastUpdateTime);
-//            existingNodeData.setNode_type(nodeType);
-//            existingNodeData.setStart_time(startTime);
-//            existingNodeData.setStatus(status);
-//            existingNodeData.setExecution_index(executionIndex);
-//            nodeData = em.merge(existingNodeData);
-//        }  else {
-//            em.persist(nodeData);
-//        }
-//        em.getTransaction().commit();
-//        em.close();
-//    }
-//
-//    public int getExecutionIndex() {
-//        return executionIndex;
-//    }
-//
-//    public void setExecutionIndex(int executionIndex) {
-//        this.executionIndex = executionIndex;
-//    }
-//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
new file mode 100644
index 0000000..dd7d484
--- /dev/null
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
@@ -0,0 +1,100 @@
+/*
+ *
+ * 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.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+
+import java.util.List;
+
+public class NodeInputResource extends AbstractResource {
+    private String nodeInstanceId;
+    private String inputKey;
+    private String inputType;
+    private String metadata;
+    private String value;
+
+    public String getNodeInstanceId() {
+        return nodeInstanceId;
+    }
+
+    public void setNodeInstanceId(String nodeInstanceId) {
+        this.nodeInstanceId = nodeInstanceId;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+
+    public String getInputType() {
+        return inputType;
+    }
+
+    public void setInputType(String inputType) {
+        this.inputType = inputType;
+    }
+
+    public String getMetadata() {
+        return metadata;
+    }
+
+    public void setMetadata(String metadata) {
+        this.metadata = metadata;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public Resource create(ResourceType type) {
+        return null;
+    }
+
+    @Override
+    public void remove(ResourceType type, Object name) {
+
+    }
+
+    @Override
+    public Resource get(ResourceType type, Object name) {
+        return null;
+    }
+
+    @Override
+    public List<Resource> get(ResourceType type) {
+        return null;
+    }
+
+    @Override
+    public void save() {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
new file mode 100644
index 0000000..9d27c22
--- /dev/null
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
@@ -0,0 +1,100 @@
+/*
+ *
+ * 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.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+
+import java.util.List;
+
+public class NodeOutputResource extends AbstractResource {
+    private String nodeInstanceId;
+    private String outputKey;
+    private String outputType;
+    private String metadata;
+    private String value;
+
+    public String getNodeInstanceId() {
+        return nodeInstanceId;
+    }
+
+    public void setNodeInstanceId(String nodeInstanceId) {
+        this.nodeInstanceId = nodeInstanceId;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+
+    public String getOutputType() {
+        return outputType;
+    }
+
+    public void setOutputType(String outputType) {
+        this.outputType = outputType;
+    }
+
+    public String getMetadata() {
+        return metadata;
+    }
+
+    public void setMetadata(String metadata) {
+        this.metadata = metadata;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public Resource create(ResourceType type) {
+        return null;
+    }
+
+    @Override
+    public void remove(ResourceType type, Object name) {
+
+    }
+
+    @Override
+    public Resource get(ResourceType type, Object name) {
+        return null;
+    }
+
+    @Override
+    public List<Resource> get(ResourceType type) {
+        return null;
+    }
+
+    @Override
+    public void save() {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/OrchestratorDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/OrchestratorDataResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/OrchestratorDataResource.java
deleted file mode 100644
index c23ca2f..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/OrchestratorDataResource.java
+++ /dev/null
@@ -1,189 +0,0 @@
-///*
-// *
-// * 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.resources;
-//
-//import java.sql.Timestamp;
-//import java.util.List;
-//
-//import javax.persistence.EntityManager;
-//
-//import org.apache.airavata.persistance.registry.jpa.Resource;
-//import org.apache.airavata.persistance.registry.jpa.ResourceType;
-//import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-//import org.apache.airavata.persistance.registry.jpa.model.Orchestrator;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//public class OrchestratorDataResource extends AbstractResource {
-//
-//	private final static Logger log = LoggerFactory.getLogger(OrchestratorDataResource.class);
-//	private String experimentID;
-//	private String userName;
-//	private String applicationName;
-//	private String status;
-//	private String state;
-//	private String gfacEPR;
-//	private String jobRequest;
-//	private GatewayResource gateway;
-//    private Timestamp submittedTime;
-//    private Timestamp statusUpdateTime;
-//
-//	public String getExperimentID() {
-//		return experimentID;
-//	}
-//
-//	public String getUserName() {
-//		return userName;
-//	}
-//
-//	public void setExperimentID(String experimentID) {
-//		this.experimentID = experimentID;
-//	}
-//
-//	public void setUserName(String userName) {
-//		this.userName = userName;
-//	}
-//
-//	public String getApplicationName() {
-//		return applicationName;
-//	}
-//
-//	public void setApplicationName(String applicationName) {
-//		this.applicationName = applicationName;
-//	}
-//
-//	public String getStatus() {
-//		return status;
-//	}
-//
-//	public void setStatus(String status) {
-//		this.status = status;
-//	}
-//
-//	public String getState() {
-//		return state;
-//	}
-//
-//	public void setState(String state) {
-//		this.state = state;
-//	}
-//
-//	public String getGfacEPR() {
-//		return gfacEPR;
-//	}
-//
-//	public void setGfacEPR(String gfacEPR) {
-//		this.gfacEPR = gfacEPR;
-//	}
-//
-//	public String getJobRequest() {
-//		return jobRequest;
-//	}
-//
-//	public void setJobRequest(String jobRequest) {
-//		this.jobRequest = jobRequest;
-//	}
-//
-//	public GatewayResource getGateway() {
-//		return gateway;
-//	}
-//
-//	public void setGateway(GatewayResource gateway) {
-//		this.gateway = gateway;
-//	}
-//
-//	public Timestamp getSubmittedTime() {
-//		return submittedTime;
-//	}
-//
-//	public void setSubmittedTime(Timestamp submittedTime) {
-//		this.submittedTime = submittedTime;
-//	}
-//
-//	public Timestamp getStatusUpdateTime() {
-//		return statusUpdateTime;
-//	}
-//
-//	public void setStatusUpdateTime(Timestamp statusUpdateTime) {
-//		this.statusUpdateTime = statusUpdateTime;
-//	}
-//
-//	@Override
-//	public Resource create(ResourceType type) {
-//        log.error("Unsupported resource type for orchestrator resource.", new IllegalArgumentException());
-//        throw new IllegalArgumentException("Unsupported resource type for orchestrator resource.");
-//    }
-//
-//	@Override
-//	public void remove(ResourceType type, Object name) {
-//		   log.error("Unsupported operation to remove orchestrator data.", new UnsupportedOperationException());
-//	       throw new UnsupportedOperationException();
-//	}
-//
-//	@Override
-//	public Resource get(ResourceType type, Object name) {
-//        log.error("Unsupported resource type for orchestrator data.", new UnsupportedOperationException());
-//        throw new UnsupportedOperationException();
-//	}
-//
-//	@Override
-//	public List<Resource> get(ResourceType type) {
-//        log.error("Unsupported resource type for orchestrator data.", new UnsupportedOperationException());
-//        throw new UnsupportedOperationException();
-//	}
-//
-//	@Override
-//	public void save() {
-//		EntityManager em = ResourceUtils.getEntityManager();
-//		Orchestrator existingOrchestrator = em.find(Orchestrator.class,
-//				experimentID);
-//		em.close();
-//		em = ResourceUtils.getEntityManager();
-//		em.getTransaction().begin();
-//		Orchestrator orchestrator = new Orchestrator();
-//		orchestrator.setExperiment_ID(experimentID);
-//		orchestrator.setUserName(userName);
-//		orchestrator.setGfacEPR(gfacEPR);
-//		orchestrator.setState(state);
-//		orchestrator.setStatus(status);
-//		orchestrator.setApplicationName(applicationName);
-//		orchestrator.setJobRequest(jobRequest);
-//		orchestrator.setSubmittedTime(submittedTime);
-//		orchestrator.setStatusUpdateTime(statusUpdateTime);
-//		if (existingOrchestrator != null) {
-//			existingOrchestrator.setExperiment_ID(experimentID);
-//			existingOrchestrator.setUserName(userName);
-//			existingOrchestrator.setState(state);
-//			existingOrchestrator.setStatus(status);
-//			existingOrchestrator.setGfacEPR(gfacEPR);
-//			existingOrchestrator.setApplicationName(applicationName);
-//			existingOrchestrator.setJobRequest(jobRequest);
-//			existingOrchestrator.setSubmittedTime(submittedTime);
-//			existingOrchestrator.setStatusUpdateTime(statusUpdateTime);
-//			orchestrator = em.merge(existingOrchestrator);
-//		} else {
-//			em.persist(orchestrator);
-//		}
-//		em.getTransaction().commit();
-//		em.close();
-//	}
-//
-//}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
index c8877fe..fa188ef 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
@@ -82,19 +82,19 @@ public class ProjectResource extends AbstractResource {
      * @param name child resource name
      */
     public void remove(ResourceType type, Object name) {
-        EntityManager em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        if (type == ResourceType.EXPERIMENT_METADATA) {
-        	QueryGenerator generator = new QueryGenerator(EXPERIMENT_METADATA);
-        	generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
-        	Query q = generator.deleteQuery(em);
-        	q.executeUpdate();
-        }else {
+//        EntityManager em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+//        if (type == ResourceType.EXPERIMENT_METADATA) {
+//        	QueryGenerator generator = new QueryGenerator(EXPERIMENT_METADATA);
+//        	generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
+//        	Query q = generator.deleteQuery(em);
+//        	q.executeUpdate();
+//        }else {
             logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
             throw new IllegalArgumentException("Unsupported resource type for project resource.");
-        }
-        em.getTransaction().commit();
-        em.close();
+//        }
+//        em.getTransaction().commit();
+//        em.close();
     }
 
     /**
@@ -265,7 +265,8 @@ public class ProjectResource extends AbstractResource {
      * @return whether the experiment exist
      */
     public boolean isExperimentExists(String experimentId){
-		return isExists(ResourceType.EXPERIMENT_METADATA, experimentId);
+//		return isExists(ResourceType.EXPERIMENT_METADATA, experimentId);
+        return true;
 	}
 
     /**
@@ -306,7 +307,7 @@ public class ProjectResource extends AbstractResource {
      * @param experimentId experiment ID
      */
     public void removeExperiment(String experimentId){
-		remove(ResourceType.EXPERIMENT_METADATA, experimentId);
+//		remove(ResourceType.EXPERIMENT_METADATA, experimentId);
 	}
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a584c2c7/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
new file mode 100644
index 0000000..830db7c
--- /dev/null
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
@@ -0,0 +1,109 @@
+/*
+ *
+ * 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.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+
+import java.util.List;
+
+public class QosParamResource extends AbstractResource {
+    private int  qosId;
+    private ExperimentResource experimentResource;
+    private TaskDetailResource taskDetailResource;
+    private String startExecutionAt;
+    private String executeBefore;
+    private int noOfRetries;
+
+    public int getQosId() {
+        return qosId;
+    }
+
+    public void setQosId(int qosId) {
+        this.qosId = qosId;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public String getStartExecutionAt() {
+        return startExecutionAt;
+    }
+
+    public void setStartExecutionAt(String startExecutionAt) {
+        this.startExecutionAt = startExecutionAt;
+    }
+
+    public String getExecuteBefore() {
+        return executeBefore;
+    }
+
+    public void setExecuteBefore(String executeBefore) {
+        this.executeBefore = executeBefore;
+    }
+
+    public int getNoOfRetries() {
+        return noOfRetries;
+    }
+
+    public void setNoOfRetries(int noOfRetries) {
+        this.noOfRetries = noOfRetries;
+    }
+
+    @Override
+    public Resource create(ResourceType type) {
+        return null;
+    }
+
+    @Override
+    public void remove(ResourceType type, Object name) {
+
+    }
+
+    @Override
+    public Resource get(ResourceType type, Object name) {
+        return null;
+    }
+
+    @Override
+    public List<Resource> get(ResourceType type) {
+        return null;
+    }
+
+    @Override
+    public void save() {
+
+    }
+}


Mime
View raw message