airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [3/6] Adding data models for execution - AIRAVATA-994 - Integration test failures can occur
Date Tue, 04 Feb 2014 19:52:18 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/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 37cfd80..7b7d6ad 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,284 +1,287 @@
-/*
- *
- * 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;
-
-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) {
-        EntityManager em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        Query q;
-        QueryGenerator generator;
-        switch (type){
-            case EXPERIMENT_DATA:
-                generator = new QueryGenerator(EXPERIMENT_DATA);
-                generator.setParameter(ExperimentDataConstants.EXPERIMENT_ID, name);
-                q = generator.deleteQuery(em);
-                q.executeUpdate();
-                break;
-        }
-        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) {
-            case EXPERIMENT_DATA:
-                generator = new QueryGenerator(EXPERIMENT_DATA);
-                generator.setParameter(ExperimentDataConstants.EXPERIMENT_ID, name);
-                q = generator.selectQuery(em);
-                Experiment_Data experimentData = (Experiment_Data)q.getSingleResult();
-                ExperimentDataResource experimentDataResource = (ExperimentDataResource)Utils.getResource(ResourceType.EXPERIMENT_DATA, experimentData);
-                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() {
-        EntityManager em = ResourceUtils.getEntityManager();
-        Experiment existingExp = em.find(Experiment.class, expID);
-        em.close();
-
-        em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        Experiment experiment = new Experiment();
-        Project projectmodel = em.find(Project.class, project.getName());
-        experiment.setProject(projectmodel);
-        Users user = em.find(Users.class, getWorker().getUser());
-        Gateway gateway = em.find(Gateway.class, getGateway().getGatewayName());
-        experiment.setProject(projectmodel);
-        experiment.setExperiment_ID(getExpID());
-        experiment.setUser(user);
-        experiment.setGateway(gateway);
-        experiment.setSubmitted_date(submittedDate);
-        if(existingExp != null){
-            existingExp.setGateway(gateway);
-            existingExp.setProject(projectmodel);
-            existingExp.setUser(user);
-            existingExp.setSubmitted_date(submittedDate);
-            experiment = em.merge(existingExp);
-        } else{
-           em.merge(experiment);
-        }
-
-        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;
-    	}
-    }
-}
+///*
+// *
+// * 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) {
+//        EntityManager em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+//        Query q;
+//        QueryGenerator generator;
+//        switch (type){
+//            case EXPERIMENT_DATA:
+//                generator = new QueryGenerator(EXPERIMENT_DATA);
+//                generator.setParameter(ExperimentDataConstants.EXPERIMENT_ID, name);
+//                q = generator.deleteQuery(em);
+//                q.executeUpdate();
+//                break;
+//        }
+//        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) {
+//            case EXPERIMENT_DATA:
+//                generator = new QueryGenerator(EXPERIMENT_DATA);
+//                generator.setParameter(ExperimentDataConstants.EXPERIMENT_ID, name);
+//                q = generator.selectQuery(em);
+//                Experiment_Data experimentData = (Experiment_Data)q.getSingleResult();
+//                ExperimentDataResource experimentDataResource = (ExperimentDataResource)Utils.getResource(ResourceType.EXPERIMENT_DATA, experimentData);
+//                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() {
+//        EntityManager em = ResourceUtils.getEntityManager();
+//        Experiment existingExp = em.find(Experiment.class, expID);
+//        em.close();
+//
+//        em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+//        Experiment experiment = new Experiment();
+//        Project projectmodel = em.find(Project.class, project.getName());
+//        experiment.setProject(projectmodel);
+//        Users user = em.find(Users.class, getWorker().getUser());
+//        Gateway gateway = em.find(Gateway.class, getGateway().getGatewayName());
+//        experiment.setProject(projectmodel);
+//        experiment.setExperiment_ID(getExpID());
+//        experiment.setUser(user);
+//        experiment.setGateway(gateway);
+//        experiment.setSubmitted_date(submittedDate);
+//        if(existingExp != null){
+//            existingExp.setGateway(gateway);
+//            existingExp.setProject(projectmodel);
+//            existingExp.setUser(user);
+//            existingExp.setSubmitted_date(submittedDate);
+//            experiment = em.merge(existingExp);
+//        } else{
+//           em.merge(experiment);
+//        }
+//
+//        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;
+////    	}
+////    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/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
new file mode 100644
index 0000000..8555006
--- /dev/null
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentSummaryResource.java
@@ -0,0 +1,110 @@
+/*
+ *
+ * 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);
+
+        if (existingExSummary != null){
+            existingExSummary.setLast_update_time(lastUpdateTime);
+            existingExSummary.setStatus(status);
+            existingExSummary.setExperiment_metadata(metadata);
+            exSummary = em.merge(existingExSummary);
+        }  else {
+            em.persist(exSummary);
+        }
+        em.getTransaction().commit();
+        em.close();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/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
index efade1a..35ea727 100644
--- 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
@@ -23,10 +23,7 @@ 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_Data;
-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.apache.airavata.persistance.registry.jpa.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -39,7 +36,7 @@ import java.util.List;
 
 public class GFacJobDataResource extends AbstractResource {
     private final static Logger logger = LoggerFactory.getLogger(GFacJobDataResource.class);
-    private ExperimentDataResource experimentDataResource;
+    private ExperimentMetadataResource metadataResource;
     private WorkflowDataResource workflowDataResource;
     private String nodeID;
     private String applicationDescID;
@@ -52,8 +49,8 @@ public class GFacJobDataResource extends AbstractResource {
     private String status;
     private String metadata;
 
-    public ExperimentDataResource getExperimentDataResource() {
-        return experimentDataResource;
+    public ExperimentMetadataResource getMetadataResource() {
+        return metadataResource;
     }
 
     public WorkflowDataResource getWorkflowDataResource() {
@@ -100,8 +97,8 @@ public class GFacJobDataResource extends AbstractResource {
         return metadata;
     }
 
-    public void setExperimentDataResource(ExperimentDataResource experimentDataResource) {
-        this.experimentDataResource = experimentDataResource;
+    public void setMetadataResource(ExperimentMetadataResource metadataResource) {
+        this.metadataResource = metadataResource;
     }
 
     public void setWorkflowDataResource(WorkflowDataResource workflowDataResource) {
@@ -217,9 +214,9 @@ public class GFacJobDataResource extends AbstractResource {
         em = ResourceUtils.getEntityManager();
         em.getTransaction().begin();
         GFac_Job_Data gFacJobData = new GFac_Job_Data();
-        Experiment_Data experiment_data = em.find(Experiment_Data.class, experimentDataResource.getExperimentID());
-        gFacJobData.setExperiment_data(experiment_data);
-        gFacJobData.setExperiment_ID(experimentDataResource.getExperimentID());
+        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());
@@ -234,9 +231,8 @@ public class GFacJobDataResource extends AbstractResource {
         gFacJobData.setStatus(status);
         gFacJobData.setMetadata(metadata);
         if(existingGfacJobData != null){
-            Experiment_Data experiment_data1 = em.find(Experiment_Data.class, experimentDataResource.getExperimentID());
-            existingGfacJobData.setExperiment_data(experiment_data1);
-            existingGfacJobData.setExperiment_ID(experimentDataResource.getExperimentID());
+            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());

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/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
index ee621ea..930b025 100644
--- 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
@@ -23,7 +23,6 @@ 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_Data;
 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;

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/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 93d1c2d..31ddfc1 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
@@ -124,10 +124,10 @@ public class GatewayResource extends AbstractResource {
                         new ApplicationDescriptorResource();
                 applicationDescriptorResource.setGatewayName(gatewayName);
                 return applicationDescriptorResource;
-            case EXPERIMENT:
-                ExperimentResource experimentResource =new ExperimentResource();
-                experimentResource.setGateway(this);
-                return experimentResource;
+            case EXPERIMENT_METADATA:
+                ExperimentMetadataResource metadataResource =new ExperimentMetadataResource();
+                metadataResource.setGateway(this);
+                return metadataResource;
             case GATEWAY_WORKER:
                 WorkerResource workerResource = new WorkerResource();
                 workerResource.setGateway(this);
@@ -180,10 +180,10 @@ public class GatewayResource extends AbstractResource {
                 q = generator.deleteQuery(em);
                 q.executeUpdate();
                 break;
-            case EXPERIMENT:
-                generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
-                generator.setParameter(ExperimentConstants.GATEWAY_NAME, gatewayName);
+            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;
@@ -254,14 +254,14 @@ public class GatewayResource extends AbstractResource {
                 em.getTransaction().commit();
                 em.close();
                 return hostDescriptorResource;
-            case EXPERIMENT:
-                generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
-                generator.setParameter(ExperimentConstants.GATEWAY_NAME, gatewayName);
+            case EXPERIMENT_METADATA:
+                generator = new QueryGenerator(EXPERIMENT_METADATA);
+                generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
+//                generator.setParameter(ExperimentMetadataConstants.GATEWAY_NAME, gatewayName);
                 q = generator.selectQuery(em);
-                Experiment experiment = (Experiment)q.getSingleResult();
-                ExperimentResource experimentResource =
-                        (ExperimentResource)Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                Experiment_Metadata experiment = (Experiment_Metadata)q.getSingleResult();
+                ExperimentMetadataResource experimentResource =
+                        (ExperimentMetadataResource)Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
                 em.getTransaction().commit();
                 em.close();
                 return experimentResource;
@@ -405,16 +405,16 @@ public class GatewayResource extends AbstractResource {
                     }
                 }
                 break;
-            case EXPERIMENT:
-                generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.GATEWAY_NAME, gatewayName);
+            case EXPERIMENT_METADATA:
+                generator = new QueryGenerator(EXPERIMENT_METADATA);
+                generator.setParameter(ExperimentMetadataConstants.GATEWAY_NAME, gatewayName);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
                 if (results.size() != 0) {
                     for (Object result : results) {
-                        Experiment experiment = (Experiment) result;
-                        ExperimentResource experimentResource =
-                                (ExperimentResource)Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                        Experiment_Metadata experiment = (Experiment_Metadata) result;
+                        ExperimentMetadataResource experimentResource =
+                                (ExperimentMetadataResource)Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
                         resourceList.add(experimentResource);
                     }
                 }
@@ -511,9 +511,9 @@ public class GatewayResource extends AbstractResource {
                 Application_Descriptor existingAppDesc = em.find(Application_Descriptor.class, new Application_Descriptor_PK(gatewayName, name.toString()));
                 em.close();
                 return existingAppDesc != null;
-            case EXPERIMENT:
+            case EXPERIMENT_METADATA:
                 em = ResourceUtils.getEntityManager();
-                Experiment existingExp = em.find(Experiment.class, name.toString());
+                Experiment_Metadata existingExp = em.find(Experiment_Metadata.class, name.toString());
                 em.close();
                 return existingExp != null;
             case ORCHESTRATOR:

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java
index 211909d..ca28006 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java
@@ -30,9 +30,6 @@ import org.slf4j.LoggerFactory;
 
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
-import javax.sql.rowset.serial.SerialBlob;
-import java.sql.Blob;
-import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.List;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/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 86412c6..1a22616 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
@@ -29,10 +29,7 @@ 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.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -67,11 +64,11 @@ public class ProjectResource extends AbstractResource {
      * @return child resource
      */
     public Resource create(ResourceType type) {
-        if (type == ResourceType.EXPERIMENT) {
-            ExperimentResource experimentResource = new ExperimentResource();
+        if (type == ResourceType.EXPERIMENT_METADATA) {
+            ExperimentMetadataResource experimentResource = new ExperimentMetadataResource();
             experimentResource.setGateway(getGateway());
+            experimentResource.setExecutionUser(getWorker().getUser());
             experimentResource.setProject(this);
-            experimentResource.setWorker(getWorker());
             return experimentResource;
         } else {
             logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
@@ -87,9 +84,9 @@ public class ProjectResource extends AbstractResource {
     public void remove(ResourceType type, Object name) {
         EntityManager em = ResourceUtils.getEntityManager();
         em.getTransaction().begin();
-        if (type == ResourceType.EXPERIMENT) {
-        	QueryGenerator generator = new QueryGenerator(EXPERIMENT);
-        	generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+        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 {
@@ -107,15 +104,15 @@ public class ProjectResource extends AbstractResource {
      * @return child resource
      */
     public Resource get(ResourceType type, Object name) {
-        if (type == ResourceType.EXPERIMENT) {
+        if (type == ResourceType.EXPERIMENT_METADATA) {
             EntityManager em = ResourceUtils.getEntityManager();
             em.getTransaction().begin();
-        	QueryGenerator generator = new QueryGenerator(EXPERIMENT);
-        	generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+        	QueryGenerator generator = new QueryGenerator(EXPERIMENT_METADATA);
+        	generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
         	Query q = generator.selectQuery(em);
-            Experiment experiment = (Experiment) q.getSingleResult();
-            ExperimentResource experimentResource = (ExperimentResource)
-                    Utils.getResource(ResourceType.EXPERIMENT, experiment);
+            Experiment_Metadata experiment = (Experiment_Metadata) q.getSingleResult();
+            ExperimentMetadataResource experimentResource = (ExperimentMetadataResource)
+                    Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
             em.getTransaction().commit();
             em.close();
             return experimentResource;
@@ -160,18 +157,18 @@ public class ProjectResource extends AbstractResource {
     public List<Resource> get(ResourceType type) {
         List<Resource> resourceList = new ArrayList<Resource>();
 
-        if (type == ResourceType.EXPERIMENT) {
+        if (type == ResourceType.EXPERIMENT_METADATA) {
             EntityManager em = ResourceUtils.getEntityManager();
             em.getTransaction().begin();
-        	QueryGenerator generator = new QueryGenerator(EXPERIMENT);
-        	generator.setParameter(ExperimentConstants.PROJECT_NAME, name);
+        	QueryGenerator generator = new QueryGenerator(EXPERIMENT_METADATA);
+        	generator.setParameter(ExperimentMetadataConstants.PROJECT_NAME, name);
         	Query q = generator.selectQuery(em);
             List<?> results = q.getResultList();
             if (results.size() != 0) {
                 for (Object result : results) {
-                    Experiment experiment = (Experiment) result;
-                    ExperimentResource experimentResource = (ExperimentResource)
-                            Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                    Experiment_Metadata experiment = (Experiment_Metadata) result;
+                    ExperimentMetadataResource experimentResource = (ExperimentMetadataResource)
+                            Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
                     resourceList.add(experimentResource);
                 }
             }
@@ -268,7 +265,7 @@ public class ProjectResource extends AbstractResource {
      * @return whether the experiment exist
      */
     public boolean isExperimentExists(String experimentId){
-		return isExists(ResourceType.EXPERIMENT, experimentId);
+		return isExists(ResourceType.EXPERIMENT_METADATA, experimentId);
 	}
 
     /**
@@ -276,8 +273,8 @@ public class ProjectResource extends AbstractResource {
      * @param experimentId experiment ID
      * @return  experiment resource
      */
-    public ExperimentResource createExperiment(String experimentId){
-		ExperimentResource experimentResource = (ExperimentResource)create(ResourceType.EXPERIMENT);
+    public ExperimentMetadataResource createExperiment(String experimentId){
+		ExperimentMetadataResource experimentResource = (ExperimentMetadataResource)create(ResourceType.EXPERIMENT_METADATA);
 		experimentResource.setExpID(experimentId);
 		return experimentResource;
 	}
@@ -287,19 +284,19 @@ public class ProjectResource extends AbstractResource {
      * @param experimentId experiment ID
      * @return experiment resource
      */
-	public ExperimentResource getExperiment(String experimentId){
-		return (ExperimentResource)get(ResourceType.EXPERIMENT,experimentId);
+	public ExperimentMetadataResource getExperiment(String experimentId){
+		return (ExperimentMetadataResource)get(ResourceType.EXPERIMENT_METADATA,experimentId);
 	}
 
     /**
      *
      * @return  list of experiments
      */
-    public List<ExperimentResource> getExperiments(){
-		List<Resource> list = get(ResourceType.EXPERIMENT);
-		List<ExperimentResource> result=new ArrayList<ExperimentResource>();
+    public List<ExperimentMetadataResource> getExperiments(){
+		List<Resource> list = get(ResourceType.EXPERIMENT_METADATA);
+		List<ExperimentMetadataResource> result=new ArrayList<ExperimentMetadataResource>();
 		for (Resource resource : list) {
-			result.add((ExperimentResource) resource);
+			result.add((ExperimentMetadataResource) resource);
 		}
 		return result;
 	}
@@ -309,7 +306,7 @@ public class ProjectResource extends AbstractResource {
      * @param experimentId experiment ID
      */
     public void removeExperiment(String experimentId){
-		remove(ResourceType.EXPERIMENT, experimentId);
+		remove(ResourceType.EXPERIMENT_METADATA, experimentId);
 	}
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
index c7b55de..417a724 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -226,13 +226,6 @@ public class Utils {
                     logger.error("Object should be a Application Descriptor.", new IllegalArgumentException());
                     throw new IllegalArgumentException("Object should be a Application Descriptor.");
                 }
-            case EXPERIMENT:
-                if (o instanceof Experiment){
-                    return createExperiment((Experiment) o);
-                }  else {
-                    logger.error("Object should be a Experiment.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment.");
-                }
             case USER:
                 if(o instanceof Users) {
                     return createUser((Users) o);
@@ -275,19 +268,40 @@ public class Utils {
                     logger.error("Object should be a Gateway Worker.", new IllegalArgumentException());
                     throw  new IllegalArgumentException("Object should be a Gateway Worker.");
                 }
-            case EXPERIMENT_DATA:
-                if (o instanceof  Experiment_Data){
-                    return createExperimentData((Experiment_Data)o);
-                }else {
-                    logger.error("Object should be a Experiment Data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment Data.");
-                }
             case EXPERIMENT_METADATA:
                 if (o instanceof  Experiment_Metadata){
                     return createExperimentMetadata((Experiment_Metadata)o);
                 }else {
-                    logger.error("Object should be a Experiment Metadata.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment Metadata.");
+                    logger.error("Object should be a Experiment MetaData.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment MetaData.");
+                }
+            case EXPERIMENT_CONFIG_DATA:
+                if (o instanceof  Experiment_Configuration_Data){
+                    return createExperimentConfigData((Experiment_Configuration_Data)o);
+                }else {
+                    logger.error("Object should be a Experiment Config data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment Config data.");
+                }
+            case EXPERIMENT_SUMMARY:
+                if (o instanceof  Experiment_Summary){
+                    return createExperimentSummary((Experiment_Summary)o);
+                }else {
+                    logger.error("Object should be a Experiment Summary data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment Summary data.");
+                }
+            case EXPERIMENT_INPUT:
+                if (o instanceof  Experiment_Input){
+                    return createExperimentInput((Experiment_Input)o);
+                }else {
+                    logger.error("Object should be a Experiment input data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment input data.");
+                }
+            case EXPERIMENT_OUTPUT:
+                if (o instanceof  Experiment_Output){
+                    return createExperimentOutput((Experiment_Output)o);
+                }else {
+                    logger.error("Object should be a Experiment output data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment output data.");
                 }
             case WORKFLOW_DATA:
                 if (o instanceof  Workflow_Data){
@@ -404,25 +418,25 @@ public class Utils {
     }
 
     /**
-     *
+     * @deprecated
      * @param o Experiment model object
      * @return  Experiment resource object
      */
-    private static Resource createExperiment(Experiment o) {
-        ExperimentResource experimentResource = new ExperimentResource();
-        GatewayResource gatewayResource = (GatewayResource)createGateway(o.getGateway());
-        experimentResource.setGateway(gatewayResource);
-        Gateway_Worker gateway_worker = new Gateway_Worker();
-        gateway_worker.setGateway(o.getGateway());
-        gateway_worker.setUser(o.getUser());
-        WorkerResource workerResource = (WorkerResource) createGatewayWorker(gateway_worker);
-        experimentResource.setWorker(workerResource);
-        ProjectResource projectResource = (ProjectResource)createProject(o.getProject());
-        experimentResource.setProject(projectResource);
-        experimentResource.setExpID(o.getExperiment_ID());
-        experimentResource.setSubmittedDate(o.getSubmitted_date());
-        return experimentResource;
-    }
+//    private static Resource createExperiment(Experiment o) {
+//        ExperimentResource experimentResource = new ExperimentResource();
+//        GatewayResource gatewayResource = (GatewayResource)createGateway(o.getGateway());
+//        experimentResource.setGateway(gatewayResource);
+//        Gateway_Worker gateway_worker = new Gateway_Worker();
+//        gateway_worker.setGateway(o.getGateway());
+//        gateway_worker.setUser(o.getUser());
+//        WorkerResource workerResource = (WorkerResource) createGatewayWorker(gateway_worker);
+//        experimentResource.setWorker(workerResource);
+//        ProjectResource projectResource = (ProjectResource)createProject(o.getProject());
+//        experimentResource.setProject(projectResource);
+//        experimentResource.setExpID(o.getExperiment_ID());
+//        experimentResource.setSubmittedDate(o.getSubmitted_date());
+//        return experimentResource;
+//    }
 
     /**
      *
@@ -522,16 +536,41 @@ public class Utils {
     }
 
     /**
-     *
+     * @deprecated
      * @param o Experiment Data model object
      * @return Experiment Data resource object
      */
-    private static Resource createExperimentData(Experiment_Data o){
-        ExperimentDataResource experimentDataResource = new ExperimentDataResource();
-        experimentDataResource.setExperimentID(o.getExperiment_ID());
-        experimentDataResource.setExpName(o.getName());
-        experimentDataResource.setUserName(o.getUsername());
-        return experimentDataResource;
+//    private static Resource createExperimentData(Experiment_Data o){
+//        ExperimentDataResource experimentDataResource = new ExperimentDataResource();
+//        experimentDataResource.setExperimentID(o.getExperiment_ID());
+//        experimentDataResource.setExpName(o.getName());
+//        experimentDataResource.setUserName(o.getUsername());
+//        return experimentDataResource;
+//    }
+
+    private static Resource createExperimentConfigData(Experiment_Configuration_Data o){
+        ExperimentConfigDataResource exConfigDataResource = new ExperimentConfigDataResource();
+        ExperimentMetadataResource experimentMetadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+        exConfigDataResource.setExMetadata(experimentMetadata);
+        exConfigDataResource.setAiravataAutoSchedule(o.isAiravata_auto_schedule());
+        exConfigDataResource.setCleanAfterJob(o.isClean_after_job());
+        exConfigDataResource.setCpuCount(o.getTotal_cpu_count());
+        exConfigDataResource.setDataRegURL(o.getData_reg_url());
+        exConfigDataResource.setJobStartTime(o.getJob_start_time());
+        exConfigDataResource.setNodeCount(o.getNode_count());
+        exConfigDataResource.setNumberOfThreads(o.getNumber_of_threads());
+        exConfigDataResource.setOutputDataDir(o.getOutput_data_dir());
+        exConfigDataResource.setOverrideManualSchedule(o.isOverride_manual_schedule());
+        exConfigDataResource.setPersistOutputData(o.isPersist_output_data());
+        exConfigDataResource.setPhysicalMemory(o.getTotal_physical_memory());
+        exConfigDataResource.setProjectAccount(o.getComputational_project_account());
+        exConfigDataResource.setQueueName(o.getQueue_name());
+        exConfigDataResource.setResourceHostID(o.getResource_host_id());
+        exConfigDataResource.setStageInputsToWDir(o.isStage_input_files_to_working_dir());
+        exConfigDataResource.setWallTimeLimit(o.getWalltime_limit());
+        exConfigDataResource.setOverrideManualSchedule(o.isOverride_manual_schedule());
+        exConfigDataResource.setWorkingDir(o.getWorking_dir());
+        return exConfigDataResource;
     }
 
     /**
@@ -541,11 +580,48 @@ public class Utils {
      */
     private static Resource createExperimentMetadata(Experiment_Metadata o) {
         ExperimentMetadataResource experimentMetadataResource = new ExperimentMetadataResource();
-        experimentMetadataResource.setExpID(o.getExperiment_ID());
-        experimentMetadataResource.setMetadata(new String(o.getMetadata()));
+        experimentMetadataResource.setExpID(o.getExperiment_id());
+        experimentMetadataResource.setDescription(o.getDescription());
+        Gateway_Worker gw = new Gateway_Worker();
+        gw.setGateway(o.getGateway());
+        experimentMetadataResource.setExecutionUser(o.getExecution_user());
+        experimentMetadataResource.setShareExp(o.isShare_experiment());
+        experimentMetadataResource.setSubmittedDate(o.getSubmitted_date());
+        GatewayResource gResource = (GatewayResource)createGateway(o.getGateway());
+        experimentMetadataResource.setGateway(gResource);
+        ProjectResource pResource = (ProjectResource)createProject(o.getProject());
+        experimentMetadataResource.setProject(pResource);
+        experimentMetadataResource.setExperimentName(o.getExperiment_name());
         return experimentMetadataResource;
     }
 
+    private static Resource createExperimentSummary (Experiment_Summary o){
+        ExperimentSummaryResource summaryResource = new ExperimentSummaryResource();
+        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+        summaryResource.setExperimentMetadataResource(metadata);
+        summaryResource.setLastUpdateTime(o.getLast_update_time());
+        summaryResource.setStatus(o.getStatus());
+        return summaryResource;
+    }
+
+    private static Resource createExperimentInput (Experiment_Input o){
+        ExperimentInputResource eInputResource = new ExperimentInputResource();
+        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+        eInputResource.setExperimentMetadataResource(metadata);
+        eInputResource.setExperimentKey(o.getEx_key());
+        eInputResource.setValue(o.getValue());
+        return eInputResource;
+    }
+
+    private static Resource createExperimentOutput (Experiment_Output o){
+        ExperimentOutputResource eOutputResource = new ExperimentOutputResource();
+        ExperimentMetadataResource metadata = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
+        eOutputResource.setExperimentMetadataResource(metadata);
+        eOutputResource.setExperimentKey(o.getEx_key());
+        eOutputResource.setValue(o.getValue());
+        return eOutputResource;
+    }
+
     /**
      *
      * @param o  Workflow_Data model object
@@ -553,7 +629,7 @@ public class Utils {
      */
     private static Resource createWorkflowData(Workflow_Data o){
         WorkflowDataResource workflowDataResource = new WorkflowDataResource();
-        workflowDataResource.setExperimentID(o.getExperiment_data().getExperiment_ID());
+        workflowDataResource.setExperimentID(o.getExperiment_data().getExperiment_id());
         workflowDataResource.setWorkflowInstanceID(o.getWorkflow_instanceID());
         workflowDataResource.setTemplateName(o.getTemplate_name());
         workflowDataResource.setStatus(o.getStatus());
@@ -604,8 +680,8 @@ public class Utils {
 
     private static Resource createExecutionError(Execution_Error o){
         ExecutionErrorResource executionErrorResource = new ExecutionErrorResource();
-        ExperimentDataResource experimentDataResource = (ExperimentDataResource)createExperimentData(o.getExperiment_Data());
-        executionErrorResource.setExperimentDataResource(experimentDataResource);
+        ExperimentMetadataResource experimentDataResource = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_MetaData());
+        executionErrorResource.setMetadataResource(experimentDataResource);
         WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
         executionErrorResource.setWorkflowDataResource(workflowDataResource);
         executionErrorResource.setNodeID(o.getNode_id());
@@ -625,9 +701,9 @@ public class Utils {
 
     private static Resource createGfacJobData (GFac_Job_Data o){
         GFacJobDataResource gFacJobDataResource = new GFacJobDataResource();
-        ExperimentDataResource experimentDataResource = (ExperimentDataResource)createExperimentData(o.getExperiment_data());
+        ExperimentMetadataResource experimentDataResource = (ExperimentMetadataResource)createExperimentMetadata(o.getExperiment_metadata());
         WorkflowDataResource workflowDataResource = (WorkflowDataResource)createWorkflowData(o.getWorkflow_Data());
-        gFacJobDataResource.setExperimentDataResource(experimentDataResource);
+        gFacJobDataResource.setMetadataResource(experimentDataResource);
         gFacJobDataResource.setWorkflowDataResource(workflowDataResource);
         gFacJobDataResource.setNodeID(o.getNode_id());
         gFacJobDataResource.setApplicationDescID(o.getApplication_descriptor_ID());

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
index 91e6792..114416d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
@@ -78,9 +78,9 @@ public class WorkerResource extends AbstractResource {
 				userWorkflowResource.setGateway(gateway);
 				result=userWorkflowResource;
                 break;
-            case EXPERIMENT:
-                ExperimentResource experimentResource = new ExperimentResource();
-                experimentResource.setWorker(this);
+            case EXPERIMENT_METADATA:
+                ExperimentMetadataResource experimentResource = new ExperimentMetadataResource();
+                experimentResource.setExecutionUser(user);
                 experimentResource.setGateway(gateway);
                 result=experimentResource;
                 break;
@@ -117,10 +117,9 @@ public class WorkerResource extends AbstractResource {
                 q = generator.deleteQuery(em);
 	            q.executeUpdate();
 	            break;
-			case EXPERIMENT:
-                generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.USERNAME, getUser());
-                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+			case EXPERIMENT_METADATA:
+                generator = new QueryGenerator(EXPERIMENT_METADATA);
+                generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
                 q = generator.deleteQuery(em);
 	            q.executeUpdate();
 	            break;
@@ -167,13 +166,12 @@ public class WorkerResource extends AbstractResource {
 	            User_Workflow userWorkflow = (User_Workflow) q.getSingleResult();
                 result= Utils.getResource(ResourceType.USER_WORKFLOW, userWorkflow);
 	            break;
-			case EXPERIMENT:
-                generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.USERNAME, getUser());
-                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+			case EXPERIMENT_METADATA:
+                generator = new QueryGenerator(EXPERIMENT_METADATA);
+                generator.setParameter(ExperimentMetadataConstants.EXPERIMENT_ID, name);
                 q = generator.selectQuery(em);
-	            Experiment experiment = (Experiment) q.getSingleResult();
-                result= Utils.getResource(ResourceType.EXPERIMENT, experiment);
+	            Experiment_Metadata experiment = (Experiment_Metadata) q.getSingleResult();
+                result= Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
 				break;
 			case WORKFLOW_DATA:
                 generator = new QueryGenerator(WORKFLOW_DATA);
@@ -276,14 +274,13 @@ public class WorkerResource extends AbstractResource {
 		            result.add(userWorkflowResource);
 	            }
 	            break;
-			case EXPERIMENT:
-                generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.USERNAME, getUser());
-                generator.setParameter(ExperimentConstants.GATEWAY_NAME, gateway.getGatewayName());
+			case EXPERIMENT_METADATA:
+                generator = new QueryGenerator(EXPERIMENT_METADATA);
+                generator.setParameter(ExperimentMetadataConstants.GATEWAY_NAME, gateway.getGatewayName());
                 q = generator.selectQuery(em);
 	            for (Object o : q.getResultList()) {
-	            	Experiment experiment = (Experiment) o;
-	            	ExperimentResource experimentResource = (ExperimentResource)Utils.getResource(ResourceType.EXPERIMENT, experiment);
+	            	Experiment_Metadata experiment = (Experiment_Metadata) o;
+	            	ExperimentMetadataResource experimentResource = (ExperimentMetadataResource)Utils.getResource(ResourceType.EXPERIMENT_METADATA, experiment);
 		            result.add(experimentResource);
 	            }
 	            break;
@@ -461,7 +458,7 @@ public class WorkerResource extends AbstractResource {
      * @return whether experiment is already exist for the given user
      */
 	public boolean isExperimentExists(String name){
-		return isExists(ResourceType.EXPERIMENT, name);
+		return isExists(ResourceType.EXPERIMENT_METADATA, name);
 	}
 	
 	/**
@@ -478,8 +475,8 @@ public class WorkerResource extends AbstractResource {
      * @param name experiment name
      * @return experiment resource
      */
-    public ExperimentResource getExperiment(String name){
-		return (ExperimentResource)get(ResourceType.EXPERIMENT, name);
+    public ExperimentMetadataResource getExperiment(String name){
+		return (ExperimentMetadataResource)get(ResourceType.EXPERIMENT_METADATA, name);
 	}
     
     public GFacJobDataResource getGFacJob(String jobId){
@@ -490,11 +487,11 @@ public class WorkerResource extends AbstractResource {
      *
      * @return list of experiments for the user
      */
-	public List<ExperimentResource> getExperiments(){
-		List<ExperimentResource> result=new ArrayList<ExperimentResource>();
-		List<Resource> list = get(ResourceType.EXPERIMENT);
+	public List<ExperimentMetadataResource> getExperiments(){
+		List<ExperimentMetadataResource> result=new ArrayList<ExperimentMetadataResource>();
+		List<Resource> list = get(ResourceType.EXPERIMENT_METADATA);
 		for (Resource resource : list) {
-			result.add((ExperimentResource) resource);
+			result.add((ExperimentMetadataResource) resource);
 		}
 		return result;
 	}
@@ -504,7 +501,7 @@ public class WorkerResource extends AbstractResource {
      * @param experimentId  experiment name
      */
 	public void removeExperiment(String experimentId){
-		remove(ResourceType.EXPERIMENT, experimentId);
+		remove(ResourceType.EXPERIMENT_METADATA, experimentId);
 	}
 	
     public boolean isWorkflowInstancePresent(String workflowInstanceId){

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
index 5a62416..23b9858 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowDataResource.java
@@ -301,7 +301,7 @@ public class WorkflowDataResource extends AbstractResource{
         em = ResourceUtils.getEntityManager();
         em.getTransaction().begin();
         Workflow_Data workflowData = new Workflow_Data();
-        Experiment_Data expData = em.find(Experiment_Data.class, experimentID);
+        Experiment_Metadata expData = em.find(Experiment_Metadata.class, experimentID);
         workflowData.setExperiment_data(expData);
         workflowData.setWorkflow_instanceID(workflowInstanceID);
         workflowData.setLast_update_time(lastUpdatedTime);

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml b/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
index 17c3479..c9cc9e0 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
@@ -33,9 +33,11 @@
         <class>org.apache.airavata.persistance.registry.jpa.model.Host_Descriptor</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Service_Descriptor</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Application_Descriptor</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Data</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Metadata</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Configuration_Data</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Summary</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Input</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Output</class>
 		<class>org.apache.airavata.persistance.registry.jpa.model.Workflow_Data</class>
 		<class>org.apache.airavata.persistance.registry.jpa.model.Node_Data</class>
 		<class>org.apache.airavata.persistance.registry.jpa.model.Gram_Data</class>
@@ -43,6 +45,7 @@
 		<class>org.apache.airavata.persistance.registry.jpa.model.GFac_Job_Data</class>
 		<class>org.apache.airavata.persistance.registry.jpa.model.GFac_Job_Status</class>
 		<class>org.apache.airavata.persistance.registry.jpa.model.Orchestrator</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
         <!--properties>
             <property name="openjpa.ConnectionURL"
                       value="jdbc:mysql://localhost:3306/persitant_data" />

http://git-wip-us.apache.org/repos/asf/airavata/blob/10b41d86/modules/registry/airavata-jpa-registry/src/main/resources/airavata-registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/airavata-registry-derby.sql b/modules/registry/airavata-jpa-registry/src/main/resources/airavata-registry-derby.sql
new file mode 100644
index 0000000..c5a9065
--- /dev/null
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/airavata-registry-derby.sql
@@ -0,0 +1,317 @@
+/*
+ *
+ * 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.
+ *
+ */
+CREATE TABLE GATEWAY
+(
+        GATEWAY_NAME VARCHAR(255),
+	      OWNER VARCHAR(255),
+        PRIMARY KEY (GATEWAY_NAME)
+);
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        CATEGORY_ID VARCHAR (255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.12', CURRENT_TIMESTAMP ,'SYSTEM');
+
+CREATE TABLE USERS
+(
+        USER_NAME VARCHAR(255),
+        PASSWORD VARCHAR(255),
+        PRIMARY KEY(USER_NAME)
+);
+
+CREATE TABLE GATEWAY_WORKER
+(
+        GATEWAY_NAME VARCHAR(255),
+        USER_NAME VARCHAR(255),
+        PRIMARY KEY (GATEWAY_NAME, USER_NAME),
+        FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+        FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PROJECT
+(
+         GATEWAY_NAME VARCHAR(255),
+         USER_NAME VARCHAR(255),
+         PROJECT_NAME VARCHAR(255),
+         PRIMARY KEY (PROJECT_NAME),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PUBLISHED_WORKFLOW
+(
+         GATEWAY_NAME VARCHAR(255),
+         CREATED_USER VARCHAR(255),
+         PUBLISH_WORKFLOW_NAME VARCHAR(255),
+         VERSION VARCHAR(255),
+         PUBLISHED_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PATH VARCHAR (255),
+         WORKFLOW_CONTENT BLOB,
+         PRIMARY KEY(GATEWAY_NAME, PUBLISH_WORKFLOW_NAME),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (CREATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE USER_WORKFLOW
+(
+         GATEWAY_NAME VARCHAR(255),
+         OWNER VARCHAR(255),
+         TEMPLATE_NAME VARCHAR(255),
+         LAST_UPDATED_TIME TIMESTAMP DEFAULT CURRENT TIMESTAMP,
+         PATH VARCHAR (255),
+         WORKFLOW_GRAPH BLOB,
+         PRIMARY KEY(GATEWAY_NAME, OWNER, TEMPLATE_NAME),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (OWNER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE HOST_DESCRIPTOR
+(
+         GATEWAY_NAME VARCHAR(255),
+         UPDATED_USER VARCHAR(255),
+         HOST_DESCRIPTOR_ID VARCHAR(255),
+         HOST_DESCRIPTOR_XML BLOB,
+         PRIMARY KEY(GATEWAY_NAME, HOST_DESCRIPTOR_ID),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE SERVICE_DESCRIPTOR
+(
+         GATEWAY_NAME VARCHAR(255),
+         UPDATED_USER VARCHAR(255),
+         SERVICE_DESCRIPTOR_ID VARCHAR(255),
+         SERVICE_DESCRIPTOR_XML BLOB,
+         PRIMARY KEY(GATEWAY_NAME,SERVICE_DESCRIPTOR_ID),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_DESCRIPTOR
+(
+         GATEWAY_NAME VARCHAR(255),
+         UPDATED_USER VARCHAR(255),
+         APPLICATION_DESCRIPTOR_ID VARCHAR(255),
+         HOST_DESCRIPTOR_ID VARCHAR(255),
+         SERVICE_DESCRIPTOR_ID VARCHAR(255),
+         APPLICATION_DESCRIPTOR_XML BLOB,
+         PRIMARY KEY(GATEWAY_NAME,APPLICATION_DESCRIPTOR_ID),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_METADATA
+(
+          EXPERIMENT_ID VARCHAR(255) NOT NULL,
+          EXPERIMENT_NAME VARCHAR(255) NOT NULL,
+          DESCRIPTION VARCHAR(255),
+          SUBMITTED_DATE TIMESTAMP DEFAULT CURRENT TIMESTAMP,
+          EXECUTION_USER VARCHAR(255),
+          GATEWAY_NAME VARCHAR(255),
+          PROJECT_NAME VARCHAR(255),
+          SHARE_EXPERIMENT SMALLINT,
+          PRIMARY KEY (EXPERIMENT_ID),
+          FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+          FOREIGN KEY (PROJECT_NAME) REFERENCES PROJECT(PROJECT_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_SUMMARY
+(
+          EXPERIMENT_ID VARCHAR(255) NOT NULL,
+          STATUS VARCHAR(255),
+          LAST_UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+          PRIMARY KEY(EXPERIMENT_ID),
+          FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_CONFIGURATION_DATA
+(
+          EXPERIMENT_ID VARCHAR(255) NOT NULL,
+          RESOURCE_HOST_ID VARCHAR (255),
+          TOTAL_CPU_COUNT INTEGER,
+          NODE_COUNT INTEGER,
+          NUMBER_OF_THREADS INTEGER,
+          QUEUE_NAME VARCHAR (255),
+          WALLTIME_LIMIT INTEGER,
+          JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+          TOTAL_PHYSICAL_MEMORY INTEGER,
+          COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+          AIRAVATA_AUTO_SCHEDULE SMALLINT,
+          OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT,
+          WORKING_DIR VARCHAR(255),
+          STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
+          OUTPUT_DATA_DIR VARCHAR(255),
+          DATA_REG_URL VARCHAR (255),
+          PERSIST_OUTPUT_DATA SMALLINT,
+          CLEAN_AFTER_JOB SMALLINT,
+          EXPERIMENT_CONFIG_DATA BLOB,
+          PRIMARY KEY (EXPERIMENT_ID),
+          FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_INPUT
+(
+        EXPERIMENT_ID VARCHAR(255) NOT NULL,
+        EX_KEY VARCHAR (255) NOT NULL,
+        VALUE VARCHAR (255),
+        PRIMARY KEY (EXPERIMENT_ID, EX_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_OUTPUT
+(
+        EXPERIMENT_ID VARCHAR(255) NOT NULL,
+        EX_KEY VARCHAR (255) NOT NULL,
+        VALUE VARCHAR (255),
+        PRIMARY KEY (EXPERIMENT_ID, EX_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE WORKFLOW_DATA
+(
+       EXPERIMENT_ID VARCHAR(255),
+       WORKFLOW_INSTANCE_ID VARCHAR(255),
+       TEMPLATE_NAME VARCHAR(255),
+       STATUS VARCHAR(255),
+       START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+       LAST_UPDATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+       PRIMARY KEY(WORKFLOW_INSTANCE_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NODE_DATA
+(
+       WORKFLOW_INSTANCE_ID VARCHAR(255),
+       NODE_ID VARCHAR(255),
+       NODE_TYPE VARCHAR(255),
+       INPUTS BLOB,
+       OUTPUTS BLOB,
+       STATUS VARCHAR(255),
+       START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+       LAST_UPDATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+       EXECUTION_INDEX INTEGER NOT NULL,
+       PRIMARY KEY(WORKFLOW_INSTANCE_ID, NODE_ID, EXECUTION_INDEX),
+       FOREIGN KEY (WORKFLOW_INSTANCE_ID) REFERENCES WORKFLOW_DATA(WORKFLOW_INSTANCE_ID) ON DELETE CASCADE
+);
+
+-- need to remove this in future
+CREATE TABLE GRAM_DATA
+(
+       WORKFLOW_INSTANCE_ID VARCHAR(255),
+       NODE_ID VARCHAR(255),
+       RSL BLOB,
+       INVOKED_HOST VARCHAR(255),
+       LOCAL_JOB_ID VARCHAR(255),
+       PRIMARY KEY(WORKFLOW_INSTANCE_ID, NODE_ID),
+       FOREIGN KEY (WORKFLOW_INSTANCE_ID) REFERENCES WORKFLOW_DATA(WORKFLOW_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE GFAC_JOB_DATA
+(
+       EXPERIMENT_ID VARCHAR(255),
+       WORKFLOW_INSTANCE_ID VARCHAR(255),
+       NODE_ID VARCHAR(255),
+       APPLICATION_DESC_ID VARCHAR(255),
+       HOST_DESC_ID VARCHAR(255),
+       SERVICE_DESC_ID VARCHAR(255),
+       JOB_DATA CLOB,
+       LOCAL_JOB_ID VARCHAR(255) NOT NULL,
+       SUBMITTED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+       STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+       STATUS VARCHAR(255),
+       METADATA CLOB,
+       PRIMARY KEY(LOCAL_JOB_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID),
+       FOREIGN KEY (WORKFLOW_INSTANCE_ID) REFERENCES WORKFLOW_DATA(WORKFLOW_INSTANCE_ID)
+);
+
+CREATE TABLE GFAC_JOB_STATUS
+(
+       LOCAL_JOB_ID VARCHAR(255) NOT NULL,
+       STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+       STATUS VARCHAR(255),
+       FOREIGN KEY (LOCAL_JOB_ID) REFERENCES GFAC_JOB_DATA(LOCAL_JOB_ID)
+);
+
+
+CREATE TABLE COMMUNITY_USER
+(
+        GATEWAY_NAME VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
+        PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME, TOKEN_ID)
+);
+
+
+CREATE TABLE CREDENTIALS
+(
+        GATEWAY_ID VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        CREDENTIAL BLOB NOT NULL,
+        PORTAL_USER_ID VARCHAR(256) NOT NULL,
+        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
+);
+
+CREATE TABLE EXECUTION_ERROR
+(
+       ERROR_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       WORKFLOW_INSTANCE_ID VARCHAR(255),
+       NODE_ID VARCHAR(255),
+       GFAC_JOB_ID VARCHAR(255),
+       SOURCE_TYPE VARCHAR(255),
+       ERROR_DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+       ERROR_MSG CLOB,
+       ERROR_DESC CLOB,
+       ERROR_CODE VARCHAR(255),
+       ERROR_REPORTER VARCHAR(255),
+       ERROR_LOCATION VARCHAR(255),
+       ACTION_TAKEN VARCHAR(255),
+       ERROR_REFERENCE INTEGER,
+       PRIMARY KEY(ERROR_ID),
+       FOREIGN KEY (WORKFLOW_INSTANCE_ID) REFERENCES WORKFLOW_DATA(WORKFLOW_INSTANCE_ID) ON DELETE CASCADE,
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ORCHESTRATOR
+(
+        EXPERIMENT_ID VARCHAR(255) NOT NULL,
+        USERNAME VARCHAR(255),
+        STATUS VARCHAR(255),
+        STATE VARCHAR(255),
+        GFAC_EPR VARCHAR(255),
+        APPLICATION_NAME VARCHAR(255),
+        JOBREQUEST CLOB,
+        SUBMITTED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (EXPERIMENT_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+


Mime
View raw message