You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/12/14 17:05:42 UTC

[1/8] airavata git commit: fixing creation time and modified time issue

Repository: airavata
Updated Branches:
  refs/heads/master 55a1053a5 -> d3a5a5ea6


fixing creation time and modified time issue


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/305bc044
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/305bc044
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/305bc044

Branch: refs/heads/master
Commit: 305bc04419d8376695dcfe000ad4f2814303e1e9
Parents: 55a1053
Author: scnakandala <su...@gmail.com>
Authored: Fri Dec 11 21:41:39 2015 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Fri Dec 11 21:41:39 2015 -0500

----------------------------------------------------------------------
 .../registry/core/data/catalog/impl/DataCatalogImpl.java     | 8 ++++++++
 .../registry-core/src/main/resources/datacatalog-mysql.sql   | 8 ++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/305bc044/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
index dc11f36..3d4e753 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
@@ -52,6 +52,8 @@ public class DataCatalogImpl implements DataCatalog {
                 r.setReplicaId(UUID.randomUUID().toString());
             });
         }
+        resourceModel.setCreationTime(System.currentTimeMillis());
+        resourceModel.setLastModifiedTime(System.currentTimeMillis());
         DataResource dataResource = ThriftDataModelConversion.getDataResource(resourceModel);
         EntityManager em = null;
         try {
@@ -109,6 +111,8 @@ public class DataCatalogImpl implements DataCatalog {
             if(dataResource == null)
                 return false;
             em.getTransaction().begin();
+            resourceModel.setCreationTime(dataResource.getCreationTime().getTime());
+            resourceModel.setLastModifiedTime(System.currentTimeMillis());
             em.merge(ThriftDataModelConversion.getUpdatedDataResource(resourceModel, dataResource));
             em.getTransaction().commit();
             em.close();
@@ -150,6 +154,8 @@ public class DataCatalogImpl implements DataCatalog {
     public String publishReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataCatalogException {
         String replicaId = UUID.randomUUID().toString();
         dataReplicaLocationModel.setReplicaId(replicaId);
+        dataReplicaLocationModel.setCreationTime(System.currentTimeMillis());
+        dataReplicaLocationModel.setLastModifiedTime(System.currentTimeMillis());
         DataReplicaLocation replicaLocation = ThriftDataModelConversion.getDataReplicaLocation(dataReplicaLocationModel);
         EntityManager em = null;
         try {
@@ -207,6 +213,8 @@ public class DataCatalogImpl implements DataCatalog {
             if(dataReplicaLocation == null)
                 return false;
             em.getTransaction().begin();
+            dataReplicaLocationModel.setCreationTime(dataReplicaLocation.getCreationTime().getTime());
+            dataReplicaLocationModel.setLastModifiedTime(System.currentTimeMillis());
             em.merge(ThriftDataModelConversion.getUpdatedDataReplicaLocation(dataReplicaLocationModel, dataReplicaLocation));
             em.getTransaction().commit();
             em.close();

http://git-wip-us.apache.org/repos/asf/airavata/blob/305bc044/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
index c453998..0fbbc58 100644
--- a/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
@@ -26,8 +26,8 @@ CREATE TABLE DATA_RESOURCE
         RESOURCE_DESCRIPTION VARCHAR (1024),
         OWNER_NAME VARCHAR (255),
         RESOURCE_SIZE INT,
-        CREATION_TIME TIMESTAMP DEFAULT NOW(),
-        LAST_MODIFIED_TIME TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
+        CREATION_TIME TIMESTAMP,
+        LAST_MODIFIED_TIME TIMESTAMP,
         PRIMARY KEY (RESOURCE_ID)
 );
 
@@ -38,8 +38,8 @@ CREATE TABLE DATA_REPLICA_LOCATION
         REPLICA_NAME VARCHAR (255),
         REPLICA_DESCRIPTION VARCHAR (1024),
         DATA_LOCATIONS VARCHAR (4096),
-        CREATION_TIME TIMESTAMP DEFAULT NOW(),
-        LAST_MODIFIED_TIME TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
+        CREATION_TIME TIMESTAMP,
+        LAST_MODIFIED_TIME TIMESTAMP,
         PRIMARY KEY (REPLICA_ID),
         FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );


[8/8] airavata git commit: adding gatewayId to the replica catalog

Posted by sc...@apache.org.
adding gatewayId to the replica catalog


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d3a5a5ea
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d3a5a5ea
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d3a5a5ea

Branch: refs/heads/master
Commit: d3a5a5ea608d5193aa9f8826de40c74804ad4242
Parents: 305bc04
Author: scnakandala <su...@gmail.com>
Authored: Mon Dec 14 11:05:06 2015 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Mon Dec 14 11:05:06 2015 -0500

----------------------------------------------------------------------
 airavata-api/airavata-api-server/pom.xml        |  15 +
 .../airavata/api/server/security/Main.java      | 179 +++++
 .../security/oauth/DefaultOAuthClient.java      |   5 +-
 .../java/org/apache/airavata/api/Airavata.java  |   2 +-
 .../src/main/resources/lib/airavata/Airavata.h  |  24 +-
 .../resources/lib/airavata/airavata_api_types.h |   2 +-
 .../lib/airavata/airavata_data_models_types.h   |   2 +-
 .../replica_catalog_models_constants.cpp        |  34 +
 .../airavata/replica_catalog_models_constants.h |  41 ++
 .../airavata/replica_catalog_models_types.cpp   | 729 +++++++++++++++++++
 .../lib/airavata/replica_catalog_models_types.h | 299 ++++++++
 .../lib/Airavata/Model/Data/Resource/Types.php  |  67 +-
 .../airavata/model/data/resource/ttypes.py      |  61 +-
 .../org/apache/airavata/model/Workflow.java     |   2 +-
 .../ApplicationDeploymentDescription.java       |   2 +-
 .../appdeployment/ApplicationModule.java        |   2 +-
 .../appcatalog/appdeployment/CommandObject.java |   2 +-
 .../appcatalog/appdeployment/SetEnvPaths.java   |   2 +-
 .../ApplicationInterfaceDescription.java        |   2 +-
 .../appcatalog/computeresource/BatchQueue.java  |   2 +-
 .../computeresource/CloudJobSubmission.java     |   2 +-
 .../ComputeResourceDescription.java             |   2 +-
 .../computeresource/GlobusJobSubmission.java    |   2 +-
 .../computeresource/JobSubmissionInterface.java |   2 +-
 .../computeresource/LOCALSubmission.java        |   2 +-
 .../computeresource/ResourceJobManager.java     |   2 +-
 .../computeresource/SSHJobSubmission.java       |   2 +-
 .../computeresource/UnicoreJobSubmission.java   |   2 +-
 .../ComputeResourcePreference.java              |   2 +-
 .../gatewayprofile/GatewayResourceProfile.java  |   2 +-
 .../gatewayprofile/StoragePreference.java       |   2 +-
 .../StorageResourceDescription.java             |   2 +-
 .../application/io/InputDataObjectType.java     |   2 +-
 .../application/io/OutputDataObjectType.java    |   2 +-
 .../airavata/model/commons/ErrorModel.java      |   2 +-
 .../model/commons/ValidationResults.java        |   2 +-
 .../airavata/model/commons/ValidatorResult.java |   2 +-
 .../data/movement/DataMovementInterface.java    |   2 +-
 .../data/movement/GridFTPDataMovement.java      |   2 +-
 .../model/data/movement/LOCALDataMovement.java  |   2 +-
 .../model/data/movement/SCPDataMovement.java    |   2 +-
 .../data/movement/UnicoreDataMovement.java      |   2 +-
 .../data/resource/DataReplicaLocationModel.java |   2 +-
 .../model/data/resource/DataResourceModel.java  | 208 ++++--
 .../model/error/AiravataClientException.java    |   2 +-
 .../model/error/AiravataSystemException.java    |   2 +-
 .../model/error/AuthenticationException.java    |   2 +-
 .../model/error/AuthorizationException.java     |   2 +-
 .../error/ExperimentNotFoundException.java      |   2 +-
 .../model/error/InvalidRequestException.java    |   2 +-
 .../model/error/LaunchValidationException.java  |   2 +-
 .../model/error/ProjectNotFoundException.java   |   2 +-
 .../airavata/model/error/TimedOutException.java |   2 +-
 .../airavata/model/error/ValidationResults.java |   2 +-
 .../airavata/model/error/ValidatorResult.java   |   2 +-
 .../model/experiment/ExperimentModel.java       |   2 +-
 .../model/experiment/ExperimentStatistics.java  |   2 +-
 .../experiment/ExperimentSummaryModel.java      |   2 +-
 .../experiment/UserConfigurationDataModel.java  |   2 +-
 .../org/apache/airavata/model/job/JobModel.java |   2 +-
 .../event/ExperimentStatusChangeEvent.java      |   2 +-
 .../model/messaging/event/JobIdentifier.java    |   2 +-
 .../messaging/event/JobStatusChangeEvent.java   |   2 +-
 .../event/JobStatusChangeRequestEvent.java      |   2 +-
 .../airavata/model/messaging/event/Message.java |   2 +-
 .../messaging/event/ProcessIdentifier.java      |   2 +-
 .../event/ProcessStatusChangeEvent.java         |   2 +-
 .../event/ProcessStatusChangeRequestEvent.java  |   2 +-
 .../messaging/event/ProcessSubmitEvent.java     |   2 +-
 .../messaging/event/ProcessTerminateEvent.java  |   2 +-
 .../model/messaging/event/TaskIdentifier.java   |   2 +-
 .../messaging/event/TaskOutputChangeEvent.java  |   2 +-
 .../messaging/event/TaskStatusChangeEvent.java  |   2 +-
 .../event/TaskStatusChangeRequestEvent.java     |   2 +-
 .../airavata/model/process/ProcessModel.java    |   2 +-
 .../ComputationalResourceSchedulingModel.java   |   2 +-
 .../airavata/model/security/AuthzToken.java     |   2 +-
 .../airavata/model/status/ExperimentStatus.java |   2 +-
 .../apache/airavata/model/status/JobStatus.java |   2 +-
 .../airavata/model/status/ProcessStatus.java    |   2 +-
 .../airavata/model/status/TaskStatus.java       |   2 +-
 .../model/task/DataStagingTaskModel.java        |   2 +-
 .../model/task/EnvironmentSetupTaskModel.java   |   2 +-
 .../model/task/JobSubmissionTaskModel.java      |   2 +-
 .../airavata/model/task/MonitorTaskModel.java   |   2 +-
 .../apache/airavata/model/task/TaskModel.java   |   2 +-
 .../airavata/model/workspace/Gateway.java       |   2 +-
 .../apache/airavata/model/workspace/Group.java  |   2 +-
 .../airavata/model/workspace/Project.java       |   2 +-
 .../apache/airavata/model/workspace/User.java   |   2 +-
 modules/data-manager/pom.xml                    |  61 --
 .../airavata/data/manager/DataManager.java      |  99 ---
 .../data/manager/DataManagerConstants.java      |  28 -
 .../data/manager/DataManagerException.java      |  35 -
 .../data/manager/DataManagerFactory.java        |  32 -
 .../airavata/data/manager/DataManagerImpl.java  | 204 ------
 .../data/manager/DataManagerFactoryTest.java    |  40 -
 .../data/manager/DataManagerImplTest.java       | 207 ------
 .../airavata/data/manager/utils/AppCatInit.java | 320 --------
 .../data/manager/utils/DataCatInit.java         | 315 --------
 modules/data-manager/src/test/resources/id_rsa  |  30 -
 .../data-manager/src/test/resources/id_rsa.pub  |   1 -
 .../data-manager/src/test/resources/known_hosts |   0
 .../core/data/catalog/impl/DataCatalogImpl.java | 279 -------
 .../core/data/catalog/model/Configuration.java  |  55 --
 .../data/catalog/model/DataReplicaLocation.java | 147 ----
 .../data/catalog/model/DataReplicaMetaData.java |  77 --
 .../catalog/model/DataReplicaMetaData_PK.java   |  59 --
 .../core/data/catalog/model/DataResource.java   | 126 ----
 .../catalog/model/DataResourceMetaData.java     |  80 --
 .../catalog/model/DataResourceMetaData_PK.java  |  59 --
 .../catalog/utils/DataCatalogConstants.java     |  49 --
 .../data/catalog/utils/DataCatalogJPAUtils.java |  82 ---
 .../utils/DataCatalogQueryGenerator.java        | 111 ---
 .../utils/ThriftDataModelConversion.java        | 186 -----
 .../catalog/impl/RegistryFactory.java           |   2 +-
 .../registry/core/impl/RegistryImpl.java        |   2 +-
 .../replica/catalog/impl/DataCatalogImpl.java   | 278 +++++++
 .../replica/catalog/model/Configuration.java    |  55 ++
 .../catalog/model/DataReplicaLocation.java      | 147 ++++
 .../catalog/model/DataReplicaMetaData.java      |  77 ++
 .../catalog/model/DataReplicaMetaData_PK.java   |  59 ++
 .../replica/catalog/model/DataResource.java     | 136 ++++
 .../catalog/model/DataResourceMetaData.java     |  80 ++
 .../catalog/model/DataResourceMetaData_PK.java  |  59 ++
 .../catalog/utils/DataCatalogConstants.java     |  49 ++
 .../catalog/utils/DataCatalogJPAUtils.java      |  82 +++
 .../utils/DataCatalogQueryGenerator.java        | 111 +++
 .../utils/ThriftDataModelConversion.java        | 188 +++++
 .../src/main/resources/META-INF/persistence.xml |  10 +-
 .../src/main/resources/datacatalog-derby.sql    |  73 --
 .../src/main/resources/datacatalog-mysql.sql    |  72 --
 .../src/main/resources/replicacatalog-derby.sql |  74 ++
 .../src/main/resources/replicacatalog-mysql.sql |  73 ++
 .../airavata/data/catalog/DataCatalogTest.java  | 222 ------
 .../airavata/data/catalog/util/Initialize.java  | 315 --------
 .../replica/catalog/DataCatalogTest.java        | 221 ++++++
 .../replica/catalog/util/Initialize.java        | 315 ++++++++
 modules/replica-catalog/pom.xml                 |  61 ++
 .../replica/catalog/ReplicaCatalog.java         |  99 +++
 .../catalog/ReplicaCatalogConstants.java        |  28 +
 .../catalog/ReplicaCatalogException.java        |  35 +
 .../replica/catalog/ReplicaCatalogFactory.java  |  32 +
 .../replica/catalog/ReplicaCatalogImpl.java     | 204 ++++++
 .../catalog/ReplicaCatalogFactoryTest.java      |  40 +
 .../replica/catalog/ReplicaCatalogImplTest.java | 207 ++++++
 .../replica/catalog/utils/AppCatInit.java       | 320 ++++++++
 .../replica/catalog/utils/DataCatInit.java      | 315 ++++++++
 .../replica-catalog/src/test/resources/id_rsa   |  30 +
 .../src/test/resources/id_rsa.pub               |   1 +
 .../src/test/resources/known_hosts              |   0
 pom.xml                                         |   2 +-
 .../airavata-api/airavata_api.thrift            |   8 +-
 .../airavata-api/airavata_data_models.thrift    |   2 +-
 .../airavata-api/data_resource_models.thrift    |  61 --
 .../airavata-api/replica_catalog_models.thrift  |  62 ++
 156 files changed, 5079 insertions(+), 3630 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-api-server/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/pom.xml b/airavata-api/airavata-api-server/pom.xml
index e78ff9d..1f03b95 100644
--- a/airavata-api/airavata-api-server/pom.xml
+++ b/airavata-api/airavata-api-server/pom.xml
@@ -127,6 +127,21 @@
             <artifactId>aopalliance</artifactId>
             <version>1.0</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.oltu.oauth2</groupId>
+            <artifactId>org.apache.oltu.oauth2.client</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+            <version>1.9.13</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>super-admin-entitlement-stubs</artifactId>
+            <version>0.16-SNAPSHOT</version>
+        </dependency>
     </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/Main.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/Main.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/Main.java
new file mode 100644
index 0000000..cfd59c7
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/Main.java
@@ -0,0 +1,179 @@
+/*
+ *
+ * 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.api.server.security;
+
+import org.apache.airavata.api.server.security.oauth.DefaultOAuthClient;
+import org.apache.airavata.api.server.security.xacml.DefaultXACMLPEP;
+import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.model.error.AuthenticationException;
+import org.apache.airavata.model.security.AuthzToken;
+import org.apache.airavata.security.AiravataSecurityException;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.oltu.oauth2.client.URLConnectionClient;
+import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
+import org.apache.oltu.oauth2.client.response.OAuthResourceResponse;
+import org.apache.oltu.oauth2.common.OAuth;
+import org.apache.oltu.oauth2.common.message.types.GrantType;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationResponseDTO;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Main {
+    private final static Logger logger = LoggerFactory.getLogger(Main.class);
+
+    private static String username = "scigap_admin";
+    private static String password = "sci9067@min";
+    private static String hostName = "https://idp.scigap.org:7443";
+//    private static String clientId = "KUu0a74dFbrwvSxD3C_GhwKeNrQa";
+    private static String clientId = "O3iUdkkVYyHgzWPiVTQpY_tb96Ma";
+//    private static String clientSecret = "UTKb9nDOPsuWB4lEX39TwhkW8qIa";
+    private static String clientSecret = "6Ck1jZoa2oRtrzodSqkUZ2iINkUa";
+
+    public static void main(String[] args) throws AuthenticationException, AiravataSecurityException, AxisFault {
+        String accessToken = authenticate("master@master.airavata", "master").getAccess_token();
+        ConfigurationContext configContext =
+                ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
+        DefaultOAuthClient defaultOAuthClient = new DefaultOAuthClient(hostName+"/services/",username,password, configContext);
+        OAuth2TokenValidationResponseDTO tokenValidationRequestDTO = defaultOAuthClient.validateAccessToken(accessToken);
+        String authorizedUser = tokenValidationRequestDTO.getAuthorizedUser();
+        AuthzToken authzToken = new AuthzToken();
+        authzToken.setAccessToken(accessToken);
+        Map<String, String> claimsMap = new HashMap<>();
+        claimsMap.put(Constants.USER_NAME, "scigap_admin");
+        claimsMap.put(Constants.API_METHOD_NAME, "/airavata/getAPIVersion");
+        authzToken.setClaimsMap(claimsMap);
+
+        DefaultXACMLPEP defaultXACMLPEP = new DefaultXACMLPEP(hostName+"/services/",username,password,configContext);
+        HashMap<String, String> metaDataMap = new HashMap();
+        boolean result = defaultXACMLPEP.getAuthorizationDecision(authzToken, metaDataMap);
+        System.out.println(result);
+    }
+
+    public static AuthResponse authenticate(String username,String password) throws AuthenticationException {
+        try {
+            OAuthClientRequest request = OAuthClientRequest.tokenLocation(hostName+"/oauth2/token").
+                    setClientId(clientId).setClientSecret(clientSecret).
+                    setGrantType(GrantType.PASSWORD).
+                    setRedirectURI("").
+                    setUsername(username).
+                    setPassword(password).
+                    setScope("openid").
+                    buildBodyMessage();
+
+
+            URLConnectionClient ucc = new URLConnectionClient();
+
+            org.apache.oltu.oauth2.client.OAuthClient oAuthClient = new org.apache.oltu.oauth2.client.OAuthClient(ucc);
+            OAuthResourceResponse resp = oAuthClient.resource(request, OAuth.HttpMethod.POST, OAuthResourceResponse.class);
+
+            //converting JSON to object
+            ObjectMapper mapper = new ObjectMapper();
+            AuthResponse authResponse;
+            try{
+                authResponse = mapper.readValue(resp.getBody(), AuthResponse.class);
+            }catch (Exception e){
+                return null;
+            }
+
+            String accessToken = authResponse.getAccess_token();
+            if(accessToken != null && !accessToken.isEmpty()){
+                request = new OAuthBearerClientRequest(hostName + "/oauth2/userinfo?schema=openid").
+                        buildQueryMessage();
+                ucc = new URLConnectionClient();
+                request.setHeader("Authorization","Bearer "+accessToken);
+                oAuthClient = new org.apache.oltu.oauth2.client.OAuthClient(ucc);
+                resp = oAuthClient.resource(request, OAuth.HttpMethod.GET,
+                        OAuthResourceResponse.class);
+                Map<String,String> profile = mapper.readValue(resp.getBody(), Map.class);
+                return authResponse;
+            }
+        }catch (Exception ex){
+            throw new AuthenticationException(ex.getMessage());
+        }
+        return null;
+    }
+}
+
+class AuthResponse{
+
+    private String token_type;
+    private int expires_in;
+    private String refresh_token;
+    private String access_token;
+    public String id_token;
+    private String scope;
+
+
+    public String getToken_type() {
+        return token_type;
+    }
+
+    public void setToken_type(String token_type) {
+        this.token_type = token_type;
+    }
+
+    public int getExpires_in() {
+        return expires_in;
+    }
+
+    public void setExpires_in(int expires_in) {
+        this.expires_in = expires_in;
+    }
+
+    public String getRefresh_token() {
+        return refresh_token;
+    }
+
+    public void setRefresh_token(String refresh_token) {
+        this.refresh_token = refresh_token;
+    }
+
+    public String getAccess_token() {
+        return access_token;
+    }
+
+    public void setAccess_token(String access_token) {
+        this.access_token = access_token;
+    }
+
+    public String getId_token() {
+        return id_token;
+    }
+
+    public void setId_token(String id_token) {
+        this.id_token = id_token;
+    }
+
+    public String getScope() {
+        return scope;
+    }
+
+    public void setScope(String scope) {
+        this.scope = scope;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/oauth/DefaultOAuthClient.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/oauth/DefaultOAuthClient.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/oauth/DefaultOAuthClient.java
index 74b36cf..0c8d0e3 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/oauth/DefaultOAuthClient.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/oauth/DefaultOAuthClient.java
@@ -85,10 +85,7 @@ public class DefaultOAuthClient {
         } catch (RemoteException e) {
             logger.error(e.getMessage(), e);
             throw new AiravataSecurityException("Error in validating the OAuth access token.");
-        } /*catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            throw new AiravataSecurityException("Error in reading OAuth configuration.");
-        }*/
+        }
     }
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index e1ececb..df4960f 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class Airavata {
 
   public interface Iface {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
index 746357f..c66bae3 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
@@ -23050,8 +23050,8 @@ class Airavata_isWorkflowExistWithName_presult {
 class Airavata_publishDataResource_args {
  public:
 
-  static const char* ascii_fingerprint; // = "B0364BC8BD5AD6E34421711F776ED6BE";
-  static const uint8_t binary_fingerprint[16]; // = {0xB0,0x36,0x4B,0xC8,0xBD,0x5A,0xD6,0xE3,0x44,0x21,0x71,0x1F,0x77,0x6E,0xD6,0xBE};
+  static const char* ascii_fingerprint; // = "0F825F188186641A1AE3E1C23F0A8DAF";
+  static const uint8_t binary_fingerprint[16]; // = {0x0F,0x82,0x5F,0x18,0x81,0x86,0x64,0x1A,0x1A,0xE3,0xE1,0xC2,0x3F,0x0A,0x8D,0xAF};
 
   Airavata_publishDataResource_args(const Airavata_publishDataResource_args&);
   Airavata_publishDataResource_args& operator=(const Airavata_publishDataResource_args&);
@@ -23090,8 +23090,8 @@ class Airavata_publishDataResource_args {
 class Airavata_publishDataResource_pargs {
  public:
 
-  static const char* ascii_fingerprint; // = "B0364BC8BD5AD6E34421711F776ED6BE";
-  static const uint8_t binary_fingerprint[16]; // = {0xB0,0x36,0x4B,0xC8,0xBD,0x5A,0xD6,0xE3,0x44,0x21,0x71,0x1F,0x77,0x6E,0xD6,0xBE};
+  static const char* ascii_fingerprint; // = "0F825F188186641A1AE3E1C23F0A8DAF";
+  static const uint8_t binary_fingerprint[16]; // = {0x0F,0x82,0x5F,0x18,0x81,0x86,0x64,0x1A,0x1A,0xE3,0xE1,0xC2,0x3F,0x0A,0x8D,0xAF};
 
 
   virtual ~Airavata_publishDataResource_pargs() throw();
@@ -23202,8 +23202,8 @@ class Airavata_publishDataResource_presult {
 class Airavata_updateDataResource_args {
  public:
 
-  static const char* ascii_fingerprint; // = "B0364BC8BD5AD6E34421711F776ED6BE";
-  static const uint8_t binary_fingerprint[16]; // = {0xB0,0x36,0x4B,0xC8,0xBD,0x5A,0xD6,0xE3,0x44,0x21,0x71,0x1F,0x77,0x6E,0xD6,0xBE};
+  static const char* ascii_fingerprint; // = "0F825F188186641A1AE3E1C23F0A8DAF";
+  static const uint8_t binary_fingerprint[16]; // = {0x0F,0x82,0x5F,0x18,0x81,0x86,0x64,0x1A,0x1A,0xE3,0xE1,0xC2,0x3F,0x0A,0x8D,0xAF};
 
   Airavata_updateDataResource_args(const Airavata_updateDataResource_args&);
   Airavata_updateDataResource_args& operator=(const Airavata_updateDataResource_args&);
@@ -23242,8 +23242,8 @@ class Airavata_updateDataResource_args {
 class Airavata_updateDataResource_pargs {
  public:
 
-  static const char* ascii_fingerprint; // = "B0364BC8BD5AD6E34421711F776ED6BE";
-  static const uint8_t binary_fingerprint[16]; // = {0xB0,0x36,0x4B,0xC8,0xBD,0x5A,0xD6,0xE3,0x44,0x21,0x71,0x1F,0x77,0x6E,0xD6,0xBE};
+  static const char* ascii_fingerprint; // = "0F825F188186641A1AE3E1C23F0A8DAF";
+  static const uint8_t binary_fingerprint[16]; // = {0x0F,0x82,0x5F,0x18,0x81,0x86,0x64,0x1A,0x1A,0xE3,0xE1,0xC2,0x3F,0x0A,0x8D,0xAF};
 
 
   virtual ~Airavata_updateDataResource_pargs() throw();
@@ -23555,8 +23555,8 @@ typedef struct _Airavata_getDataResource_result__isset {
 class Airavata_getDataResource_result {
  public:
 
-  static const char* ascii_fingerprint; // = "746873CC749B9F1B734513F4A1F1F109";
-  static const uint8_t binary_fingerprint[16]; // = {0x74,0x68,0x73,0xCC,0x74,0x9B,0x9F,0x1B,0x73,0x45,0x13,0xF4,0xA1,0xF1,0xF1,0x09};
+  static const char* ascii_fingerprint; // = "C4440F37E5C789D7863582F8FCA2BE19";
+  static const uint8_t binary_fingerprint[16]; // = {0xC4,0x44,0x0F,0x37,0xE5,0xC7,0x89,0xD7,0x86,0x35,0x82,0xF8,0xFC,0xA2,0xBE,0x19};
 
   Airavata_getDataResource_result(const Airavata_getDataResource_result&);
   Airavata_getDataResource_result& operator=(const Airavata_getDataResource_result&);
@@ -23620,8 +23620,8 @@ typedef struct _Airavata_getDataResource_presult__isset {
 class Airavata_getDataResource_presult {
  public:
 
-  static const char* ascii_fingerprint; // = "746873CC749B9F1B734513F4A1F1F109";
-  static const uint8_t binary_fingerprint[16]; // = {0x74,0x68,0x73,0xCC,0x74,0x9B,0x9F,0x1B,0x73,0x45,0x13,0xF4,0xA1,0xF1,0xF1,0x09};
+  static const char* ascii_fingerprint; // = "C4440F37E5C789D7863582F8FCA2BE19";
+  static const uint8_t binary_fingerprint[16]; // = {0xC4,0x44,0x0F,0x37,0xE5,0xC7,0x89,0xD7,0x86,0x35,0x82,0xF8,0xFC,0xA2,0xBE,0x19};
 
 
   virtual ~Airavata_getDataResource_presult() throw();

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h
index 4a61fd5..90006ea 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h
@@ -48,7 +48,7 @@
 #include "workflow_data_model_types.h"
 #include "security_model_types.h"
 #include "data_movement_models_types.h"
-#include "data_resource_models_types.h"
+#include "replica_catalog_models_types.h"
 
 
 namespace apache { namespace airavata { namespace api {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h
index 2a7a069..40c53e0 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_data_models_types.h
@@ -44,7 +44,7 @@
 #include "scheduling_model_types.h"
 #include "status_models_types.h"
 #include "data_movement_models_types.h"
-#include "data_resource_models_types.h"
+#include "replica_catalog_models_types.h"
 
 
 namespace apache { namespace airavata { namespace model {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_constants.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_constants.cpp
new file mode 100644
index 0000000..4ae7ddc
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_constants.cpp
@@ -0,0 +1,34 @@
+/**
+ * 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.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+#include "replica_catalog_models_constants.h"
+
+namespace apache { namespace airavata { namespace model { namespace data { namespace resource {
+
+const replica_catalog_modelsConstants g_replica_catalog_models_constants;
+
+replica_catalog_modelsConstants::replica_catalog_modelsConstants() {
+}
+
+}}}}} // namespace
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_constants.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_constants.h
new file mode 100644
index 0000000..14d8efa
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_constants.h
@@ -0,0 +1,41 @@
+/**
+ * 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.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+#ifndef replica_catalog_models_CONSTANTS_H
+#define replica_catalog_models_CONSTANTS_H
+
+#include "replica_catalog_models_types.h"
+
+namespace apache { namespace airavata { namespace model { namespace data { namespace resource {
+
+class replica_catalog_modelsConstants {
+ public:
+  replica_catalog_modelsConstants();
+
+};
+
+extern const replica_catalog_modelsConstants g_replica_catalog_models_constants;
+
+}}}}} // namespace
+
+#endif

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_types.cpp
new file mode 100644
index 0000000..4823df3
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_types.cpp
@@ -0,0 +1,729 @@
+/**
+ * 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.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+#include "replica_catalog_models_types.h"
+
+#include <algorithm>
+#include <ostream>
+
+#include <thrift/TToString.h>
+
+namespace apache { namespace airavata { namespace model { namespace data { namespace resource {
+
+int _kReplicaLocationCategoryValues[] = {
+  ReplicaLocationCategory::GATEWAY_DATA_STORE,
+  ReplicaLocationCategory::COMPUTE_RESOURCE,
+  ReplicaLocationCategory::LONG_TERM_STORAGE_RESOURCE,
+  ReplicaLocationCategory::OTHER
+};
+const char* _kReplicaLocationCategoryNames[] = {
+  "GATEWAY_DATA_STORE",
+  "COMPUTE_RESOURCE",
+  "LONG_TERM_STORAGE_RESOURCE",
+  "OTHER"
+};
+const std::map<int, const char*> _ReplicaLocationCategory_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kReplicaLocationCategoryValues, _kReplicaLocationCategoryNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
+int _kReplicaPersistentTypeValues[] = {
+  ReplicaPersistentType::TRANSIENT,
+  ReplicaPersistentType::PERSISTENT
+};
+const char* _kReplicaPersistentTypeNames[] = {
+  "TRANSIENT",
+  "PERSISTENT"
+};
+const std::map<int, const char*> _ReplicaPersistentType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kReplicaPersistentTypeValues, _kReplicaPersistentTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
+
+DataResourceModel::~DataResourceModel() throw() {
+}
+
+
+void DataResourceModel::__set_resourceId(const std::string& val) {
+  this->resourceId = val;
+__isset.resourceId = true;
+}
+
+void DataResourceModel::__set_gatewayId(const std::string& val) {
+  this->gatewayId = val;
+__isset.gatewayId = true;
+}
+
+void DataResourceModel::__set_resourceName(const std::string& val) {
+  this->resourceName = val;
+__isset.resourceName = true;
+}
+
+void DataResourceModel::__set_resourceDescription(const std::string& val) {
+  this->resourceDescription = val;
+__isset.resourceDescription = true;
+}
+
+void DataResourceModel::__set_ownerName(const std::string& val) {
+  this->ownerName = val;
+__isset.ownerName = true;
+}
+
+void DataResourceModel::__set_resourceSize(const int32_t val) {
+  this->resourceSize = val;
+__isset.resourceSize = true;
+}
+
+void DataResourceModel::__set_creationTime(const int64_t val) {
+  this->creationTime = val;
+__isset.creationTime = true;
+}
+
+void DataResourceModel::__set_lastModifiedTime(const int64_t val) {
+  this->lastModifiedTime = val;
+__isset.lastModifiedTime = true;
+}
+
+void DataResourceModel::__set_resourceMetadata(const std::map<std::string, std::string> & val) {
+  this->resourceMetadata = val;
+__isset.resourceMetadata = true;
+}
+
+void DataResourceModel::__set_dataReplicaLocations(const std::vector<DataReplicaLocationModel> & val) {
+  this->dataReplicaLocations = val;
+__isset.dataReplicaLocations = true;
+}
+
+const char* DataResourceModel::ascii_fingerprint = "B62C7AC0978F39C377296FFA824B5766";
+const uint8_t DataResourceModel::binary_fingerprint[16] = {0xB6,0x2C,0x7A,0xC0,0x97,0x8F,0x39,0xC3,0x77,0x29,0x6F,0xFA,0x82,0x4B,0x57,0x66};
+
+uint32_t DataResourceModel::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->resourceId);
+          this->__isset.resourceId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->gatewayId);
+          this->__isset.gatewayId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->resourceName);
+          this->__isset.resourceName = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->resourceDescription);
+          this->__isset.resourceDescription = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->ownerName);
+          this->__isset.ownerName = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 6:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->resourceSize);
+          this->__isset.resourceSize = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 7:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->creationTime);
+          this->__isset.creationTime = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 8:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->lastModifiedTime);
+          this->__isset.lastModifiedTime = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 9:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->resourceMetadata.clear();
+            uint32_t _size0;
+            ::apache::thrift::protocol::TType _ktype1;
+            ::apache::thrift::protocol::TType _vtype2;
+            xfer += iprot->readMapBegin(_ktype1, _vtype2, _size0);
+            uint32_t _i4;
+            for (_i4 = 0; _i4 < _size0; ++_i4)
+            {
+              std::string _key5;
+              xfer += iprot->readString(_key5);
+              std::string& _val6 = this->resourceMetadata[_key5];
+              xfer += iprot->readString(_val6);
+            }
+            xfer += iprot->readMapEnd();
+          }
+          this->__isset.resourceMetadata = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 10:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->dataReplicaLocations.clear();
+            uint32_t _size7;
+            ::apache::thrift::protocol::TType _etype10;
+            xfer += iprot->readListBegin(_etype10, _size7);
+            this->dataReplicaLocations.resize(_size7);
+            uint32_t _i11;
+            for (_i11 = 0; _i11 < _size7; ++_i11)
+            {
+              xfer += this->dataReplicaLocations[_i11].read(iprot);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.dataReplicaLocations = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t DataResourceModel::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  oprot->incrementRecursionDepth();
+  xfer += oprot->writeStructBegin("DataResourceModel");
+
+  if (this->__isset.resourceId) {
+    xfer += oprot->writeFieldBegin("resourceId", ::apache::thrift::protocol::T_STRING, 1);
+    xfer += oprot->writeString(this->resourceId);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.gatewayId) {
+    xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 2);
+    xfer += oprot->writeString(this->gatewayId);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.resourceName) {
+    xfer += oprot->writeFieldBegin("resourceName", ::apache::thrift::protocol::T_STRING, 3);
+    xfer += oprot->writeString(this->resourceName);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.resourceDescription) {
+    xfer += oprot->writeFieldBegin("resourceDescription", ::apache::thrift::protocol::T_STRING, 4);
+    xfer += oprot->writeString(this->resourceDescription);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.ownerName) {
+    xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 5);
+    xfer += oprot->writeString(this->ownerName);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.resourceSize) {
+    xfer += oprot->writeFieldBegin("resourceSize", ::apache::thrift::protocol::T_I32, 6);
+    xfer += oprot->writeI32(this->resourceSize);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.creationTime) {
+    xfer += oprot->writeFieldBegin("creationTime", ::apache::thrift::protocol::T_I64, 7);
+    xfer += oprot->writeI64(this->creationTime);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.lastModifiedTime) {
+    xfer += oprot->writeFieldBegin("lastModifiedTime", ::apache::thrift::protocol::T_I64, 8);
+    xfer += oprot->writeI64(this->lastModifiedTime);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.resourceMetadata) {
+    xfer += oprot->writeFieldBegin("resourceMetadata", ::apache::thrift::protocol::T_MAP, 9);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->resourceMetadata.size()));
+      std::map<std::string, std::string> ::const_iterator _iter12;
+      for (_iter12 = this->resourceMetadata.begin(); _iter12 != this->resourceMetadata.end(); ++_iter12)
+      {
+        xfer += oprot->writeString(_iter12->first);
+        xfer += oprot->writeString(_iter12->second);
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.dataReplicaLocations) {
+    xfer += oprot->writeFieldBegin("dataReplicaLocations", ::apache::thrift::protocol::T_LIST, 10);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataReplicaLocations.size()));
+      std::vector<DataReplicaLocationModel> ::const_iterator _iter13;
+      for (_iter13 = this->dataReplicaLocations.begin(); _iter13 != this->dataReplicaLocations.end(); ++_iter13)
+      {
+        xfer += (*_iter13).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  oprot->decrementRecursionDepth();
+  return xfer;
+}
+
+void swap(DataResourceModel &a, DataResourceModel &b) {
+  using ::std::swap;
+  swap(a.resourceId, b.resourceId);
+  swap(a.gatewayId, b.gatewayId);
+  swap(a.resourceName, b.resourceName);
+  swap(a.resourceDescription, b.resourceDescription);
+  swap(a.ownerName, b.ownerName);
+  swap(a.resourceSize, b.resourceSize);
+  swap(a.creationTime, b.creationTime);
+  swap(a.lastModifiedTime, b.lastModifiedTime);
+  swap(a.resourceMetadata, b.resourceMetadata);
+  swap(a.dataReplicaLocations, b.dataReplicaLocations);
+  swap(a.__isset, b.__isset);
+}
+
+DataResourceModel::DataResourceModel(const DataResourceModel& other14) {
+  resourceId = other14.resourceId;
+  gatewayId = other14.gatewayId;
+  resourceName = other14.resourceName;
+  resourceDescription = other14.resourceDescription;
+  ownerName = other14.ownerName;
+  resourceSize = other14.resourceSize;
+  creationTime = other14.creationTime;
+  lastModifiedTime = other14.lastModifiedTime;
+  resourceMetadata = other14.resourceMetadata;
+  dataReplicaLocations = other14.dataReplicaLocations;
+  __isset = other14.__isset;
+}
+DataResourceModel& DataResourceModel::operator=(const DataResourceModel& other15) {
+  resourceId = other15.resourceId;
+  gatewayId = other15.gatewayId;
+  resourceName = other15.resourceName;
+  resourceDescription = other15.resourceDescription;
+  ownerName = other15.ownerName;
+  resourceSize = other15.resourceSize;
+  creationTime = other15.creationTime;
+  lastModifiedTime = other15.lastModifiedTime;
+  resourceMetadata = other15.resourceMetadata;
+  dataReplicaLocations = other15.dataReplicaLocations;
+  __isset = other15.__isset;
+  return *this;
+}
+std::ostream& operator<<(std::ostream& out, const DataResourceModel& obj) {
+  using apache::thrift::to_string;
+  out << "DataResourceModel(";
+  out << "resourceId="; (obj.__isset.resourceId ? (out << to_string(obj.resourceId)) : (out << "<null>"));
+  out << ", " << "gatewayId="; (obj.__isset.gatewayId ? (out << to_string(obj.gatewayId)) : (out << "<null>"));
+  out << ", " << "resourceName="; (obj.__isset.resourceName ? (out << to_string(obj.resourceName)) : (out << "<null>"));
+  out << ", " << "resourceDescription="; (obj.__isset.resourceDescription ? (out << to_string(obj.resourceDescription)) : (out << "<null>"));
+  out << ", " << "ownerName="; (obj.__isset.ownerName ? (out << to_string(obj.ownerName)) : (out << "<null>"));
+  out << ", " << "resourceSize="; (obj.__isset.resourceSize ? (out << to_string(obj.resourceSize)) : (out << "<null>"));
+  out << ", " << "creationTime="; (obj.__isset.creationTime ? (out << to_string(obj.creationTime)) : (out << "<null>"));
+  out << ", " << "lastModifiedTime="; (obj.__isset.lastModifiedTime ? (out << to_string(obj.lastModifiedTime)) : (out << "<null>"));
+  out << ", " << "resourceMetadata="; (obj.__isset.resourceMetadata ? (out << to_string(obj.resourceMetadata)) : (out << "<null>"));
+  out << ", " << "dataReplicaLocations="; (obj.__isset.dataReplicaLocations ? (out << to_string(obj.dataReplicaLocations)) : (out << "<null>"));
+  out << ")";
+  return out;
+}
+
+
+DataReplicaLocationModel::~DataReplicaLocationModel() throw() {
+}
+
+
+void DataReplicaLocationModel::__set_replicaId(const std::string& val) {
+  this->replicaId = val;
+__isset.replicaId = true;
+}
+
+void DataReplicaLocationModel::__set_resourceId(const std::string& val) {
+  this->resourceId = val;
+__isset.resourceId = true;
+}
+
+void DataReplicaLocationModel::__set_replicaName(const std::string& val) {
+  this->replicaName = val;
+__isset.replicaName = true;
+}
+
+void DataReplicaLocationModel::__set_replicaDescription(const std::string& val) {
+  this->replicaDescription = val;
+__isset.replicaDescription = true;
+}
+
+void DataReplicaLocationModel::__set_creationTime(const int64_t val) {
+  this->creationTime = val;
+__isset.creationTime = true;
+}
+
+void DataReplicaLocationModel::__set_lastModifiedTime(const int64_t val) {
+  this->lastModifiedTime = val;
+__isset.lastModifiedTime = true;
+}
+
+void DataReplicaLocationModel::__set_replicaLocationCategory(const ReplicaLocationCategory::type val) {
+  this->replicaLocationCategory = val;
+__isset.replicaLocationCategory = true;
+}
+
+void DataReplicaLocationModel::__set_replicaPersistentType(const ReplicaPersistentType::type val) {
+  this->replicaPersistentType = val;
+__isset.replicaPersistentType = true;
+}
+
+void DataReplicaLocationModel::__set_dataLocations(const std::vector<std::string> & val) {
+  this->dataLocations = val;
+__isset.dataLocations = true;
+}
+
+void DataReplicaLocationModel::__set_replicaMetadata(const std::map<std::string, std::string> & val) {
+  this->replicaMetadata = val;
+__isset.replicaMetadata = true;
+}
+
+const char* DataReplicaLocationModel::ascii_fingerprint = "781A1748A91BB45A79F33F79DC9474F1";
+const uint8_t DataReplicaLocationModel::binary_fingerprint[16] = {0x78,0x1A,0x17,0x48,0xA9,0x1B,0xB4,0x5A,0x79,0xF3,0x3F,0x79,0xDC,0x94,0x74,0xF1};
+
+uint32_t DataReplicaLocationModel::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  ::apache::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using ::apache::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == ::apache::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->replicaId);
+          this->__isset.replicaId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->resourceId);
+          this->__isset.resourceId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->replicaName);
+          this->__isset.replicaName = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->replicaDescription);
+          this->__isset.replicaDescription = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->creationTime);
+          this->__isset.creationTime = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 6:
+        if (ftype == ::apache::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->lastModifiedTime);
+          this->__isset.lastModifiedTime = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 7:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast16;
+          xfer += iprot->readI32(ecast16);
+          this->replicaLocationCategory = (ReplicaLocationCategory::type)ecast16;
+          this->__isset.replicaLocationCategory = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 8:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast17;
+          xfer += iprot->readI32(ecast17);
+          this->replicaPersistentType = (ReplicaPersistentType::type)ecast17;
+          this->__isset.replicaPersistentType = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 9:
+        if (ftype == ::apache::thrift::protocol::T_LIST) {
+          {
+            this->dataLocations.clear();
+            uint32_t _size18;
+            ::apache::thrift::protocol::TType _etype21;
+            xfer += iprot->readListBegin(_etype21, _size18);
+            this->dataLocations.resize(_size18);
+            uint32_t _i22;
+            for (_i22 = 0; _i22 < _size18; ++_i22)
+            {
+              xfer += iprot->readString(this->dataLocations[_i22]);
+            }
+            xfer += iprot->readListEnd();
+          }
+          this->__isset.dataLocations = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 10:
+        if (ftype == ::apache::thrift::protocol::T_MAP) {
+          {
+            this->replicaMetadata.clear();
+            uint32_t _size23;
+            ::apache::thrift::protocol::TType _ktype24;
+            ::apache::thrift::protocol::TType _vtype25;
+            xfer += iprot->readMapBegin(_ktype24, _vtype25, _size23);
+            uint32_t _i27;
+            for (_i27 = 0; _i27 < _size23; ++_i27)
+            {
+              std::string _key28;
+              xfer += iprot->readString(_key28);
+              std::string& _val29 = this->replicaMetadata[_key28];
+              xfer += iprot->readString(_val29);
+            }
+            xfer += iprot->readMapEnd();
+          }
+          this->__isset.replicaMetadata = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t DataReplicaLocationModel::write(::apache::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  oprot->incrementRecursionDepth();
+  xfer += oprot->writeStructBegin("DataReplicaLocationModel");
+
+  if (this->__isset.replicaId) {
+    xfer += oprot->writeFieldBegin("replicaId", ::apache::thrift::protocol::T_STRING, 1);
+    xfer += oprot->writeString(this->replicaId);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.resourceId) {
+    xfer += oprot->writeFieldBegin("resourceId", ::apache::thrift::protocol::T_STRING, 2);
+    xfer += oprot->writeString(this->resourceId);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.replicaName) {
+    xfer += oprot->writeFieldBegin("replicaName", ::apache::thrift::protocol::T_STRING, 3);
+    xfer += oprot->writeString(this->replicaName);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.replicaDescription) {
+    xfer += oprot->writeFieldBegin("replicaDescription", ::apache::thrift::protocol::T_STRING, 4);
+    xfer += oprot->writeString(this->replicaDescription);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.creationTime) {
+    xfer += oprot->writeFieldBegin("creationTime", ::apache::thrift::protocol::T_I64, 5);
+    xfer += oprot->writeI64(this->creationTime);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.lastModifiedTime) {
+    xfer += oprot->writeFieldBegin("lastModifiedTime", ::apache::thrift::protocol::T_I64, 6);
+    xfer += oprot->writeI64(this->lastModifiedTime);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.replicaLocationCategory) {
+    xfer += oprot->writeFieldBegin("replicaLocationCategory", ::apache::thrift::protocol::T_I32, 7);
+    xfer += oprot->writeI32((int32_t)this->replicaLocationCategory);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.replicaPersistentType) {
+    xfer += oprot->writeFieldBegin("replicaPersistentType", ::apache::thrift::protocol::T_I32, 8);
+    xfer += oprot->writeI32((int32_t)this->replicaPersistentType);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.dataLocations) {
+    xfer += oprot->writeFieldBegin("dataLocations", ::apache::thrift::protocol::T_LIST, 9);
+    {
+      xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->dataLocations.size()));
+      std::vector<std::string> ::const_iterator _iter30;
+      for (_iter30 = this->dataLocations.begin(); _iter30 != this->dataLocations.end(); ++_iter30)
+      {
+        xfer += oprot->writeString((*_iter30));
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.replicaMetadata) {
+    xfer += oprot->writeFieldBegin("replicaMetadata", ::apache::thrift::protocol::T_MAP, 10);
+    {
+      xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->replicaMetadata.size()));
+      std::map<std::string, std::string> ::const_iterator _iter31;
+      for (_iter31 = this->replicaMetadata.begin(); _iter31 != this->replicaMetadata.end(); ++_iter31)
+      {
+        xfer += oprot->writeString(_iter31->first);
+        xfer += oprot->writeString(_iter31->second);
+      }
+      xfer += oprot->writeMapEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  oprot->decrementRecursionDepth();
+  return xfer;
+}
+
+void swap(DataReplicaLocationModel &a, DataReplicaLocationModel &b) {
+  using ::std::swap;
+  swap(a.replicaId, b.replicaId);
+  swap(a.resourceId, b.resourceId);
+  swap(a.replicaName, b.replicaName);
+  swap(a.replicaDescription, b.replicaDescription);
+  swap(a.creationTime, b.creationTime);
+  swap(a.lastModifiedTime, b.lastModifiedTime);
+  swap(a.replicaLocationCategory, b.replicaLocationCategory);
+  swap(a.replicaPersistentType, b.replicaPersistentType);
+  swap(a.dataLocations, b.dataLocations);
+  swap(a.replicaMetadata, b.replicaMetadata);
+  swap(a.__isset, b.__isset);
+}
+
+DataReplicaLocationModel::DataReplicaLocationModel(const DataReplicaLocationModel& other32) {
+  replicaId = other32.replicaId;
+  resourceId = other32.resourceId;
+  replicaName = other32.replicaName;
+  replicaDescription = other32.replicaDescription;
+  creationTime = other32.creationTime;
+  lastModifiedTime = other32.lastModifiedTime;
+  replicaLocationCategory = other32.replicaLocationCategory;
+  replicaPersistentType = other32.replicaPersistentType;
+  dataLocations = other32.dataLocations;
+  replicaMetadata = other32.replicaMetadata;
+  __isset = other32.__isset;
+}
+DataReplicaLocationModel& DataReplicaLocationModel::operator=(const DataReplicaLocationModel& other33) {
+  replicaId = other33.replicaId;
+  resourceId = other33.resourceId;
+  replicaName = other33.replicaName;
+  replicaDescription = other33.replicaDescription;
+  creationTime = other33.creationTime;
+  lastModifiedTime = other33.lastModifiedTime;
+  replicaLocationCategory = other33.replicaLocationCategory;
+  replicaPersistentType = other33.replicaPersistentType;
+  dataLocations = other33.dataLocations;
+  replicaMetadata = other33.replicaMetadata;
+  __isset = other33.__isset;
+  return *this;
+}
+std::ostream& operator<<(std::ostream& out, const DataReplicaLocationModel& obj) {
+  using apache::thrift::to_string;
+  out << "DataReplicaLocationModel(";
+  out << "replicaId="; (obj.__isset.replicaId ? (out << to_string(obj.replicaId)) : (out << "<null>"));
+  out << ", " << "resourceId="; (obj.__isset.resourceId ? (out << to_string(obj.resourceId)) : (out << "<null>"));
+  out << ", " << "replicaName="; (obj.__isset.replicaName ? (out << to_string(obj.replicaName)) : (out << "<null>"));
+  out << ", " << "replicaDescription="; (obj.__isset.replicaDescription ? (out << to_string(obj.replicaDescription)) : (out << "<null>"));
+  out << ", " << "creationTime="; (obj.__isset.creationTime ? (out << to_string(obj.creationTime)) : (out << "<null>"));
+  out << ", " << "lastModifiedTime="; (obj.__isset.lastModifiedTime ? (out << to_string(obj.lastModifiedTime)) : (out << "<null>"));
+  out << ", " << "replicaLocationCategory="; (obj.__isset.replicaLocationCategory ? (out << to_string(obj.replicaLocationCategory)) : (out << "<null>"));
+  out << ", " << "replicaPersistentType="; (obj.__isset.replicaPersistentType ? (out << to_string(obj.replicaPersistentType)) : (out << "<null>"));
+  out << ", " << "dataLocations="; (obj.__isset.dataLocations ? (out << to_string(obj.dataLocations)) : (out << "<null>"));
+  out << ", " << "replicaMetadata="; (obj.__isset.replicaMetadata ? (out << to_string(obj.replicaMetadata)) : (out << "<null>"));
+  out << ")";
+  return out;
+}
+
+}}}}} // namespace

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_types.h
new file mode 100644
index 0000000..c88386e
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/replica_catalog_models_types.h
@@ -0,0 +1,299 @@
+/**
+ * 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.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+#ifndef replica_catalog_models_TYPES_H
+#define replica_catalog_models_TYPES_H
+
+#include <iosfwd>
+
+#include <thrift/Thrift.h>
+#include <thrift/TApplicationException.h>
+#include <thrift/protocol/TProtocol.h>
+#include <thrift/transport/TTransport.h>
+
+#include <thrift/cxxfunctional.h>
+
+
+namespace apache { namespace airavata { namespace model { namespace data { namespace resource {
+
+struct ReplicaLocationCategory {
+  enum type {
+    GATEWAY_DATA_STORE = 0,
+    COMPUTE_RESOURCE = 1,
+    LONG_TERM_STORAGE_RESOURCE = 2,
+    OTHER = 3
+  };
+};
+
+extern const std::map<int, const char*> _ReplicaLocationCategory_VALUES_TO_NAMES;
+
+struct ReplicaPersistentType {
+  enum type {
+    TRANSIENT = 0,
+    PERSISTENT = 1
+  };
+};
+
+extern const std::map<int, const char*> _ReplicaPersistentType_VALUES_TO_NAMES;
+
+class DataResourceModel;
+
+class DataReplicaLocationModel;
+
+typedef struct _DataResourceModel__isset {
+  _DataResourceModel__isset() : resourceId(false), gatewayId(false), resourceName(false), resourceDescription(false), ownerName(false), resourceSize(false), creationTime(false), lastModifiedTime(false), resourceMetadata(false), dataReplicaLocations(false) {}
+  bool resourceId :1;
+  bool gatewayId :1;
+  bool resourceName :1;
+  bool resourceDescription :1;
+  bool ownerName :1;
+  bool resourceSize :1;
+  bool creationTime :1;
+  bool lastModifiedTime :1;
+  bool resourceMetadata :1;
+  bool dataReplicaLocations :1;
+} _DataResourceModel__isset;
+
+class DataResourceModel {
+ public:
+
+  static const char* ascii_fingerprint; // = "B62C7AC0978F39C377296FFA824B5766";
+  static const uint8_t binary_fingerprint[16]; // = {0xB6,0x2C,0x7A,0xC0,0x97,0x8F,0x39,0xC3,0x77,0x29,0x6F,0xFA,0x82,0x4B,0x57,0x66};
+
+  DataResourceModel(const DataResourceModel&);
+  DataResourceModel& operator=(const DataResourceModel&);
+  DataResourceModel() : resourceId(), gatewayId(), resourceName(), resourceDescription(), ownerName(), resourceSize(0), creationTime(0), lastModifiedTime(0) {
+  }
+
+  virtual ~DataResourceModel() throw();
+  std::string resourceId;
+  std::string gatewayId;
+  std::string resourceName;
+  std::string resourceDescription;
+  std::string ownerName;
+  int32_t resourceSize;
+  int64_t creationTime;
+  int64_t lastModifiedTime;
+  std::map<std::string, std::string>  resourceMetadata;
+  std::vector<DataReplicaLocationModel>  dataReplicaLocations;
+
+  _DataResourceModel__isset __isset;
+
+  void __set_resourceId(const std::string& val);
+
+  void __set_gatewayId(const std::string& val);
+
+  void __set_resourceName(const std::string& val);
+
+  void __set_resourceDescription(const std::string& val);
+
+  void __set_ownerName(const std::string& val);
+
+  void __set_resourceSize(const int32_t val);
+
+  void __set_creationTime(const int64_t val);
+
+  void __set_lastModifiedTime(const int64_t val);
+
+  void __set_resourceMetadata(const std::map<std::string, std::string> & val);
+
+  void __set_dataReplicaLocations(const std::vector<DataReplicaLocationModel> & val);
+
+  bool operator == (const DataResourceModel & rhs) const
+  {
+    if (__isset.resourceId != rhs.__isset.resourceId)
+      return false;
+    else if (__isset.resourceId && !(resourceId == rhs.resourceId))
+      return false;
+    if (__isset.gatewayId != rhs.__isset.gatewayId)
+      return false;
+    else if (__isset.gatewayId && !(gatewayId == rhs.gatewayId))
+      return false;
+    if (__isset.resourceName != rhs.__isset.resourceName)
+      return false;
+    else if (__isset.resourceName && !(resourceName == rhs.resourceName))
+      return false;
+    if (__isset.resourceDescription != rhs.__isset.resourceDescription)
+      return false;
+    else if (__isset.resourceDescription && !(resourceDescription == rhs.resourceDescription))
+      return false;
+    if (__isset.ownerName != rhs.__isset.ownerName)
+      return false;
+    else if (__isset.ownerName && !(ownerName == rhs.ownerName))
+      return false;
+    if (__isset.resourceSize != rhs.__isset.resourceSize)
+      return false;
+    else if (__isset.resourceSize && !(resourceSize == rhs.resourceSize))
+      return false;
+    if (__isset.creationTime != rhs.__isset.creationTime)
+      return false;
+    else if (__isset.creationTime && !(creationTime == rhs.creationTime))
+      return false;
+    if (__isset.lastModifiedTime != rhs.__isset.lastModifiedTime)
+      return false;
+    else if (__isset.lastModifiedTime && !(lastModifiedTime == rhs.lastModifiedTime))
+      return false;
+    if (__isset.resourceMetadata != rhs.__isset.resourceMetadata)
+      return false;
+    else if (__isset.resourceMetadata && !(resourceMetadata == rhs.resourceMetadata))
+      return false;
+    if (__isset.dataReplicaLocations != rhs.__isset.dataReplicaLocations)
+      return false;
+    else if (__isset.dataReplicaLocations && !(dataReplicaLocations == rhs.dataReplicaLocations))
+      return false;
+    return true;
+  }
+  bool operator != (const DataResourceModel &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DataResourceModel & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+  friend std::ostream& operator<<(std::ostream& out, const DataResourceModel& obj);
+};
+
+void swap(DataResourceModel &a, DataResourceModel &b);
+
+typedef struct _DataReplicaLocationModel__isset {
+  _DataReplicaLocationModel__isset() : replicaId(false), resourceId(false), replicaName(false), replicaDescription(false), creationTime(false), lastModifiedTime(false), replicaLocationCategory(false), replicaPersistentType(false), dataLocations(false), replicaMetadata(false) {}
+  bool replicaId :1;
+  bool resourceId :1;
+  bool replicaName :1;
+  bool replicaDescription :1;
+  bool creationTime :1;
+  bool lastModifiedTime :1;
+  bool replicaLocationCategory :1;
+  bool replicaPersistentType :1;
+  bool dataLocations :1;
+  bool replicaMetadata :1;
+} _DataReplicaLocationModel__isset;
+
+class DataReplicaLocationModel {
+ public:
+
+  static const char* ascii_fingerprint; // = "781A1748A91BB45A79F33F79DC9474F1";
+  static const uint8_t binary_fingerprint[16]; // = {0x78,0x1A,0x17,0x48,0xA9,0x1B,0xB4,0x5A,0x79,0xF3,0x3F,0x79,0xDC,0x94,0x74,0xF1};
+
+  DataReplicaLocationModel(const DataReplicaLocationModel&);
+  DataReplicaLocationModel& operator=(const DataReplicaLocationModel&);
+  DataReplicaLocationModel() : replicaId(), resourceId(), replicaName(), replicaDescription(), creationTime(0), lastModifiedTime(0), replicaLocationCategory((ReplicaLocationCategory::type)0), replicaPersistentType((ReplicaPersistentType::type)0) {
+  }
+
+  virtual ~DataReplicaLocationModel() throw();
+  std::string replicaId;
+  std::string resourceId;
+  std::string replicaName;
+  std::string replicaDescription;
+  int64_t creationTime;
+  int64_t lastModifiedTime;
+  ReplicaLocationCategory::type replicaLocationCategory;
+  ReplicaPersistentType::type replicaPersistentType;
+  std::vector<std::string>  dataLocations;
+  std::map<std::string, std::string>  replicaMetadata;
+
+  _DataReplicaLocationModel__isset __isset;
+
+  void __set_replicaId(const std::string& val);
+
+  void __set_resourceId(const std::string& val);
+
+  void __set_replicaName(const std::string& val);
+
+  void __set_replicaDescription(const std::string& val);
+
+  void __set_creationTime(const int64_t val);
+
+  void __set_lastModifiedTime(const int64_t val);
+
+  void __set_replicaLocationCategory(const ReplicaLocationCategory::type val);
+
+  void __set_replicaPersistentType(const ReplicaPersistentType::type val);
+
+  void __set_dataLocations(const std::vector<std::string> & val);
+
+  void __set_replicaMetadata(const std::map<std::string, std::string> & val);
+
+  bool operator == (const DataReplicaLocationModel & rhs) const
+  {
+    if (__isset.replicaId != rhs.__isset.replicaId)
+      return false;
+    else if (__isset.replicaId && !(replicaId == rhs.replicaId))
+      return false;
+    if (__isset.resourceId != rhs.__isset.resourceId)
+      return false;
+    else if (__isset.resourceId && !(resourceId == rhs.resourceId))
+      return false;
+    if (__isset.replicaName != rhs.__isset.replicaName)
+      return false;
+    else if (__isset.replicaName && !(replicaName == rhs.replicaName))
+      return false;
+    if (__isset.replicaDescription != rhs.__isset.replicaDescription)
+      return false;
+    else if (__isset.replicaDescription && !(replicaDescription == rhs.replicaDescription))
+      return false;
+    if (__isset.creationTime != rhs.__isset.creationTime)
+      return false;
+    else if (__isset.creationTime && !(creationTime == rhs.creationTime))
+      return false;
+    if (__isset.lastModifiedTime != rhs.__isset.lastModifiedTime)
+      return false;
+    else if (__isset.lastModifiedTime && !(lastModifiedTime == rhs.lastModifiedTime))
+      return false;
+    if (__isset.replicaLocationCategory != rhs.__isset.replicaLocationCategory)
+      return false;
+    else if (__isset.replicaLocationCategory && !(replicaLocationCategory == rhs.replicaLocationCategory))
+      return false;
+    if (__isset.replicaPersistentType != rhs.__isset.replicaPersistentType)
+      return false;
+    else if (__isset.replicaPersistentType && !(replicaPersistentType == rhs.replicaPersistentType))
+      return false;
+    if (__isset.dataLocations != rhs.__isset.dataLocations)
+      return false;
+    else if (__isset.dataLocations && !(dataLocations == rhs.dataLocations))
+      return false;
+    if (__isset.replicaMetadata != rhs.__isset.replicaMetadata)
+      return false;
+    else if (__isset.replicaMetadata && !(replicaMetadata == rhs.replicaMetadata))
+      return false;
+    return true;
+  }
+  bool operator != (const DataReplicaLocationModel &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const DataReplicaLocationModel & ) const;
+
+  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+  friend std::ostream& operator<<(std::ostream& out, const DataReplicaLocationModel& obj);
+};
+
+void swap(DataReplicaLocationModel &a, DataReplicaLocationModel &b);
+
+}}}}} // namespace
+
+#endif

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/Resource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/Resource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/Resource/Types.php
index b558b2c..84e6c9c 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/Resource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Data/Resource/Types.php
@@ -49,6 +49,10 @@ class DataResourceModel {
   /**
    * @var string
    */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
   public $resourceName = null;
   /**
    * @var string
@@ -87,30 +91,34 @@ class DataResourceModel {
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'resourceName',
+          'var' => 'gatewayId',
           'type' => TType::STRING,
           ),
         3 => array(
-          'var' => 'resourceDescription',
+          'var' => 'resourceName',
           'type' => TType::STRING,
           ),
         4 => array(
-          'var' => 'ownerName',
+          'var' => 'resourceDescription',
           'type' => TType::STRING,
           ),
         5 => array(
+          'var' => 'ownerName',
+          'type' => TType::STRING,
+          ),
+        6 => array(
           'var' => 'resourceSize',
           'type' => TType::I32,
           ),
-        6 => array(
+        7 => array(
           'var' => 'creationTime',
           'type' => TType::I64,
           ),
-        7 => array(
+        8 => array(
           'var' => 'lastModifiedTime',
           'type' => TType::I64,
           ),
-        8 => array(
+        9 => array(
           'var' => 'resourceMetadata',
           'type' => TType::MAP,
           'ktype' => TType::STRING,
@@ -122,7 +130,7 @@ class DataResourceModel {
             'type' => TType::STRING,
             ),
           ),
-        9 => array(
+        10 => array(
           'var' => 'dataReplicaLocations',
           'type' => TType::LST,
           'etype' => TType::STRUCT,
@@ -137,6 +145,9 @@ class DataResourceModel {
       if (isset($vals['resourceId'])) {
         $this->resourceId = $vals['resourceId'];
       }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
       if (isset($vals['resourceName'])) {
         $this->resourceName = $vals['resourceName'];
       }
@@ -192,47 +203,54 @@ class DataResourceModel {
           break;
         case 2:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceName);
+            $xfer += $input->readString($this->gatewayId);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 3:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceDescription);
+            $xfer += $input->readString($this->resourceName);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 4:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->ownerName);
+            $xfer += $input->readString($this->resourceDescription);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->ownerName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
           if ($ftype == TType::I32) {
             $xfer += $input->readI32($this->resourceSize);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 6:
+        case 7:
           if ($ftype == TType::I64) {
             $xfer += $input->readI64($this->creationTime);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 7:
+        case 8:
           if ($ftype == TType::I64) {
             $xfer += $input->readI64($this->lastModifiedTime);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 8:
+        case 9:
           if ($ftype == TType::MAP) {
             $this->resourceMetadata = array();
             $_size0 = 0;
@@ -252,7 +270,7 @@ class DataResourceModel {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 9:
+        case 10:
           if ($ftype == TType::LST) {
             $this->dataReplicaLocations = array();
             $_size7 = 0;
@@ -288,33 +306,38 @@ class DataResourceModel {
       $xfer += $output->writeString($this->resourceId);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->resourceName !== null) {
-      $xfer += $output->writeFieldBegin('resourceName', TType::STRING, 2);
+      $xfer += $output->writeFieldBegin('resourceName', TType::STRING, 3);
       $xfer += $output->writeString($this->resourceName);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->resourceDescription !== null) {
-      $xfer += $output->writeFieldBegin('resourceDescription', TType::STRING, 3);
+      $xfer += $output->writeFieldBegin('resourceDescription', TType::STRING, 4);
       $xfer += $output->writeString($this->resourceDescription);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ownerName !== null) {
-      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 4);
+      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 5);
       $xfer += $output->writeString($this->ownerName);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->resourceSize !== null) {
-      $xfer += $output->writeFieldBegin('resourceSize', TType::I32, 5);
+      $xfer += $output->writeFieldBegin('resourceSize', TType::I32, 6);
       $xfer += $output->writeI32($this->resourceSize);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 6);
+      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 7);
       $xfer += $output->writeI64($this->creationTime);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->lastModifiedTime !== null) {
-      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 7);
+      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 8);
       $xfer += $output->writeI64($this->lastModifiedTime);
       $xfer += $output->writeFieldEnd();
     }
@@ -322,7 +345,7 @@ class DataResourceModel {
       if (!is_array($this->resourceMetadata)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('resourceMetadata', TType::MAP, 8);
+      $xfer += $output->writeFieldBegin('resourceMetadata', TType::MAP, 9);
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->resourceMetadata));
         {
@@ -340,7 +363,7 @@ class DataResourceModel {
       if (!is_array($this->dataReplicaLocations)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('dataReplicaLocations', TType::LST, 9);
+      $xfer += $output->writeFieldBegin('dataReplicaLocations', TType::LST, 10);
       {
         $output->writeListBegin(TType::STRUCT, count($this->dataReplicaLocations));
         {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/resource/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/resource/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/resource/ttypes.py
index d261956..3a0d602 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/resource/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/resource/ttypes.py
@@ -55,6 +55,7 @@ class DataResourceModel:
   """
   Attributes:
    - resourceId
+   - gatewayId
    - resourceName
    - resourceDescription
    - ownerName
@@ -68,18 +69,20 @@ class DataResourceModel:
   thrift_spec = (
     None, # 0
     (1, TType.STRING, 'resourceId', None, None, ), # 1
-    (2, TType.STRING, 'resourceName', None, None, ), # 2
-    (3, TType.STRING, 'resourceDescription', None, None, ), # 3
-    (4, TType.STRING, 'ownerName', None, None, ), # 4
-    (5, TType.I32, 'resourceSize', None, None, ), # 5
-    (6, TType.I64, 'creationTime', None, None, ), # 6
-    (7, TType.I64, 'lastModifiedTime', None, None, ), # 7
-    (8, TType.MAP, 'resourceMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 8
-    (9, TType.LIST, 'dataReplicaLocations', (TType.STRUCT,(DataReplicaLocationModel, DataReplicaLocationModel.thrift_spec)), None, ), # 9
+    (2, TType.STRING, 'gatewayId', None, None, ), # 2
+    (3, TType.STRING, 'resourceName', None, None, ), # 3
+    (4, TType.STRING, 'resourceDescription', None, None, ), # 4
+    (5, TType.STRING, 'ownerName', None, None, ), # 5
+    (6, TType.I32, 'resourceSize', None, None, ), # 6
+    (7, TType.I64, 'creationTime', None, None, ), # 7
+    (8, TType.I64, 'lastModifiedTime', None, None, ), # 8
+    (9, TType.MAP, 'resourceMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 9
+    (10, TType.LIST, 'dataReplicaLocations', (TType.STRUCT,(DataReplicaLocationModel, DataReplicaLocationModel.thrift_spec)), None, ), # 10
   )
 
-  def __init__(self, resourceId=None, resourceName=None, resourceDescription=None, ownerName=None, resourceSize=None, creationTime=None, lastModifiedTime=None, resourceMetadata=None, dataReplicaLocations=None,):
+  def __init__(self, resourceId=None, gatewayId=None, resourceName=None, resourceDescription=None, ownerName=None, resourceSize=None, creationTime=None, lastModifiedTime=None, resourceMetadata=None, dataReplicaLocations=None,):
     self.resourceId = resourceId
+    self.gatewayId = gatewayId
     self.resourceName = resourceName
     self.resourceDescription = resourceDescription
     self.ownerName = ownerName
@@ -105,35 +108,40 @@ class DataResourceModel:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.STRING:
-          self.resourceName = iprot.readString();
+          self.gatewayId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 3:
         if ftype == TType.STRING:
-          self.resourceDescription = iprot.readString();
+          self.resourceName = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 4:
         if ftype == TType.STRING:
-          self.ownerName = iprot.readString();
+          self.resourceDescription = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 5:
+        if ftype == TType.STRING:
+          self.ownerName = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 6:
         if ftype == TType.I32:
           self.resourceSize = iprot.readI32();
         else:
           iprot.skip(ftype)
-      elif fid == 6:
+      elif fid == 7:
         if ftype == TType.I64:
           self.creationTime = iprot.readI64();
         else:
           iprot.skip(ftype)
-      elif fid == 7:
+      elif fid == 8:
         if ftype == TType.I64:
           self.lastModifiedTime = iprot.readI64();
         else:
           iprot.skip(ftype)
-      elif fid == 8:
+      elif fid == 9:
         if ftype == TType.MAP:
           self.resourceMetadata = {}
           (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
@@ -144,7 +152,7 @@ class DataResourceModel:
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
-      elif fid == 9:
+      elif fid == 10:
         if ftype == TType.LIST:
           self.dataReplicaLocations = []
           (_etype10, _size7) = iprot.readListBegin()
@@ -169,32 +177,36 @@ class DataResourceModel:
       oprot.writeFieldBegin('resourceId', TType.STRING, 1)
       oprot.writeString(self.resourceId)
       oprot.writeFieldEnd()
+    if self.gatewayId is not None:
+      oprot.writeFieldBegin('gatewayId', TType.STRING, 2)
+      oprot.writeString(self.gatewayId)
+      oprot.writeFieldEnd()
     if self.resourceName is not None:
-      oprot.writeFieldBegin('resourceName', TType.STRING, 2)
+      oprot.writeFieldBegin('resourceName', TType.STRING, 3)
       oprot.writeString(self.resourceName)
       oprot.writeFieldEnd()
     if self.resourceDescription is not None:
-      oprot.writeFieldBegin('resourceDescription', TType.STRING, 3)
+      oprot.writeFieldBegin('resourceDescription', TType.STRING, 4)
       oprot.writeString(self.resourceDescription)
       oprot.writeFieldEnd()
     if self.ownerName is not None:
-      oprot.writeFieldBegin('ownerName', TType.STRING, 4)
+      oprot.writeFieldBegin('ownerName', TType.STRING, 5)
       oprot.writeString(self.ownerName)
       oprot.writeFieldEnd()
     if self.resourceSize is not None:
-      oprot.writeFieldBegin('resourceSize', TType.I32, 5)
+      oprot.writeFieldBegin('resourceSize', TType.I32, 6)
       oprot.writeI32(self.resourceSize)
       oprot.writeFieldEnd()
     if self.creationTime is not None:
-      oprot.writeFieldBegin('creationTime', TType.I64, 6)
+      oprot.writeFieldBegin('creationTime', TType.I64, 7)
       oprot.writeI64(self.creationTime)
       oprot.writeFieldEnd()
     if self.lastModifiedTime is not None:
-      oprot.writeFieldBegin('lastModifiedTime', TType.I64, 7)
+      oprot.writeFieldBegin('lastModifiedTime', TType.I64, 8)
       oprot.writeI64(self.lastModifiedTime)
       oprot.writeFieldEnd()
     if self.resourceMetadata is not None:
-      oprot.writeFieldBegin('resourceMetadata', TType.MAP, 8)
+      oprot.writeFieldBegin('resourceMetadata', TType.MAP, 9)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.resourceMetadata))
       for kiter13,viter14 in self.resourceMetadata.items():
         oprot.writeString(kiter13)
@@ -202,7 +214,7 @@ class DataResourceModel:
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.dataReplicaLocations is not None:
-      oprot.writeFieldBegin('dataReplicaLocations', TType.LIST, 9)
+      oprot.writeFieldBegin('dataReplicaLocations', TType.LIST, 10)
       oprot.writeListBegin(TType.STRUCT, len(self.dataReplicaLocations))
       for iter15 in self.dataReplicaLocations:
         iter15.write(oprot)
@@ -218,6 +230,7 @@ class DataResourceModel:
   def __hash__(self):
     value = 17
     value = (value * 31) ^ hash(self.resourceId)
+    value = (value * 31) ^ hash(self.gatewayId)
     value = (value * 31) ^ hash(self.resourceName)
     value = (value * 31) ^ hash(self.resourceDescription)
     value = (value * 31) ^ hash(self.ownerName)

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/Workflow.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/Workflow.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/Workflow.java
index 572d4ab..ca29188 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/Workflow.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/Workflow.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class Workflow implements org.apache.thrift.TBase<Workflow, Workflow._Fields>, java.io.Serializable, Cloneable, Comparable<Workflow> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Workflow");
 


[4/8] airavata git commit: adding gatewayId to the replica catalog

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/impl/DataCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/impl/DataCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/impl/DataCatalogImpl.java
new file mode 100644
index 0000000..80bf14f
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/impl/DataCatalogImpl.java
@@ -0,0 +1,278 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.impl;
+
+import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
+import org.apache.airavata.model.data.resource.DataResourceModel;
+import org.apache.airavata.registry.core.replica.catalog.model.DataReplicaLocation;
+import org.apache.airavata.registry.core.replica.catalog.model.DataResource;
+import org.apache.airavata.registry.core.replica.catalog.utils.DataCatalogJPAUtils;
+import org.apache.airavata.registry.core.replica.catalog.utils.ThriftDataModelConversion;
+import org.apache.airavata.registry.cpi.DataCatalog;
+import org.apache.airavata.registry.cpi.DataCatalogException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+public class DataCatalogImpl implements DataCatalog {
+
+    private final static Logger logger = LoggerFactory.getLogger(DataCatalogImpl.class);
+
+    @Override
+    public String publishResource(DataResourceModel resourceModel) throws DataCatalogException {
+        String resourceId = UUID.randomUUID().toString();
+        resourceModel.setResourceId(resourceId);
+        if(resourceModel.getDataReplicaLocations() != null){
+            resourceModel.getDataReplicaLocations().stream().forEach(r-> {
+                r.setResourceId(resourceId);
+                r.setReplicaId(UUID.randomUUID().toString());
+            });
+        }
+        resourceModel.setCreationTime(System.currentTimeMillis());
+        resourceModel.setLastModifiedTime(System.currentTimeMillis());
+        DataResource dataResource = ThriftDataModelConversion.getDataResource(resourceModel);
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            em.getTransaction().begin();
+            em.persist(dataResource);
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceId;
+    }
+
+    @Override
+    public boolean removeResource(String resourceId) throws DataCatalogException {
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            DataResource dataResource = em.find(DataResource.class, resourceId);
+            if(dataResource == null)
+                return false;
+            em.getTransaction().begin();
+            em.remove(dataResource);
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public boolean updateResource(DataResourceModel resourceModel) throws DataCatalogException {
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            DataResource dataResource = em.find(DataResource.class, resourceModel.getResourceId());
+            if(dataResource == null)
+                return false;
+            em.getTransaction().begin();
+            resourceModel.setCreationTime(dataResource.getCreationTime().getTime());
+            resourceModel.setLastModifiedTime(System.currentTimeMillis());
+            em.merge(ThriftDataModelConversion.getUpdatedDataResource(resourceModel, dataResource));
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public DataResourceModel getResource(String resourceId) throws DataCatalogException  {
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            DataResource dataResource = em.find(DataResource.class, resourceId);
+            return ThriftDataModelConversion.getDataResourceModel(dataResource);
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    @Override
+    public String publishReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataCatalogException {
+        String replicaId = UUID.randomUUID().toString();
+        dataReplicaLocationModel.setReplicaId(replicaId);
+        dataReplicaLocationModel.setCreationTime(System.currentTimeMillis());
+        dataReplicaLocationModel.setLastModifiedTime(System.currentTimeMillis());
+        DataReplicaLocation replicaLocation = ThriftDataModelConversion.getDataReplicaLocation(dataReplicaLocationModel);
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            em.getTransaction().begin();
+            em.persist(replicaLocation);
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return replicaId;
+    }
+
+    @Override
+    public boolean removeReplicaLocation(String replicaId) throws DataCatalogException {
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            DataReplicaLocation replicaLocation = em.find(DataReplicaLocation.class, replicaId);
+            if(replicaLocation == null)
+                return false;
+            em.getTransaction().begin();
+            em.remove(replicaLocation);
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public boolean updateReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataCatalogException {
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            DataReplicaLocation dataReplicaLocation = em.find(DataReplicaLocation.class, dataReplicaLocationModel.getReplicaId());
+            if(dataReplicaLocation == null)
+                return false;
+            em.getTransaction().begin();
+            dataReplicaLocationModel.setCreationTime(dataReplicaLocation.getCreationTime().getTime());
+            dataReplicaLocationModel.setLastModifiedTime(System.currentTimeMillis());
+            em.merge(ThriftDataModelConversion.getUpdatedDataReplicaLocation(dataReplicaLocationModel, dataReplicaLocation));
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public DataReplicaLocationModel getReplicaLocation(String replicaId) throws DataCatalogException {
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            DataReplicaLocation replicaLocation = em.find(DataReplicaLocation.class, replicaId);
+            return ThriftDataModelConversion.getDataReplicaLocationModel(replicaLocation);
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    @Override
+    public List<DataReplicaLocationModel> getAllReplicaLocations(String resourceId) throws DataCatalogException {
+        EntityManager em = null;
+        try {
+            em = DataCatalogJPAUtils.getEntityManager();
+            DataResource dataResource = em.find(DataResource.class, resourceId);
+            if(dataResource == null)
+                return null;
+            ArrayList<DataReplicaLocationModel> dataReplicaLocationModels = new ArrayList<>();
+            dataResource.getDataReplicaLocations().stream().forEach(rl->dataReplicaLocationModels
+                    .add(ThriftDataModelConversion.getDataReplicaLocationModel(rl)));
+            return dataReplicaLocationModels;
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new DataCatalogException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java
new file mode 100644
index 0000000..881d043
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java
@@ -0,0 +1,55 @@
+/*
+*
+* 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.registry.core.replica.catalog.model;
+
+import org.apache.airavata.registry.core.app.catalog.model.Configuration_PK;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@Entity
+@Table(name ="CONFIGURATION")
+@IdClass(Configuration_PK.class)
+public class Configuration implements Serializable {
+    @Id
+    @Column(name = "CONFIG_KEY")
+    private String config_key;
+
+    @Id
+    @Column(name = "CONFIG_VAL")
+    private String config_val;
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaLocation.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaLocation.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaLocation.java
new file mode 100644
index 0000000..55e65d9
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaLocation.java
@@ -0,0 +1,147 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.model;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Collection;
+
+@Entity
+@Table(name = "DATA_REPLICA_LOCATION")
+public class DataReplicaLocation {
+    private final static Logger logger = LoggerFactory.getLogger(DataReplicaLocation.class);
+    private String replicaId;
+    private String resourceId;
+    private String replicaName;
+    private String replicaDescription;
+    private String dataLocations;
+    private String replicaLocationCategory;
+    private String replicaPersistentType;
+    private Timestamp creationTime;
+    private Timestamp lastModifiedTime;
+
+    private DataResource dataResource;
+    private Collection<DataReplicaMetaData> dataReplicaMetaData;
+
+    @Id
+    @Column(name = "REPLICA_ID")
+    public String getReplicaId() {
+        return replicaId;
+    }
+
+    public void setReplicaId(String replicaId) {
+        this.replicaId = replicaId;
+    }
+
+    @Column(name = "RESOURCE_ID")
+    public String getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(String resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    @Column(name = "DATA_LOCATIONS")
+    public String getDataLocations() {
+        return dataLocations;
+    }
+
+    public void setDataLocations(String dataLocations) {
+        this.dataLocations = dataLocations;
+    }
+
+    @Column(name = "REPLICA_NAME")
+    public String getReplicaName() {
+        return replicaName;
+    }
+
+    public void setReplicaName(String replicaName) {
+        this.replicaName = replicaName;
+    }
+
+    @Column(name = "REPLICA_DESCRIPTION")
+    public String getReplicaDescription() {
+        return replicaDescription;
+    }
+
+    public void setReplicaDescription(String replicaDescription) {
+        this.replicaDescription = replicaDescription;
+    }
+
+    @Column(name = "CREATION_TIME")
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    @Column(name = "LAST_MODIFIED_TIME")
+    public Timestamp getLastModifiedTime() {
+        return lastModifiedTime;
+    }
+
+    public void setLastModifiedTime(Timestamp lastModifiedTime) {
+        this.lastModifiedTime = lastModifiedTime;
+    }
+
+    @Column(name = "REPLICA_LOCATION_CATEGORY")
+    public String getReplicaLocationCategory() {
+        return replicaLocationCategory;
+    }
+
+    public void setReplicaLocationCategory(String replicaLocationCategory) {
+        this.replicaLocationCategory = replicaLocationCategory;
+    }
+
+    @Column(name = "REPLICA_PERSISTENT_TYPE")
+    public String getReplicaPersistentType() {
+        return replicaPersistentType;
+    }
+
+    public void setReplicaPersistentType(String replicaPersistentType) {
+        this.replicaPersistentType = replicaPersistentType;
+    }
+
+    @ManyToOne
+    @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "RESOURCE_ID")
+    public DataResource getDataResource() {
+        return dataResource;
+    }
+
+    public void setDataResource(DataResource dataResource) {
+        this.dataResource = dataResource;
+    }
+
+    @OneToMany(mappedBy = "dataReplicaLocation", cascade = {CascadeType.ALL})
+    public Collection<DataReplicaMetaData> getDataReplicaMetaData() {
+        return dataReplicaMetaData;
+    }
+
+    public void setDataReplicaMetaData(Collection<DataReplicaMetaData> dataReplicaMetaData) {
+        this.dataReplicaMetaData = dataReplicaMetaData;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaMetaData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaMetaData.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaMetaData.java
new file mode 100644
index 0000000..2f00321
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaMetaData.java
@@ -0,0 +1,77 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.model;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "DATA_REPLICA_METADATA")
+@IdClass(DataReplicaMetaData_PK.class)
+public class DataReplicaMetaData {
+    private final static Logger logger = LoggerFactory.getLogger(DataReplicaMetaData.class);
+    private String replicaId;
+    private String key;
+    private String value;
+
+    private DataReplicaLocation dataReplicaLocation;
+
+    @Id
+    @Column(name = "REPLICA_ID")
+    public String getReplicaId() {
+        return replicaId;
+    }
+
+    public void setReplicaId(String replicaId) {
+        this.replicaId = replicaId;
+    }
+
+    @Id
+    @Column(name = "METADATA_KEY")
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    @Column(name = "METADATA_VALUE")
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    @ManyToOne
+    @JoinColumn(name = "REPLICA_ID", referencedColumnName = "REPLICA_ID")
+    public DataReplicaLocation getDataReplicaLocation() {
+        return dataReplicaLocation;
+    }
+
+    public void setDataReplicaLocation(DataReplicaLocation dataReplicaLocation) {
+        this.dataReplicaLocation = dataReplicaLocation;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaMetaData_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaMetaData_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaMetaData_PK.java
new file mode 100644
index 0000000..86133c2
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataReplicaMetaData_PK.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.model;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.Serializable;
+
+public class DataReplicaMetaData_PK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(DataReplicaMetaData_PK.class);
+
+    private String replicaId;
+    private String key;
+
+    public String getReplicaId() {
+        return replicaId;
+    }
+
+    public void setReplicaId(String replicaId) {
+        this.replicaId = replicaId;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResource.java
new file mode 100644
index 0000000..bfded63
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResource.java
@@ -0,0 +1,136 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.model;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Collection;
+
+@Entity
+@Table(name = "DATA_RESOURCE")
+public class DataResource {
+    private final static Logger logger = LoggerFactory.getLogger(DataResource.class);
+    private String resourceId;
+    private String gatewayId;
+    private String resourceName;
+    private String resourceDescription;
+    private String ownerName;
+    private int resourceSize;
+    private Timestamp creationTime;
+    private Timestamp lastModifiedTime;
+
+    private Collection<DataReplicaLocation> dataReplicaLocations;
+    private Collection<DataResourceMetaData> dataResourceMetaData;
+
+    @Id
+    @Column(name = "RESOURCE_ID")
+    public String getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(String resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    @Column(name = "GATEWAY_ID")
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    @Column(name = "RESOURCE_NAME")
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    public void setResourceName(String resourceName) {
+        this.resourceName = resourceName;
+    }
+
+    @Column(name = "RESOURCE_DESCRIPTION")
+    public String getResourceDescription() {
+        return resourceDescription;
+    }
+
+    public void setResourceDescription(String resourceDescription) {
+        this.resourceDescription = resourceDescription;
+    }
+
+    @Column(name = "OWNER_NAME")
+    public String getOwnerName() {
+        return ownerName;
+    }
+
+    public void setOwnerName(String ownerName) {
+        this.ownerName = ownerName;
+    }
+
+    @Column(name = "RESOURCE_SIZE")
+    public int getResourceSize() {
+        return resourceSize;
+    }
+
+    public void setResourceSize(int resourceSize) {
+        this.resourceSize = resourceSize;
+    }
+
+    @Column(name = "CREATION_TIME")
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    @Column(name = "LAST_MODIFIED_TIME")
+    public Timestamp getLastModifiedTime() {
+        return lastModifiedTime;
+    }
+
+    public void setLastModifiedTime(Timestamp lastModifiedTime) {
+        this.lastModifiedTime = lastModifiedTime;
+    }
+
+    @OneToMany(mappedBy = "dataResource", cascade = {CascadeType.ALL})
+    public Collection<DataReplicaLocation> getDataReplicaLocations() {
+        return dataReplicaLocations;
+    }
+
+    public void setDataReplicaLocations(Collection<DataReplicaLocation> dataReplicaLocations) {
+        this.dataReplicaLocations = dataReplicaLocations;
+    }
+
+    @OneToMany(mappedBy = "dataResource", cascade = {CascadeType.ALL})
+    public Collection<DataResourceMetaData> getDataResourceMetaData() {
+        return dataResourceMetaData;
+    }
+
+    public void setDataResourceMetaData(Collection<DataResourceMetaData> dataResourceMetaData) {
+        this.dataResourceMetaData = dataResourceMetaData;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResourceMetaData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResourceMetaData.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResourceMetaData.java
new file mode 100644
index 0000000..85eb511
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResourceMetaData.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.model;
+
+import org.apache.airavata.registry.core.app.catalog.model.AppEnvironment_PK;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.Collection;
+
+@Entity
+@Table(name = "DATA_RESOURCE_METADATA")
+@IdClass(DataResourceMetaData_PK.class)
+public class DataResourceMetaData {
+    private final static Logger logger = LoggerFactory.getLogger(DataResourceMetaData.class);
+    private String resourceId;
+    private String key;
+    private String value;
+
+    private DataResource dataResource;
+
+    @Id
+    @Column(name = "RESOURCE_ID")
+    public String getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(String resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    @Id
+    @Column(name = "METADATA_KEY")
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    @Column(name = "METADATA_VALUE")
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    @ManyToOne
+    @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "RESOURCE_ID")
+    public DataResource getDataResource() {
+        return dataResource;
+    }
+
+    public void setDataResource(DataResource dataResource) {
+        this.dataResource = dataResource;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResourceMetaData_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResourceMetaData_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResourceMetaData_PK.java
new file mode 100644
index 0000000..0a77c62
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/DataResourceMetaData_PK.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.model;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.Serializable;
+
+public class DataResourceMetaData_PK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(DataResourceMetaData_PK.class);
+
+    private String resourceId;
+    private String key;
+
+    public String getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(String resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogConstants.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogConstants.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogConstants.java
new file mode 100644
index 0000000..562dc3d
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogConstants.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.utils;
+
+public class DataCatalogConstants {
+	// table names
+	public static final String DATA_RESOURCE = "DataResource";
+	public static final String DATA_REPLICA_LOCATION = "DataReplicaLocation";
+	public static final String CONFIGURATION = "Configuration";
+
+	// DataResource Table
+	public final class DataResourceConstants {
+		public static final String RESOURCE_ID = "resourceId";
+		public static final String RESOURCE_NAME = "resourceName";
+		public static final String RESOURCE_DESCRIPTION = "resourceDescription";
+		public static final String RESOURCE_SIZE = "resourceSize";
+        public static final String CREATION_TIME = "creationTime";
+        public static final String LAST_MODIFIED_TIME = "lastModifiedTime";
+	}
+
+	// Users table
+	public final class DataReplicaLocationConstants {
+        public static final String REPLICA_ID = "replicaId";
+        public static final String RESOURCE_ID = "resourceId";
+        public static final String DATA_LOCATIONS = "dataLocations";
+        public static final String REPLICA_NAME = "replicaName";
+        public static final String REPLICA_DESCRIPTION = "replicaDescription";
+        public static final String CREATION_TIME = "creationTime";
+        public static final String LAST_MODIFIED_TIME = "lastModifiedTime";
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogJPAUtils.java
new file mode 100644
index 0000000..1f1005e
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogJPAUtils.java
@@ -0,0 +1,82 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.utils;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.util.HashMap;
+import java.util.Map;
+
+public class DataCatalogJPAUtils {
+    private final static Logger logger = LoggerFactory.getLogger(DataCatalogJPAUtils.class);
+
+    private static final String PERSISTENCE_UNIT_NAME = "datacatalog_data";
+    private static final String DATACATALOG_JDBC_DRIVER = "datacatalog.jdbc.driver";
+    private static final String DATACATALOG_JDBC_URL = "datacatalog.jdbc.url";
+    private static final String DATACATALOG_JDBC_USER = "datacatalog.jdbc.user";
+    private static final String DATACATALOG_JDBC_PWD = "datacatalog.jdbc.password";
+    private static final String DATACATALOG_VALIDATION_QUERY = "datacatalog.validationQuery";
+
+    @PersistenceUnit(unitName="datacatalog_data")
+    protected static EntityManagerFactory factory;
+
+    @PersistenceContext(unitName="datacatalog_data")
+    private static EntityManager dataCatEntityManager;
+
+    public static EntityManager getEntityManager() throws ApplicationSettingsException {
+        if (factory == null) {
+            String connectionProperties = "DriverClassName=" + readServerProperties(DATACATALOG_JDBC_DRIVER) + "," +
+                    "Url=" + readServerProperties(DATACATALOG_JDBC_URL) + "?autoReconnect=true," +
+                    "Username=" + readServerProperties(DATACATALOG_JDBC_USER) + "," +
+                    "Password=" + readServerProperties(DATACATALOG_JDBC_PWD) +
+                    ",validationQuery=" + readServerProperties(DATACATALOG_VALIDATION_QUERY);
+            System.out.println(connectionProperties);
+            Map<String, String> properties = new HashMap<String, String>();
+            properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
+            properties.put("openjpa.ConnectionProperties", connectionProperties);
+            properties.put("openjpa.DynamicEnhancementAgent", "true");
+            properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
+            properties.put("openjpa.RemoteCommitProvider","sjvm");
+            properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
+            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
+            properties.put("openjpa.jdbc.QuerySQLCache", "false");
+            properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
+                    " PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
+            factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
+        }
+        dataCatEntityManager = factory.createEntityManager();
+        return dataCatEntityManager;
+    }
+
+    private static String readServerProperties (String propertyName) throws ApplicationSettingsException {
+        try {
+            return ServerSettings.getSetting(propertyName);
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read airavata-server.properties...", e);
+            throw new ApplicationSettingsException("Unable to read airavata-server.properties...");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogQueryGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogQueryGenerator.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogQueryGenerator.java
new file mode 100644
index 0000000..fa46da5
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/DataCatalogQueryGenerator.java
@@ -0,0 +1,111 @@
+/*
+ *
+ * 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.registry.core.replica.catalog.utils;
+
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.util.HashMap;
+import java.util.Map;
+
+public class DataCatalogQueryGenerator {
+
+    private final static Logger logger = LoggerFactory.getLogger(DataCatalogQueryGenerator.class);
+	private String tableName;
+	private Map<String,Object> matches=new HashMap<String, Object>();
+	private static final String SELECT_OBJ="p";
+	private static final String DELETE_OBJ="p";
+	private static final String TABLE_OBJ="p";
+
+	public DataCatalogQueryGenerator(String tableName, Object[]... params) {
+		setTableName(tableName);
+		for (Object[] param : params) {
+			addMatch(param[0].toString(), param[1]);
+		}
+	}
+	
+	public String getTableName() {
+		return tableName;
+	}
+
+    public void setTableName(String tableName) {
+		this.tableName = tableName;
+	}
+
+    public void addMatch(String colName, Object matchValue){
+		matches.put(colName, matchValue);
+	}
+	
+	public void setParameter(String colName, Object matchValue){
+		addMatch(colName, matchValue);
+	}
+
+    public Query selectQuery(EntityManager entityManager){
+        String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
+        return generateQueryWithParameters(entityManager, queryString);
+    }
+
+    public Query selectQuery(EntityManager entityManager, String orderByColumn,
+                             ResultOrderType resultOrderType){
+        String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
+        String orderByClause = " ORDER BY " + SELECT_OBJ + "." + orderByColumn + " " + order;
+        String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
+        return generateQueryWithParameters(entityManager, queryString, orderByClause);
+    }
+
+	public Query deleteQuery(EntityManager entityManager){
+		String queryString="Delete FROM "+getTableName()+" "+TABLE_OBJ;
+		return generateQueryWithParameters(entityManager, queryString);
+	}
+
+	private Query generateQueryWithParameters(EntityManager entityManager, String queryString) {
+		return generateQueryWithParameters(entityManager, queryString, "");
+	}
+
+    private Query generateQueryWithParameters(EntityManager entityManager,
+                                              String queryString, String orderByClause) {
+        Map<String,Object> queryParameters=new HashMap<String, Object>();
+        if (matches.size()>0){
+            String matchString = "";
+            int paramCount=0;
+            for (String colName : matches.keySet()) {
+                String paramName="param"+paramCount;
+                queryParameters.put(paramName, matches.get(colName));
+                if (!matchString.equals("")){
+                    matchString+=" AND ";
+                }
+                matchString+=TABLE_OBJ+"."+colName+" =:"+paramName;
+                paramCount++;
+            }
+            queryString+=" WHERE "+matchString;
+        }
+        queryString += orderByClause;
+        Query query = entityManager.createQuery(queryString);
+        for (String paramName : queryParameters.keySet()) {
+            query.setParameter(paramName, queryParameters.get(paramName));
+        }
+        return query;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/ThriftDataModelConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/ThriftDataModelConversion.java
new file mode 100644
index 0000000..de14f93
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/utils/ThriftDataModelConversion.java
@@ -0,0 +1,188 @@
+/*
+*
+* 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.registry.core.replica.catalog.utils;
+
+import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
+import org.apache.airavata.model.data.resource.DataResourceModel;
+import org.apache.airavata.model.data.resource.ReplicaLocationCategory;
+import org.apache.airavata.model.data.resource.ReplicaPersistentType;
+import org.apache.airavata.registry.core.replica.catalog.model.DataReplicaLocation;
+import org.apache.airavata.registry.core.replica.catalog.model.DataReplicaMetaData;
+import org.apache.airavata.registry.core.replica.catalog.model.DataResource;
+import org.apache.airavata.registry.core.replica.catalog.model.DataResourceMetaData;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ThriftDataModelConversion {
+
+    private final static Logger logger = LoggerFactory.getLogger(ThriftDataModelConversion.class);
+
+    public static DataResourceModel getDataResourceModel(DataResource dataResource){
+        if (dataResource != null) {
+            DataResourceModel dataResourceModel = new DataResourceModel();
+            dataResourceModel.setResourceId(dataResource.getResourceId());
+            dataResourceModel.setGatewayId(dataResource.getGatewayId());
+            dataResourceModel.setResourceName(dataResource.getResourceName());
+            dataResourceModel.setResourceDescription(dataResource.getResourceDescription());
+            dataResourceModel.setOwnerName(dataResource.getOwnerName());
+            dataResourceModel.setResourceSize(dataResource.getResourceSize());
+            dataResourceModel.setCreationTime(dataResource.getCreationTime().getTime());
+            dataResourceModel.setLastModifiedTime(dataResource.getLastModifiedTime().getTime());
+            dataResourceModel.setResourceMetadata(getResourceMetaData(dataResource.getDataResourceMetaData()));
+            if(dataResource.getDataReplicaLocations() != null){
+                ArrayList<DataReplicaLocationModel> dataReplicaLocationModels = new ArrayList<>();
+                dataResource.getDataReplicaLocations().stream().forEach(r->dataReplicaLocationModels
+                        .add(getDataReplicaLocationModel(r)));
+                dataResourceModel.setDataReplicaLocations(dataReplicaLocationModels);
+            }
+            return dataResourceModel;
+        }
+        return null;
+    }
+
+    public static DataResource getDataResource(DataResourceModel dataResourceModel){
+        if(dataResourceModel != null){
+            DataResource dataResource = new DataResource();
+            return getUpdatedDataResource(dataResourceModel, dataResource);
+        }
+        return null;
+    }
+
+    public static DataResource getUpdatedDataResource(DataResourceModel dataResourceModel, DataResource dataResource){
+        dataResource.setResourceId(dataResourceModel.getResourceId());
+        dataResource.setGatewayId(dataResourceModel.getGatewayId());
+        dataResource.setResourceName(dataResourceModel.getResourceName());
+        dataResource.setResourceDescription(dataResourceModel.getResourceDescription());
+        dataResource.setOwnerName(dataResourceModel.getOwnerName());
+        dataResource.setResourceSize(dataResourceModel.getResourceSize());
+        dataResource.setCreationTime(new Timestamp(dataResourceModel.getCreationTime()));
+        dataResource.setLastModifiedTime(new Timestamp(dataResourceModel.getLastModifiedTime()));
+        ArrayList<DataResourceMetaData> dataResourceMetaData = new ArrayList<>();
+        if(dataResourceModel.getResourceMetadata() != null) {
+            dataResourceModel.getResourceMetadata().keySet().stream().forEach(k -> {
+                String v = dataResourceModel.getResourceMetadata().get(k);
+                DataResourceMetaData temp = new DataResourceMetaData();
+                temp.setResourceId(dataResource.getResourceId());
+                temp.setKey(k);
+                temp.setValue(v);
+                dataResourceMetaData.add(temp);
+            });
+            dataResource.setDataResourceMetaData(dataResourceMetaData);
+        }
+        if(dataResourceModel.getDataReplicaLocations() != null){
+            ArrayList<DataReplicaLocation> dataReplicaLocations = new ArrayList<>();
+            dataResourceModel.getDataReplicaLocations().stream().forEach(r->{
+                DataReplicaLocation dataReplicaLocationModel = getDataReplicaLocation(r);
+                dataReplicaLocationModel.setResourceId(dataResourceModel.getResourceId());
+                dataReplicaLocations.add(dataReplicaLocationModel);
+            });
+            dataResource.setDataReplicaLocations(dataReplicaLocations);
+        }
+        return dataResource;
+    }
+
+    public static DataReplicaLocationModel getDataReplicaLocationModel(DataReplicaLocation replicaLocation){
+        if (replicaLocation != null) {
+            DataReplicaLocationModel replicaLocationModel = new DataReplicaLocationModel();
+            replicaLocationModel.setReplicaId(replicaLocation.getReplicaId());
+            replicaLocationModel.setResourceId(replicaLocation.getResourceId());
+            replicaLocationModel.setReplicaName(replicaLocation.getReplicaName());
+            replicaLocationModel.setReplicaDescription(replicaLocation.getReplicaDescription());
+            replicaLocationModel.setCreationTime(replicaLocation.getCreationTime().getTime());
+            replicaLocationModel.setLastModifiedTime(replicaLocation.getLastModifiedTime().getTime());
+            if(replicaLocation.getReplicaLocationCategory() != null)
+                replicaLocationModel.setReplicaLocationCategory(ReplicaLocationCategory.valueOf(replicaLocation
+                    .getReplicaLocationCategory().toString()));
+            if(replicaLocation.getReplicaPersistentType() != null)
+                replicaLocationModel.setReplicaPersistentType(ReplicaPersistentType.valueOf(replicaLocation
+                    .getReplicaPersistentType().toString()));
+            if(replicaLocation.getDataLocations()!=null && !replicaLocation.getDataLocations().isEmpty()) {
+                String[] dataLocations = replicaLocation.getDataLocations().split(",");
+                for(String dataLocation : dataLocations){
+                    replicaLocationModel.addToDataLocations(dataLocation);
+                }
+            }
+            replicaLocationModel.setReplicaMetadata(getReplicaMetaData(replicaLocation.getDataReplicaMetaData()));
+            return replicaLocationModel;
+        }
+        return null;
+    }
+
+    public static DataReplicaLocation getDataReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel){
+        if(dataReplicaLocationModel != null){
+            DataReplicaLocation dataReplicaLocation = new DataReplicaLocation();
+            return getUpdatedDataReplicaLocation(dataReplicaLocationModel, dataReplicaLocation);
+        }
+        return null;
+    }
+
+    public static DataReplicaLocation getUpdatedDataReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel,
+                                                                    DataReplicaLocation dataReplicaLocation){
+        dataReplicaLocation.setReplicaId(dataReplicaLocationModel.getReplicaId());
+        dataReplicaLocation.setResourceId(dataReplicaLocationModel.getResourceId());
+        dataReplicaLocation.setReplicaName(dataReplicaLocationModel.getReplicaName());
+        dataReplicaLocation.setReplicaDescription(dataReplicaLocationModel.getReplicaDescription());
+        dataReplicaLocation.setDataLocations(StringUtils.join(dataReplicaLocationModel.getDataLocations(), ','));
+        dataReplicaLocation.setCreationTime(new Timestamp(dataReplicaLocationModel.getCreationTime()));
+        dataReplicaLocation.setLastModifiedTime(new Timestamp(dataReplicaLocationModel.getLastModifiedTime()));
+        if(dataReplicaLocationModel.getReplicaLocationCategory() != null)
+            dataReplicaLocation.setReplicaLocationCategory(dataReplicaLocationModel.getReplicaLocationCategory().toString());
+        if(dataReplicaLocationModel.getReplicaPersistentType() != null)
+            dataReplicaLocation.setReplicaPersistentType(dataReplicaLocationModel.getReplicaPersistentType().toString());
+        ArrayList<DataReplicaMetaData> dataReplicaMetadata = new ArrayList<>();
+        if(dataReplicaLocation.getDataReplicaMetaData() != null){
+            dataReplicaLocationModel.getReplicaMetadata().keySet().stream().forEach(k -> {
+                String v = dataReplicaLocationModel.getReplicaMetadata().get(k);
+                DataReplicaMetaData temp = new DataReplicaMetaData();
+                temp.setReplicaId(dataReplicaLocationModel.getResourceId());
+                temp.setKey(k);
+                temp.setValue(v);
+                dataReplicaMetadata.add(temp);
+            });
+            dataReplicaLocation.setDataReplicaMetaData(dataReplicaMetadata);
+        }
+        return dataReplicaLocation;
+    }
+
+    public static Map<String, String> getResourceMetaData(Collection<DataResourceMetaData> dataResourceMetaData){
+        HashMap<String, String> metadata = new HashMap<>();
+        if(dataResourceMetaData!=null && !dataResourceMetaData.isEmpty()) {
+            dataResourceMetaData.stream().forEach(m -> metadata.put(m.getKey(),m.getValue()));
+        }
+        return metadata;
+    }
+
+    public static Map<String, String> getReplicaMetaData(Collection<DataReplicaMetaData> dataReplicaMetaData){
+        HashMap<String, String> metadata = new HashMap<>();
+        if(dataReplicaMetaData!=null && !dataReplicaMetaData.isEmpty()) {
+            dataReplicaMetaData.stream().forEach(m -> metadata.put(m.getKey(),m.getValue()));
+        }
+        return metadata;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
index 3e5bd98..d1df264 100644
--- a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
@@ -96,11 +96,11 @@
     </persistence-unit>
     <persistence-unit name="datacatalog_data">
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
-        <class>org.apache.airavata.registry.core.data.catalog.model.DataResource</class>
-        <class>org.apache.airavata.registry.core.data.catalog.model.DataReplicaLocation</class>
-        <class>org.apache.airavata.registry.core.data.catalog.model.DataResourceMetaData</class>
-        <class>org.apache.airavata.registry.core.data.catalog.model.DataReplicaMetaData</class>
-        <class>org.apache.airavata.registry.core.data.catalog.model.Configuration</class>
+        <class>org.apache.airavata.registry.core.replica.catalog.model.DataResource</class>
+        <class>org.apache.airavata.registry.core.replica.catalog.model.DataReplicaLocation</class>
+        <class>org.apache.airavata.registry.core.replica.catalog.model.DataResourceMetaData</class>
+        <class>org.apache.airavata.registry.core.replica.catalog.model.DataReplicaMetaData</class>
+        <class>org.apache.airavata.registry.core.replica.catalog.model.Configuration</class>
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
     </persistence-unit>
 </persistence>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/resources/datacatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/datacatalog-derby.sql b/modules/registry/registry-core/src/main/resources/datacatalog-derby.sql
deleted file mode 100644
index cc854ee..0000000
--- a/modules/registry/registry-core/src/main/resources/datacatalog-derby.sql
+++ /dev/null
@@ -1,73 +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.
- *
- */
-
-CREATE TABLE DATA_RESOURCE
-(
-        RESOURCE_ID VARCHAR (255),
-        RESOURCE_NAME VARCHAR (255),
-        RESOURCE_DESCRIPTION VARCHAR (1024),
-        OWNER_NAME VARCHAR (255),
-        RESOURCE_SIZE INTEGER ,
-        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        LAST_MODIFIED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        PRIMARY KEY (RESOURCE_ID)
-);
-
-CREATE TABLE DATA_REPLICA_LOCATION
-(
-        REPLICA_ID VARCHAR (255),
-        RESOURCE_ID VARCHAR (255) NOT NULL,
-        REPLICA_NAME VARCHAR (255),
-        REPLICA_DESCRIPTION VARCHAR (1024),
-        DATA_LOCATIONS VARCHAR (4096),
-        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        LAST_MODIFIED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        PRIMARY KEY (REPLICA_ID),
-        FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE DATA_RESOURCE_METADATA
-(
-        RESOURCE_ID VARCHAR(255),
-        METADATA_KEY VARCHAR(255),
-        METADATA_VALUE VARCHAR(2048),
-        PRIMARY KEY(RESOURCE_ID, METADATA_KEY),
-        FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE DATA_REPLICA_METADATA
-(
-        REPLICA_ID VARCHAR(255),
-        METADATA_KEY VARCHAR(255),
-        METADATA_VALUE VARCHAR(2048),
-        PRIMARY KEY(REPLICA_ID, METADATA_KEY),
-        FOREIGN KEY (REPLICA_ID) REFERENCES DATA_REPLICA_LOCATION(REPLICA_ID) ON DELETE CASCADE
-);
-
-
-CREATE TABLE CONFIGURATION
-(
-        CONFIG_KEY VARCHAR(255),
-        CONFIG_VAL VARCHAR(255),
-        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
-);
-
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('data_catalog_version', '0.16');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
deleted file mode 100644
index 0fbbc58..0000000
--- a/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
+++ /dev/null
@@ -1,72 +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.
- *
- */
-
-CREATE TABLE DATA_RESOURCE
-(
-        RESOURCE_ID VARCHAR (255),
-        RESOURCE_NAME VARCHAR (255),
-        RESOURCE_DESCRIPTION VARCHAR (1024),
-        OWNER_NAME VARCHAR (255),
-        RESOURCE_SIZE INT,
-        CREATION_TIME TIMESTAMP,
-        LAST_MODIFIED_TIME TIMESTAMP,
-        PRIMARY KEY (RESOURCE_ID)
-);
-
-CREATE TABLE DATA_REPLICA_LOCATION
-(
-        REPLICA_ID VARCHAR (255),
-        RESOURCE_ID VARCHAR (255) NOT NULL,
-        REPLICA_NAME VARCHAR (255),
-        REPLICA_DESCRIPTION VARCHAR (1024),
-        DATA_LOCATIONS VARCHAR (4096),
-        CREATION_TIME TIMESTAMP,
-        LAST_MODIFIED_TIME TIMESTAMP,
-        PRIMARY KEY (REPLICA_ID),
-        FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE DATA_RESOURCE_METADATA
-(
-        RESOURCE_ID VARCHAR(255),
-        METADATA_KEY VARCHAR(255),
-        METADATA_VALUE VARCHAR(2048),
-        PRIMARY KEY(RESOURCE_ID, METADATA_KEY),
-        FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE DATA_REPLICA_METADATA
-(
-        REPLICA_ID VARCHAR(255),
-        METADATA_KEY VARCHAR(255),
-        METADATA_VALUE VARCHAR(2048),
-        PRIMARY KEY(REPLICA_ID, METADATA_KEY),
-        FOREIGN KEY (REPLICA_ID) REFERENCES DATA_REPLICA_LOCATION(REPLICA_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE CONFIGURATION
-(
-        CONFIG_KEY VARCHAR(255),
-        CONFIG_VAL VARCHAR(255),
-        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
-);
-
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('data_catalog_version', '0.16');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/resources/replicacatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/replicacatalog-derby.sql b/modules/registry/registry-core/src/main/resources/replicacatalog-derby.sql
new file mode 100644
index 0000000..bed00b4
--- /dev/null
+++ b/modules/registry/registry-core/src/main/resources/replicacatalog-derby.sql
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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 DATA_RESOURCE
+(
+        RESOURCE_ID VARCHAR (255),
+        GATEWAY_ID VARCHAR (255),
+        RESOURCE_NAME VARCHAR (255),
+        RESOURCE_DESCRIPTION VARCHAR (1024),
+        OWNER_NAME VARCHAR (255),
+        RESOURCE_SIZE INTEGER ,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        LAST_MODIFIED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE DATA_REPLICA_LOCATION
+(
+        REPLICA_ID VARCHAR (255),
+        RESOURCE_ID VARCHAR (255) NOT NULL,
+        REPLICA_NAME VARCHAR (255),
+        REPLICA_DESCRIPTION VARCHAR (1024),
+        DATA_LOCATIONS VARCHAR (4096),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        LAST_MODIFIED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (REPLICA_ID),
+        FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE DATA_RESOURCE_METADATA
+(
+        RESOURCE_ID VARCHAR(255),
+        METADATA_KEY VARCHAR(255),
+        METADATA_VALUE VARCHAR(2048),
+        PRIMARY KEY(RESOURCE_ID, METADATA_KEY),
+        FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE DATA_REPLICA_METADATA
+(
+        REPLICA_ID VARCHAR(255),
+        METADATA_KEY VARCHAR(255),
+        METADATA_VALUE VARCHAR(2048),
+        PRIMARY KEY(REPLICA_ID, METADATA_KEY),
+        FOREIGN KEY (REPLICA_ID) REFERENCES DATA_REPLICA_LOCATION(REPLICA_ID) ON DELETE CASCADE
+);
+
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('data_catalog_version', '0.16');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/resources/replicacatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/replicacatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/replicacatalog-mysql.sql
new file mode 100644
index 0000000..aec7205
--- /dev/null
+++ b/modules/registry/registry-core/src/main/resources/replicacatalog-mysql.sql
@@ -0,0 +1,73 @@
+/*
+ *
+ * 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 DATA_RESOURCE
+(
+        RESOURCE_ID VARCHAR (255),
+        GATEWAY_ID VARCHAR (255),
+        RESOURCE_NAME VARCHAR (255),
+        RESOURCE_DESCRIPTION VARCHAR (1024),
+        OWNER_NAME VARCHAR (255),
+        RESOURCE_SIZE INT,
+        CREATION_TIME TIMESTAMP,
+        LAST_MODIFIED_TIME TIMESTAMP,
+        PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE DATA_REPLICA_LOCATION
+(
+        REPLICA_ID VARCHAR (255),
+        RESOURCE_ID VARCHAR (255) NOT NULL,
+        REPLICA_NAME VARCHAR (255),
+        REPLICA_DESCRIPTION VARCHAR (1024),
+        DATA_LOCATIONS VARCHAR (4096),
+        CREATION_TIME TIMESTAMP,
+        LAST_MODIFIED_TIME TIMESTAMP,
+        PRIMARY KEY (REPLICA_ID),
+        FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE DATA_RESOURCE_METADATA
+(
+        RESOURCE_ID VARCHAR(255),
+        METADATA_KEY VARCHAR(255),
+        METADATA_VALUE VARCHAR(2048),
+        PRIMARY KEY(RESOURCE_ID, METADATA_KEY),
+        FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE DATA_REPLICA_METADATA
+(
+        REPLICA_ID VARCHAR(255),
+        METADATA_KEY VARCHAR(255),
+        METADATA_VALUE VARCHAR(2048),
+        PRIMARY KEY(REPLICA_ID, METADATA_KEY),
+        FOREIGN KEY (REPLICA_ID) REFERENCES DATA_REPLICA_LOCATION(REPLICA_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('data_catalog_version', '0.16');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/test/java/org/apache/airavata/data/catalog/DataCatalogTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/test/java/org/apache/airavata/data/catalog/DataCatalogTest.java b/modules/registry/registry-core/src/test/java/org/apache/airavata/data/catalog/DataCatalogTest.java
deleted file mode 100644
index 8bd199d..0000000
--- a/modules/registry/registry-core/src/test/java/org/apache/airavata/data/catalog/DataCatalogTest.java
+++ /dev/null
@@ -1,222 +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.data.catalog;
-
-import org.apache.airavata.data.catalog.util.Initialize;
-import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
-import org.apache.airavata.model.data.resource.DataResourceModel;
-import org.apache.airavata.model.data.resource.ReplicaLocationCategory;
-import org.apache.airavata.model.data.resource.ReplicaPersistentType;
-import org.apache.airavata.registry.core.data.catalog.model.DataReplicaLocation;
-import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.DataCatalog;
-import org.apache.airavata.registry.cpi.DataCatalogException;
-import org.junit.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.UUID;
-
-public class DataCatalogTest {
-    private final static Logger logger = LoggerFactory.getLogger(DataCatalogTest.class);
-    private static Initialize initialize;
-    private static DataCatalog datacatalog;
-    private static DataResourceModel dataResourceModel;
-    private static DataReplicaLocationModel replicaLocationModel;
-
-    @BeforeClass
-    public static void setUp() {
-        try {
-            System.out.println("********** SET UP ************");
-            initialize = new Initialize("datacatalog-derby.sql");
-            initialize.initializeDB();
-            datacatalog = RegistryFactory.getDataCatalog();
-            dataResourceModel = new DataResourceModel();
-            dataResourceModel.setResourceName("test-file.txt");
-            HashMap<String, String> resMetadata = new HashMap<>();
-            resMetadata.put("name", "name");
-            dataResourceModel.setResourceMetadata(resMetadata);
-
-            replicaLocationModel = new DataReplicaLocationModel();
-            replicaLocationModel.setReplicaName("1-st-replica");
-            replicaLocationModel.setReplicaLocationCategory(ReplicaLocationCategory.COMPUTE_RESOURCE);
-            replicaLocationModel.setReplicaPersistentType(ReplicaPersistentType.PERSISTENT);
-            HashMap<String, String> rMetadata = new HashMap<>();
-            rMetadata.put("name", "name");
-            replicaLocationModel.setReplicaMetadata(rMetadata);
-            ArrayList<String> dataLocations = new ArrayList<>();
-            dataLocations.add("scp://g75.iu.xsede.org:/var/www/portal/experimentData/test-file.txt");
-            replicaLocationModel.setDataLocations(dataLocations);
-
-            dataResourceModel.addToDataReplicaLocations(replicaLocationModel);
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-
-    @AfterClass
-    public static void tearDown() throws Exception {
-        System.out.println("********** TEAR DOWN ************");
-        initialize.stopDerbyServer();
-    }
-
-    @Test
-    public void testPublishDataResource(){
-        try {
-            String resourceId = datacatalog.publishResource(dataResourceModel);
-            org.junit.Assert.assertNotNull(resourceId);
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testRemoveDataResource(){
-        try {
-            boolean result = datacatalog.removeResource("234234234");
-            Assert.assertFalse(result);
-            String resourceId = datacatalog.publishResource(dataResourceModel);
-            Assert.assertNotNull(resourceId);
-            result = datacatalog.removeResource(resourceId);
-            Assert.assertTrue(result);
-            result = datacatalog.removeResource(resourceId);
-            Assert.assertFalse(result);
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testGetDataResource(){
-        try {
-            String resourceId = datacatalog.publishResource(dataResourceModel);
-            Assert.assertNotNull(resourceId);
-            DataResourceModel persistedCopy = datacatalog.getResource(resourceId);
-            Assert.assertNotNull(persistedCopy);
-            Assert.assertTrue(persistedCopy.getDataReplicaLocations().size()==1);
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testUpdateDataResource(){
-        try {
-            dataResourceModel.setResourceId(UUID.randomUUID().toString());
-            boolean result = datacatalog.updateResource(dataResourceModel);
-            Assert.assertFalse(result);
-            datacatalog.publishResource(dataResourceModel);
-            dataResourceModel.setResourceName("updated-name");
-            datacatalog.updateResource(dataResourceModel);
-            dataResourceModel = datacatalog.getResource(dataResourceModel.getResourceId());
-            Assert.assertTrue(dataResourceModel.getResourceName().equals("updated-name"));
-            Assert.assertTrue(dataResourceModel.getResourceMetadata().size()==1);
-            dataResourceModel.getResourceMetadata().put("name2","name2");
-            datacatalog.updateResource(dataResourceModel);
-            dataResourceModel = datacatalog.getResource(dataResourceModel.getResourceId());
-            Assert.assertTrue(dataResourceModel.getResourceMetadata().size()==2);
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testPublishReplicaLocation(){
-        try {
-            String resourceId = datacatalog.publishResource(dataResourceModel);
-            replicaLocationModel.setResourceId(resourceId);
-            String replicaId = datacatalog.publishReplicaLocation(replicaLocationModel);
-            Assert.assertNotNull(replicaId);;
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testRemoveReplicaLocation(){
-        try {
-            String resourceId = datacatalog.publishResource(dataResourceModel);
-            replicaLocationModel.setResourceId(resourceId);
-            String replicaId = datacatalog.publishReplicaLocation(replicaLocationModel);
-            boolean result = datacatalog.removeReplicaLocation(replicaId);
-            Assert.assertTrue(result);
-            result = datacatalog.removeReplicaLocation(replicaLocationModel.getReplicaId());
-            Assert.assertFalse(result);
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testGetReplicaLocation(){
-        try {
-            String resourceId = datacatalog.publishResource(dataResourceModel);
-            replicaLocationModel.setResourceId(resourceId);
-            String replicaId = datacatalog.publishReplicaLocation(replicaLocationModel);
-            DataReplicaLocationModel persistedCopy = datacatalog.getReplicaLocation(replicaId);
-            Assert.assertNotNull(persistedCopy);
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testUpdateReplicaLocation(){
-        try {
-            String resourceId = datacatalog.publishResource(dataResourceModel);
-            replicaLocationModel.setResourceId(resourceId);
-            String replicaId = datacatalog.publishReplicaLocation(replicaLocationModel);
-            DataReplicaLocationModel persistedCopy = datacatalog.getReplicaLocation(replicaId);
-            persistedCopy.setReplicaDescription("updated-description");
-            datacatalog.updateReplicaLocation(persistedCopy);
-            persistedCopy = datacatalog.getReplicaLocation(replicaId);
-            Assert.assertTrue(persistedCopy.getReplicaDescription().equals("updated-description"));
-            Assert.assertEquals(persistedCopy.getReplicaLocationCategory(), replicaLocationModel.getReplicaLocationCategory());
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testGetAllReplicaLocations(){
-        try {
-            String resourceId = datacatalog.publishResource(dataResourceModel);
-            replicaLocationModel.setResourceId(resourceId);
-            datacatalog.publishReplicaLocation(replicaLocationModel);
-            List<DataReplicaLocationModel> replicaLocationModelList = datacatalog.getAllReplicaLocations(resourceId);
-            Assert.assertNotNull(replicaLocationModelList.get(0).getReplicaId());
-        } catch (DataCatalogException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-}
\ No newline at end of file


[6/8] airavata git commit: adding gatewayId to the replica catalog

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java
index 23d19a9..1342b1e 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class JobStatusChangeEvent implements org.apache.thrift.TBase<JobStatusChangeEvent, JobStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<JobStatusChangeEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobStatusChangeEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java
index af7535d..bf5ea76 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class JobStatusChangeRequestEvent implements org.apache.thrift.TBase<JobStatusChangeRequestEvent, JobStatusChangeRequestEvent._Fields>, java.io.Serializable, Cloneable, Comparable<JobStatusChangeRequestEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobStatusChangeRequestEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java
index 7ead003..b0a2b54 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class Message implements org.apache.thrift.TBase<Message, Message._Fields>, java.io.Serializable, Cloneable, Comparable<Message> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Message");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java
index 628a35d..55a4fdd 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ProcessIdentifier implements org.apache.thrift.TBase<ProcessIdentifier, ProcessIdentifier._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessIdentifier> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessIdentifier");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeEvent.java
index fa93918..ab67104 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ProcessStatusChangeEvent implements org.apache.thrift.TBase<ProcessStatusChangeEvent, ProcessStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessStatusChangeEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessStatusChangeEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeRequestEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeRequestEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeRequestEvent.java
index 629b42a..1d790ed 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeRequestEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessStatusChangeRequestEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ProcessStatusChangeRequestEvent implements org.apache.thrift.TBase<ProcessStatusChangeRequestEvent, ProcessStatusChangeRequestEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessStatusChangeRequestEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessStatusChangeRequestEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java
index 40a4acc..9e27d9a 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ProcessSubmitEvent implements org.apache.thrift.TBase<ProcessSubmitEvent, ProcessSubmitEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessSubmitEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessSubmitEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java
index b537cbb..e3e64b4 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ProcessTerminateEvent implements org.apache.thrift.TBase<ProcessTerminateEvent, ProcessTerminateEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessTerminateEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessTerminateEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java
index 462f40e..aafcabf 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class TaskIdentifier implements org.apache.thrift.TBase<TaskIdentifier, TaskIdentifier._Fields>, java.io.Serializable, Cloneable, Comparable<TaskIdentifier> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskIdentifier");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java
index cb61bb3..09c3f2b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class TaskOutputChangeEvent implements org.apache.thrift.TBase<TaskOutputChangeEvent, TaskOutputChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<TaskOutputChangeEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskOutputChangeEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java
index 06afabf..8421a57 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class TaskStatusChangeEvent implements org.apache.thrift.TBase<TaskStatusChangeEvent, TaskStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<TaskStatusChangeEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStatusChangeEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java
index f2b35ab..f4f20b3 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class TaskStatusChangeRequestEvent implements org.apache.thrift.TBase<TaskStatusChangeRequestEvent, TaskStatusChangeRequestEvent._Fields>, java.io.Serializable, Cloneable, Comparable<TaskStatusChangeRequestEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStatusChangeRequestEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
index 4866a2c..b199503 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * 
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, ProcessModel._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
index 0586c4f..4e48db5 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  * 
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ComputationalResourceSchedulingModel implements org.apache.thrift.TBase<ComputationalResourceSchedulingModel, ComputationalResourceSchedulingModel._Fields>, java.io.Serializable, Cloneable, Comparable<ComputationalResourceSchedulingModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputationalResourceSchedulingModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java
index db17d96..d2bee5d 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class AuthzToken implements org.apache.thrift.TBase<AuthzToken, AuthzToken._Fields>, java.io.Serializable, Cloneable, Comparable<AuthzToken> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthzToken");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java
index 50d1557..20442cb 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java
@@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory;
  *   User friendly reason on how the state is inferred.
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ExperimentStatus implements org.apache.thrift.TBase<ExperimentStatus, ExperimentStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentStatus> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentStatus");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java
index acd0bd4..3f6d41b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class JobStatus implements org.apache.thrift.TBase<JobStatus, JobStatus._Fields>, java.io.Serializable, Cloneable, Comparable<JobStatus> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobStatus");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java
index 339ed60..7420bc0 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ProcessStatus implements org.apache.thrift.TBase<ProcessStatus, ProcessStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessStatus> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessStatus");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java
index f93862d..676960f 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class TaskStatus implements org.apache.thrift.TBase<TaskStatus, TaskStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TaskStatus> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStatus");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java
index 822ed2f..6a30988 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class DataStagingTaskModel implements org.apache.thrift.TBase<DataStagingTaskModel, DataStagingTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<DataStagingTaskModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataStagingTaskModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java
index 657aa43..6e58e5e 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java
@@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory;
  * EnvironmentSetupTaskModel: A structure holding the environment creation task details
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class EnvironmentSetupTaskModel implements org.apache.thrift.TBase<EnvironmentSetupTaskModel, EnvironmentSetupTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<EnvironmentSetupTaskModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EnvironmentSetupTaskModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java
index a515903..3c2d9f9 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class JobSubmissionTaskModel implements org.apache.thrift.TBase<JobSubmissionTaskModel, JobSubmissionTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<JobSubmissionTaskModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobSubmissionTaskModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java
index 32965b9..62a75c1 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class MonitorTaskModel implements org.apache.thrift.TBase<MonitorTaskModel, MonitorTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<MonitorTaskModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MonitorTaskModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java
index 0f52b7e..fc0a33b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * subTaskModel:
  *   A generic byte object for the Task developer to store internal serialized data into registry catalogs.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<TaskModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
index 7d5f653..a2ccd93 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields>, java.io.Serializable, Cloneable, Comparable<Gateway> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Gateway");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java
index 2b26f68..000c3d5 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class Group implements org.apache.thrift.TBase<Group, Group._Fields>, java.io.Serializable, Cloneable, Comparable<Group> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Group");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java
index bb7d898..039dd86 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class Project implements org.apache.thrift.TBase<Project, Project._Fields>, java.io.Serializable, Cloneable, Comparable<Project> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Project");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java
index 6d290b7..c268450 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/pom.xml
----------------------------------------------------------------------
diff --git a/modules/data-manager/pom.xml b/modules/data-manager/pom.xml
deleted file mode 100644
index 205fe58..0000000
--- a/modules/data-manager/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>airavata</artifactId>
-        <groupId>org.apache.airavata</groupId>
-        <version>0.16-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>data-manager</artifactId>
-    <packaging>jar</packaging>
-    <name>Airavata Data Manager</name>
-    <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-data-models</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-cpi</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-commons</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-server-configuration</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.7</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManager.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManager.java b/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManager.java
deleted file mode 100644
index fe287b8..0000000
--- a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManager.java
+++ /dev/null
@@ -1,99 +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.data.manager;
-
-import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
-import org.apache.airavata.model.data.resource.DataResourceModel;
-import org.apache.airavata.registry.cpi.DataCatalogException;
-
-import java.util.List;
-
-public interface DataManager {
-
-    /**
-     * To create a new dataResourceModel. This is how the system comes to know about already
-     * existing resources
-     * @param dataResourceModel
-     * @return
-     */
-    String publishResource(DataResourceModel dataResourceModel) throws DataManagerException;
-
-    /**
-     * To remove a resource entry from the replica catalog
-     * @param resourceId
-     * @return
-     */
-    boolean removeResource(String resourceId) throws DataManagerException;
-
-
-    /**
-     * To update an existing data resource model
-     * @param dataResourceModel
-     * @return
-     * @throws DataManagerException
-     */
-    boolean updateResource(DataResourceModel dataResourceModel) throws DataManagerException;
-
-    /**
-     * To retrieve a resource object providing the resourceId
-     * @param resourceId
-     * @return
-     */
-    DataResourceModel getResource(String resourceId) throws DataManagerException;
-
-    /**
-     * To create a new data replica location. This is how the system comes to know about already
-     * existing resources
-     * @param dataReplicaLocationModel
-     * @return
-     */
-    String publishReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataManagerException;
-
-    /**
-     * To remove a replica entry from the replica catalog
-     * @param replicaId
-     * @return
-     */
-    boolean removeReplicaLocation(String replicaId) throws DataManagerException;
-
-    /**
-     * To update an existing data replica model
-     * @param dataReplicaLocationModel
-     * @return
-     * @throws DataManagerException
-     */
-    boolean updateReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataManagerException;
-
-    /**
-     * To retrieve a replica object providing the replicaId
-     * @param replicaId
-     * @return
-     */
-    DataReplicaLocationModel getReplicaLocation(String replicaId) throws DataManagerException;
-
-    /**
-     * To retrieve all the replica entries for a given resource id
-     * @param resourceId
-     * @return
-     * @throws DataCatalogException
-     */
-    List<DataReplicaLocationModel> getAllReplicaLocations(String resourceId) throws DataManagerException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerConstants.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerConstants.java b/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerConstants.java
deleted file mode 100644
index 2aeb15b..0000000
--- a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerConstants.java
+++ /dev/null
@@ -1,28 +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.data.manager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DataManagerConstants {
-    private final static Logger logger = LoggerFactory.getLogger(DataManagerConstants.class);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerException.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerException.java b/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerException.java
deleted file mode 100644
index 36a1a13..0000000
--- a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerException.java
+++ /dev/null
@@ -1,35 +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.data.manager;
-
-public class DataManagerException extends Exception{
-
-    public DataManagerException(Throwable e) {
-        super(e);
-    }
-
-    public DataManagerException(String message) {
-        super(message, null);
-    }
-
-    public DataManagerException(String message, Throwable e) {
-        super(message, e);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerFactory.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerFactory.java b/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerFactory.java
deleted file mode 100644
index 94de8a9..0000000
--- a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerFactory.java
+++ /dev/null
@@ -1,32 +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.data.manager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DataManagerFactory {
-    private final static Logger logger = LoggerFactory.getLogger(DataManagerFactory.class);
-
-    public static DataManager getDataManager() throws DataManagerException {
-        return new DataManagerImpl();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerImpl.java b/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerImpl.java
deleted file mode 100644
index 4ce520b..0000000
--- a/modules/data-manager/src/main/java/org/apache/airavata/data/manager/DataManagerImpl.java
+++ /dev/null
@@ -1,204 +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.data.manager;
-
-import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
-import org.apache.airavata.model.data.resource.DataResourceModel;
-import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.DataCatalog;
-import org.apache.airavata.registry.cpi.DataCatalogException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class DataManagerImpl implements DataManager{
-    private final static Logger logger = LoggerFactory.getLogger(DataManagerImpl.class);
-
-    private final DataCatalog dataCatalog;
-
-    public DataManagerImpl() throws DataManagerException {
-        try {
-            this.dataCatalog = RegistryFactory.getDataCatalog();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    public DataManagerImpl(DataCatalog dataCatalog){
-        this.dataCatalog = dataCatalog;
-    }
-
-    /**
-     * To create a replica entry for an already existing file(s). This is how the system comes to know about already
-     * existing resources
-     * @param dataResourceModel
-     * @return
-     */
-    @Override
-    public String publishResource(DataResourceModel dataResourceModel) throws DataManagerException{
-        try {
-            String resourceId = dataCatalog.publishResource(dataResourceModel);
-            return resourceId;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    /**
-     * To remove a resource entry from the replica catalog
-     * @param resourceId
-     * @return
-     */
-    @Override
-    public boolean removeResource(String resourceId) throws DataManagerException {
-        try {
-            boolean result = dataCatalog.removeResource(resourceId);
-            return result;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    /**
-     * To update an existing data resource model
-     * @param dataResourceModel
-     * @return
-     * @throws DataManagerException
-     */
-    @Override
-    public boolean updateResource(DataResourceModel dataResourceModel) throws DataManagerException {
-        try {
-            boolean result = dataCatalog.updateResource(dataResourceModel);
-            return result;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    /**
-     * To retrieve a resource object providing the resourceId
-     * @param resourceId
-     * @return
-     */
-    @Override
-    public DataResourceModel getResource(String resourceId) throws DataManagerException {
-        try {
-            DataResourceModel dataResource = dataCatalog.getResource(resourceId);
-            return dataResource;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    /**
-     * To create a new data replica location. This is how the system comes to know about already
-     * existing resources
-     *
-     * @param dataReplicaLocationModel
-     * @return
-     */
-    @Override
-    public String publishReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataManagerException {
-        try {
-            String replicaId = dataCatalog.publishReplicaLocation(dataReplicaLocationModel);
-            return replicaId;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    /**
-     * To remove a replica entry from the replica catalog
-     *
-     * @param replicaId
-     * @return
-     */
-    @Override
-    public boolean removeReplicaLocation(String replicaId) throws DataManagerException {
-        try {
-            boolean result = dataCatalog.removeReplicaLocation(replicaId);
-            return result;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    /**
-     * To update an existing data replica model
-     *
-     * @param dataReplicaLocationModel
-     * @return
-     * @throws DataManagerException
-     */
-    @Override
-    public boolean updateReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataManagerException {
-        try {
-            boolean result = dataCatalog.updateReplicaLocation(dataReplicaLocationModel);
-            return result;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    /**
-     * To retrieve a replica object providing the replicaId
-     *
-     * @param replicaId
-     * @return
-     */
-    @Override
-    public DataReplicaLocationModel getReplicaLocation(String replicaId) throws DataManagerException {
-        try {
-            DataReplicaLocationModel dataReplicaLocationModel = dataCatalog.getReplicaLocation(replicaId);
-            return dataReplicaLocationModel;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-
-    /**
-     * To retrieve all the replica entries for a given resource id
-     *
-     * @param resourceId
-     * @return
-     * @throws DataCatalogException
-     */
-    @Override
-    public List<DataReplicaLocationModel> getAllReplicaLocations(String resourceId) throws DataManagerException {
-        try {
-            List<DataReplicaLocationModel> dataReplicaLocationModelList = dataCatalog.getAllReplicaLocations(resourceId);
-            return dataReplicaLocationModelList;
-        } catch (DataCatalogException e) {
-            logger.error(e.getMessage(), e);
-            throw new DataManagerException(e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/test/java/org/apache/airavata/data/manager/DataManagerFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/test/java/org/apache/airavata/data/manager/DataManagerFactoryTest.java b/modules/data-manager/src/test/java/org/apache/airavata/data/manager/DataManagerFactoryTest.java
deleted file mode 100644
index 3dca796..0000000
--- a/modules/data-manager/src/test/java/org/apache/airavata/data/manager/DataManagerFactoryTest.java
+++ /dev/null
@@ -1,40 +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.data.manager;
-
-import junit.framework.Assert;
-import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.DataCatalog;
-import org.apache.airavata.registry.cpi.DataCatalogException;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DataManagerFactoryTest {
-    private final static Logger logger = LoggerFactory.getLogger(DataManagerFactoryTest.class);
-
-    @Test
-    public void testCreateDataManager() throws DataManagerException, DataCatalogException {
-        DataCatalog dataCatalog = RegistryFactory.getDataCatalog();
-        DataManager dataManager = new DataManagerImpl(dataCatalog);
-        Assert.assertNotNull(dataManager);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/test/java/org/apache/airavata/data/manager/DataManagerImplTest.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/test/java/org/apache/airavata/data/manager/DataManagerImplTest.java b/modules/data-manager/src/test/java/org/apache/airavata/data/manager/DataManagerImplTest.java
deleted file mode 100644
index e853200..0000000
--- a/modules/data-manager/src/test/java/org/apache/airavata/data/manager/DataManagerImplTest.java
+++ /dev/null
@@ -1,207 +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.data.manager;
-
-import org.apache.airavata.data.manager.utils.AppCatInit;
-import org.apache.airavata.data.manager.utils.DataCatInit;
-import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
-import org.apache.airavata.model.data.resource.DataResourceModel;
-import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.DataCatalog;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-public class DataManagerImplTest {
-    private final static Logger logger = LoggerFactory.getLogger(DataManagerImplTest.class);
-    private static AppCatInit appCatInit;
-    private static DataCatInit dataCatInit;
-    private static DataManager dataManager;
-    private static DataResourceModel dataResourceModel;
-    private static DataReplicaLocationModel dataReplicaLocationModel;
-
-    @BeforeClass
-    public static void setUp() {
-        try {
-            System.out.println("********** SET UP ************");
-            appCatInit = new AppCatInit("appcatalog-derby.sql");
-            appCatInit.initializeDB();
-            dataCatInit = new DataCatInit("datacatalog-derby.sql");
-            dataCatInit.initializeDB();
-            DataCatalog dataCatalog = RegistryFactory.getDataCatalog();
-            dataManager = new DataManagerImpl(dataCatalog);
-            dataResourceModel = new DataResourceModel();
-            dataResourceModel.setResourceName("test-file.txt");
-            dataReplicaLocationModel = new DataReplicaLocationModel();
-            dataReplicaLocationModel.setReplicaName("1-st-replica");
-            ArrayList<String> dataLocations = new ArrayList<>();
-            dataLocations.add("scp://g75.iu.xsede.org:/var/www/portal/experimentData/test-file.txt");
-            dataReplicaLocationModel.setDataLocations(dataLocations);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-
-    @AfterClass
-    public static void tearDown() throws Exception {
-        System.out.println("********** TEAR DOWN ************");
-        dataCatInit.stopDerbyServer();
-    }
-
-    @Test
-    public void testPublishDataResource(){
-        try {
-            String resourceId = dataManager.publishResource(dataResourceModel);
-            org.junit.Assert.assertNotNull(resourceId);
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testRemoveDataResource(){
-        try {
-            boolean result = dataManager.removeResource("234234234");
-            Assert.assertFalse(result);
-            String resourceId = dataManager.publishResource(dataResourceModel);
-            Assert.assertNotNull(resourceId);
-            result = dataManager.removeResource(resourceId);
-            Assert.assertTrue(result);
-            result = dataManager.removeResource(resourceId);
-            Assert.assertFalse(result);
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testGetDataResource(){
-        try {
-            String resourceId = dataManager.publishResource(dataResourceModel);
-            Assert.assertNotNull(resourceId);
-            DataResourceModel persistedCopy = dataManager.getResource(resourceId);
-            Assert.assertNotNull(persistedCopy);
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testUpdateDataResource(){
-        try {
-            dataResourceModel.setResourceId(UUID.randomUUID().toString());
-            boolean result = dataManager.updateResource(dataResourceModel);
-            Assert.assertFalse(result);
-            dataManager.publishResource(dataResourceModel);
-            dataResourceModel.setResourceName("updated-name");
-            dataManager.updateResource(dataResourceModel);
-            dataResourceModel = dataManager.getResource(dataResourceModel.getResourceId());
-            Assert.assertTrue(dataResourceModel.getResourceName().equals("updated-name"));
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testPublishReplicaLocation(){
-        try {
-            String resourceId = dataManager.publishResource(dataResourceModel);
-            dataReplicaLocationModel.setResourceId(resourceId);
-            String replicaId = dataManager.publishReplicaLocation(dataReplicaLocationModel);
-            org.junit.Assert.assertNotNull(replicaId);
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testRemoveReplicaLocation(){
-        try {
-            String resourceId = dataManager.publishResource(dataResourceModel);
-            dataReplicaLocationModel.setResourceId(resourceId);
-            String replicaId = dataManager.publishReplicaLocation(dataReplicaLocationModel);
-            boolean result = dataManager.removeReplicaLocation(replicaId);
-            Assert.assertTrue(result);
-            result = dataManager.removeReplicaLocation(dataReplicaLocationModel.getReplicaId());
-            Assert.assertFalse(result);
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testGetReplicaLocation(){
-        try {
-            String resourceId = dataManager.publishResource(dataResourceModel);
-            dataReplicaLocationModel.setResourceId(resourceId);
-            String replicaId = dataManager.publishReplicaLocation(dataReplicaLocationModel);
-            DataReplicaLocationModel persistedCopy = dataManager.getReplicaLocation(replicaId);
-            Assert.assertNotNull(persistedCopy);
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testUpdateReplicaLocation(){
-        try {
-            String resourceId = dataManager.publishResource(dataResourceModel);
-            dataReplicaLocationModel.setResourceId(resourceId);
-            String replicaId = dataManager.publishReplicaLocation(dataReplicaLocationModel);
-            DataReplicaLocationModel persistedCopy = dataManager.getReplicaLocation(replicaId);
-            persistedCopy.setReplicaDescription("updated-description");
-            dataManager.updateReplicaLocation(persistedCopy);
-            persistedCopy = dataManager.getReplicaLocation(replicaId);
-            Assert.assertTrue(persistedCopy.getReplicaDescription().equals("updated-description"));
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void testGetAllReplicaLocations(){
-        try {
-            String resourceId = dataManager.publishResource(dataResourceModel);
-            dataReplicaLocationModel.setResourceId(resourceId);
-            String replicaId = dataManager.publishReplicaLocation(dataReplicaLocationModel);
-            List<DataReplicaLocationModel> replicaLocationModelList = dataManager.getAllReplicaLocations(resourceId);
-            Assert.assertTrue(replicaLocationModelList.get(0).getReplicaId().equals(replicaId));
-        } catch (DataManagerException e) {
-            e.printStackTrace();
-            Assert.fail();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/test/java/org/apache/airavata/data/manager/utils/AppCatInit.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/test/java/org/apache/airavata/data/manager/utils/AppCatInit.java b/modules/data-manager/src/test/java/org/apache/airavata/data/manager/utils/AppCatInit.java
deleted file mode 100644
index 2433b78..0000000
--- a/modules/data-manager/src/test/java/org/apache/airavata/data/manager/utils/AppCatInit.java
+++ /dev/null
@@ -1,320 +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.data.manager.utils;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.derby.drda.NetworkServerControl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.net.URI;
-import java.sql.*;
-import java.util.StringTokenizer;
-
-public class AppCatInit {
-    private static final Logger logger = LoggerFactory.getLogger(AppCatInit.class);
-    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
-    public  String scriptName = "appcatalog-derby.sql";
-    private NetworkServerControl server;
-    private static final String delimiter = ";";
-    public static final String COMPUTE_RESOURCE_TABLE = "COMPUTE_RESOURCE";
-    private String jdbcUrl = null;
-    private String jdbcDriver = null;
-    private String jdbcUser = null;
-    private String jdbcPassword = null;
-
-    public AppCatInit(String scriptName) {
-        this.scriptName = scriptName;
-    }
-
-    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
-        if (suffix.length() > buffer.length()) {
-            return false;
-        }
-        // this loop is done on purpose to avoid memory allocation performance
-        // problems on various JDKs
-        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
-        // implementation is ok though does allocation/copying
-        // StringBuffer.toString().endsWith() does massive memory
-        // allocation/copying on JDK 1.5
-        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
-        int endIndex = suffix.length() - 1;
-        int bufferIndex = buffer.length() - 1;
-        while (endIndex >= 0) {
-            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
-                return false;
-            }
-            bufferIndex--;
-            endIndex--;
-        }
-        return true;
-    }
-
-    private static boolean isServerStarted(NetworkServerControl server, int ntries)
-    {
-        for (int i = 1; i <= ntries; i ++)
-        {
-            try {
-                Thread.sleep(500);
-                server.ping();
-                return true;
-            }
-            catch (Exception e) {
-                if (i == ntries)
-                    return false;
-            }
-        }
-        return false;
-    }
-
-    public void initializeDB() {
-
-        try{
-            jdbcDriver = ServerSettings.getSetting("appcatalog.jdbc.driver");
-            jdbcUrl = ServerSettings.getSetting("appcatalog.jdbc.url");
-            jdbcUser = ServerSettings.getSetting("appcatalog.jdbc.user");
-            jdbcPassword = ServerSettings.getSetting("appcatalog.jdbc.password");
-            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read properties", e);
-        }
-
-        startDerbyInServerMode();
-        if(!isServerStarted(server, 20)){
-           throw new RuntimeException("Derby server cound not started within five seconds...");
-        }
-//      startDerbyInEmbeddedMode();
-
-        Connection conn = null;
-        try {
-            Class.forName(jdbcDriver).newInstance();
-            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
-            if (!isDatabaseStructureCreated(COMPUTE_RESOURCE_TABLE, conn)) {
-                executeSQLScript(conn);
-                logger.info("New Database created for App Catalog !!!");
-            } else {
-                logger.debug("Database already created for App Catalog!");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RuntimeException("Database failure", e);
-        } finally {
-            try {
-                if (conn != null){
-                    if (!conn.getAutoCommit()) {
-                        conn.commit();
-                    }
-                    conn.close();
-                }
-            } catch (SQLException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-    }
-
-    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
-        try {
-            System.out.println("Running a query to test the database tables existence.");
-            // check whether the tables are already created with a query
-            Statement statement = null;
-            try {
-                statement = conn.createStatement();
-                ResultSet rs = statement.executeQuery("select * from " + tableName);
-                if (rs != null) {
-                    rs.close();
-                }
-            } finally {
-                try {
-                    if (statement != null) {
-                        statement.close();
-                    }
-                } catch (SQLException e) {
-                    return false;
-                }
-            }
-        } catch (SQLException e) {
-            return false;
-        }
-
-        return true;
-    }
-
-    private void executeSQLScript(Connection conn) throws Exception {
-        StringBuffer sql = new StringBuffer();
-        BufferedReader reader = null;
-        try{
-
-        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
-        reader = new BufferedReader(new InputStreamReader(inputStream));
-        String line;
-        while ((line = reader.readLine()) != null) {
-            line = line.trim();
-            if (line.startsWith("//")) {
-                continue;
-            }
-            if (line.startsWith("--")) {
-                continue;
-            }
-            StringTokenizer st = new StringTokenizer(line);
-            if (st.hasMoreTokens()) {
-                String token = st.nextToken();
-                if ("REM".equalsIgnoreCase(token)) {
-                    continue;
-                }
-            }
-            sql.append(" ").append(line);
-
-            // SQL defines "--" as a comment to EOL
-            // and in Oracle it may contain a hint
-            // so we cannot just remove it, instead we must end it
-            if (line.indexOf("--") >= 0) {
-                sql.append("\n");
-            }
-            if ((checkStringBufferEndsWith(sql, delimiter))) {
-                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
-                sql.replace(0, sql.length(), "");
-            }
-        }
-        // Catch any statements not followed by ;
-        if (sql.length() > 0) {
-            executeSQL(sql.toString(), conn);
-        }
-        }catch (IOException e){
-            logger.error("Error occurred while executing SQL script for creating Airavata database", e);
-            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
-        }finally {
-            if (reader != null) {
-                reader.close();
-            }
-
-        }
-
-    }
-
-    private static void executeSQL(String sql, Connection conn) throws Exception {
-        // Check and ignore empty statements
-        if ("".equals(sql.trim())) {
-            return;
-        }
-
-        Statement statement = null;
-        try {
-            logger.debug("SQL : " + sql);
-
-            boolean ret;
-            int updateCount = 0, updateCountTotal = 0;
-            statement = conn.createStatement();
-            ret = statement.execute(sql);
-            updateCount = statement.getUpdateCount();
-            do {
-                if (!ret) {
-                    if (updateCount != -1) {
-                        updateCountTotal += updateCount;
-                    }
-                }
-                ret = statement.getMoreResults();
-                if (ret) {
-                    updateCount = statement.getUpdateCount();
-                }
-            } while (ret);
-
-            logger.debug(sql + " : " + updateCountTotal + " rows affected");
-
-            SQLWarning warning = conn.getWarnings();
-            while (warning != null) {
-                logger.warn(warning + " sql warning");
-                warning = warning.getNextWarning();
-            }
-            conn.clearWarnings();
-        } catch (SQLException e) {
-            if (e.getSQLState().equals("X0Y32")) {
-                // eliminating the table already exception for the derby
-                // database
-                logger.info("Table Already Exists", e);
-            } else {
-                throw new Exception("Error occurred while executing : " + sql, e);
-            }
-        } finally {
-            if (statement != null) {
-                try {
-                    statement.close();
-                } catch (SQLException e) {
-                    logger.error("Error occurred while closing result set.", e);
-                }
-            }
-        }
-    }
-
-    private void startDerbyInServerMode() {
-        try {
-            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
-            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
-                    20000,
-                    jdbcUser, jdbcPassword);
-            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
-            server.start(consoleWriter);
-        } catch (IOException e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        } catch (Exception e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        }
-
-    }
-
-    public static int getPort(String jdbcURL){
-        try{
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getPort();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return -1;
-        }
-    }
-
-    private void startDerbyInEmbeddedMode(){
-        try {
-            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
-            DriverManager.getConnection("jdbc:derby:memory:unit-testing-jpa;create=true").close();
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-
-    public void stopDerbyServer() {
-        try {
-            server.shutdown();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}


[5/8] airavata git commit: adding gatewayId to the replica catalog

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/test/java/org/apache/airavata/data/manager/utils/DataCatInit.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/test/java/org/apache/airavata/data/manager/utils/DataCatInit.java b/modules/data-manager/src/test/java/org/apache/airavata/data/manager/utils/DataCatInit.java
deleted file mode 100644
index 05165a2..0000000
--- a/modules/data-manager/src/test/java/org/apache/airavata/data/manager/utils/DataCatInit.java
+++ /dev/null
@@ -1,315 +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.data.manager.utils;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.registry.core.data.catalog.utils.DataCatalogConstants;
-import org.apache.derby.drda.NetworkServerControl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.net.URI;
-import java.sql.*;
-import java.util.StringTokenizer;
-
-public class DataCatInit {
-    private static final Logger logger = LoggerFactory.getLogger(DataCatInit.class);
-    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
-    public  String scriptName = "datacatalog-derby.sql";
-    private NetworkServerControl server;
-    private static final String delimiter = ";";
-    private String jdbcUrl = null;
-    private String jdbcDriver = null;
-    private String jdbcUser = null;
-    private String jdbcPassword = null;
-
-    public DataCatInit(String scriptName) {
-        this.scriptName = scriptName;
-    }
-
-    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
-        if (suffix.length() > buffer.length()) {
-            return false;
-        }
-        // this loop is done on purpose to avoid memory allocation performance
-        // problems on various JDKs
-        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
-        // implementation is ok though does allocation/copying
-        // StringBuffer.toString().endsWith() does massive memory
-        // allocation/copying on JDK 1.5
-        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
-        int endIndex = suffix.length() - 1;
-        int bufferIndex = buffer.length() - 1;
-        while (endIndex >= 0) {
-            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
-                return false;
-            }
-            bufferIndex--;
-            endIndex--;
-        }
-        return true;
-    }
-
-    private static boolean isServerStarted(NetworkServerControl server, int ntries)
-    {
-        for (int i = 1; i <= ntries; i ++)
-        {
-            try {
-                Thread.sleep(500);
-                server.ping();
-                return true;
-            }
-            catch (Exception e) {
-                if (i == ntries)
-                    return false;
-            }
-        }
-        return false;
-    }
-
-    public void initializeDB() {
-        try{
-            jdbcDriver = ServerSettings.getSetting("datacatalog.jdbc.driver");
-            jdbcUrl = ServerSettings.getSetting("datacatalog.jdbc.url");
-            jdbcUser = ServerSettings.getSetting("datacatalog.jdbc.user");
-            jdbcPassword = ServerSettings.getSetting("datacatalog.jdbc.password");
-            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read properties", e);
-        }
-
-        startDerbyInServerMode();
-        if(!isServerStarted(server, 20)){
-           throw new RuntimeException("Derby server could not started within five seconds...");
-        }
-        Connection conn = null;
-        try {
-            Class.forName(jdbcDriver).newInstance();
-            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
-            if (!isDatabaseStructureCreated(DataCatalogConstants.CONFIGURATION, conn)) {
-                executeSQLScript(conn);
-                logger.info("New Database created for Data Catalog !!!");
-            } else {
-                logger.debug("Database already created for Data Catalog!");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RuntimeException("Database failure", e);
-        } finally {
-            try {
-                if (conn != null){
-                    if (!conn.getAutoCommit()) {
-                        conn.commit();
-                    }
-                    conn.close();
-                }
-            } catch (SQLException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-    }
-
-    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
-        try {
-            System.out.println("Running a query to test the database tables existence.");
-            // check whether the tables are already created with a query
-            Statement statement = null;
-            try {
-                statement = conn.createStatement();
-                ResultSet rs = statement.executeQuery("select * from " + tableName);
-                if (rs != null) {
-                    rs.close();
-                }
-            } finally {
-                try {
-                    if (statement != null) {
-                        statement.close();
-                    }
-                } catch (SQLException e) {
-                    return false;
-                }
-            }
-        } catch (SQLException e) {
-            return false;
-        }
-
-        return true;
-    }
-
-    private void executeSQLScript(Connection conn) throws Exception {
-        StringBuffer sql = new StringBuffer();
-        BufferedReader reader = null;
-        try{
-
-        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
-        reader = new BufferedReader(new InputStreamReader(inputStream));
-        String line;
-        while ((line = reader.readLine()) != null) {
-            line = line.trim();
-            if (line.startsWith("//")) {
-                continue;
-            }
-            if (line.startsWith("--")) {
-                continue;
-            }
-            StringTokenizer st = new StringTokenizer(line);
-            if (st.hasMoreTokens()) {
-                String token = st.nextToken();
-                if ("REM".equalsIgnoreCase(token)) {
-                    continue;
-                }
-            }
-            sql.append(" ").append(line);
-
-            // SQL defines "--" as a comment to EOL
-            // and in Oracle it may contain a hint
-            // so we cannot just remove it, instead we must end it
-            if (line.indexOf("--") >= 0) {
-                sql.append("\n");
-            }
-            if ((checkStringBufferEndsWith(sql, delimiter))) {
-                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
-                sql.replace(0, sql.length(), "");
-            }
-        }
-        // Catch any statements not followed by ;
-        if (sql.length() > 0) {
-            executeSQL(sql.toString(), conn);
-        }
-        }catch (IOException e){
-            logger.error("Error occurred while executing SQL script for creating Airavata Data Catalog database", e);
-            throw new Exception("Error occurred while executing SQL script for creating Airavata Data Catalog database", e);
-        }finally {
-            if (reader != null) {
-                reader.close();
-            }
-        }
-    }
-
-    private static void executeSQL(String sql, Connection conn) throws Exception {
-        // Check and ignore empty statements
-        if ("".equals(sql.trim())) {
-            return;
-        }
-
-        Statement statement = null;
-        try {
-            logger.debug("SQL : " + sql);
-
-            boolean ret;
-            int updateCount = 0, updateCountTotal = 0;
-            statement = conn.createStatement();
-            ret = statement.execute(sql);
-            updateCount = statement.getUpdateCount();
-            do {
-                if (!ret) {
-                    if (updateCount != -1) {
-                        updateCountTotal += updateCount;
-                    }
-                }
-                ret = statement.getMoreResults();
-                if (ret) {
-                    updateCount = statement.getUpdateCount();
-                }
-            } while (ret);
-
-            logger.debug(sql + " : " + updateCountTotal + " rows affected");
-
-            SQLWarning warning = conn.getWarnings();
-            while (warning != null) {
-                logger.warn(warning + " sql warning");
-                warning = warning.getNextWarning();
-            }
-            conn.clearWarnings();
-        } catch (SQLException e) {
-            if (e.getSQLState().equals("X0Y32")) {
-                // eliminating the table already exception for the derby
-                // database
-                logger.info("Table Already Exists", e);
-            } else {
-                throw new Exception("Error occurred while executing : " + sql, e);
-            }
-        } finally {
-            if (statement != null) {
-                try {
-                    statement.close();
-                } catch (SQLException e) {
-                    logger.error("Error occurred while closing result set.", e);
-                }
-            }
-        }
-    }
-
-    private void startDerbyInServerMode() {
-        try {
-            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
-            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
-                    20000,
-                    jdbcUser, jdbcPassword);
-            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
-            server.start(consoleWriter);
-        } catch (IOException e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        } catch (Exception e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        }
-
-    }
-
-    public static int getPort(String jdbcURL){
-        try{
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getPort();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return -1;
-        }
-    }
-
-    private void startDerbyInEmbeddedMode(){
-        try {
-            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
-            DriverManager.getConnection("jdbc:derby:memory:unit-testing-jpa;create=true").close();
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-
-    public void stopDerbyServer() {
-        try {
-            server.shutdown();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/test/resources/id_rsa
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/test/resources/id_rsa b/modules/data-manager/src/test/resources/id_rsa
deleted file mode 100644
index 4527347..0000000
--- a/modules/data-manager/src/test/resources/id_rsa
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: AES-128-CBC,4882DC230357A4388E4A1690AB275C75
-
-/REcchTscfYjoYsJ8W6C1o0elvwpEpz/orX7+uoRTv0Iar9KxCOIg+Ms24cfO2Jn
-0PLHbB373XWTCtLMWojY0EgOJvQlzP3T4rzllGW/4nm+xhioxmxHY5nV3hi1JeFg
-H4BS9OJH1bfZvlLZiIgjmDQEKM2hMRjm2SXv9wrreZfiAgF1D7XfIYd15Tkaitzh
-bGkeAAFucC1Se3dw8aDvou5o9hLSyq/o6qg3WUcUMTSl8Cwh/8ubVjKpdonB0JO8
-hekvaeMkKCe4lh4ITsvQ09pyC3OpK+KzOVHbJeFZNGZ3uSNDnegG1I4AOpd+ypAt
-ZF5NZDQBW/LS85pghRS/LEjPJhW1M2Z05lpDWNpN4B2T51BomOvHKZKcuZk97V45
-1s/BI8I3sUsEyUqHumZXdSpnsSY10GfE+agY+0ltLRNtC+UMyDOZnQXepG7AZsAp
-xRlzuNvCt21oWdZPUuc8eHStAjzaxnbOlEG1AO1FMS11uXKSH8MfMSk0yYBUvQSv
-Ug5GZv9jkuSlHxBNGZqZU/xPNzkgixeRiBGyQAg75UcxXjTgQGawSL196baR3kS7
-66o+13Aq3hEtnUqePb1iD0XqxDKRdNe8oZiI+eTzjqNL6m0dWQeVLUO8nzRqR37S
-+/fpY/NQWkEubeRmunVq074rdjvZOk9oBXBTe5eMDhUbqM3yKN9GYx9MYDjAK06Y
-nvZmtl6So979JyGlAFXuc9YqxYiS/BGmOZ/iYLeSC0Bn566c0+nHydfnsxdZWicO
-YzvZrqte/LywJWZkcjHv9St8hCram346M9QTBDAp9id2RuQiIW0cx4PUOeEzN+AC
-AEQM5qIkqZYyx9z3eTZJIP/aT7bwQdRlZ7lJ8AIwX8AaLAwlDNDdwAjXojiPuqe3
-AWnfrWSHsdiojgoSxbmbDH8lZz110tk3TId2yjOZC5Fsy4eOW68/GQZMKeWD3ylT
-ajpNYZyYUlERUJDsFDoJA877lbaGii/D5vAU5HSZUnFJeiCXTGWfBlouG/GnNhrk
-I+sfajxagJBHTa1Gamo12h/0xUftxuWqp1Sh3uTInoGowmWYEazNw9FFm/fjT6Sr
-sYpw0UD77vPsziWqaZyLyvc0hVEyupnvKwz0B2IdvTHOgF//XEezjy3Ivu6c/cJs
-qt4z8WACX+yeepzyEkJ5aVluHUtjNG+EfkFhnhg9dGZ5pOVVck6M6fo4b8dw15NF
-e0OPgLU8hfwqUwalG3QVrlZjhdPlDk0rAKTDWiQuvozkLcrT862tYkxrKnAcMdZN
-uEgbbKkuF32csp9zbgJtGBf/yvI1BaomIN/ZSp02h0onlAYC4u/ybA/bjDEWy8Qv
-u1m9YKpQYQtXiY5bB3++FzVVOBpkjyBPd/S9m5apPw4FP5IECSszcGFz7ReAG2AY
-u4wTnDcL19tGn0k1Z03VVgESAh04SxVZBKzC6BtTEYwwYkP2HoG11XEEfIQ5JY7W
-IowHL1WcPx69C2TbGt3JGkIjPatXR67sFKGiRceJzTEjsoUbjaqsRJO8QZN6vq31
-8iuI0VFM8VAG4bTc10s/18QaPd3lpKIo/OIIxUJc+c5GrppcHib9CEaCD0qn7vEd
------END RSA PRIVATE KEY-----

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/test/resources/id_rsa.pub
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/test/resources/id_rsa.pub b/modules/data-manager/src/test/resources/id_rsa.pub
deleted file mode 100644
index c7eaaf3..0000000
--- a/modules/data-manager/src/test/resources/id_rsa.pub
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH5ggPJf0yYW39EEW2PsEojMLILZX/EvaMnghsj9/0HPY3C+DpFx5PAeYND4ITxZWnRjQmKsYN6Z7tL4wYbWfhMPUk8urKEB8ncdQK7tZZHdJuUmprfIi02LgeE2JmM13eimF2fEMRrCFqqMnCM63ihE/jzcyhwosRjlKfzYv5C23a8orGZh9g1V2LxjA7lkUyga7B/nsJBk75SA/uJZ4TcfeWS3okk2Pv8mKLmN23WKfAqvQadDkUphYPITa7MpdaUoVIDkUllzE82V6KQ4tXcbh1xSktv6k8sR9e7BsZSJVHFHoDitV9dcQGZIOdzmpNw2ZfmNW6IdrfrrVER7Cb supun@156-56-179-175.dhcp-bl.indiana.edu

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/data-manager/src/test/resources/known_hosts
----------------------------------------------------------------------
diff --git a/modules/data-manager/src/test/resources/known_hosts b/modules/data-manager/src/test/resources/known_hosts
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
deleted file mode 100644
index 3d4e753..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
+++ /dev/null
@@ -1,279 +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.registry.core.data.catalog.impl;
-
-import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
-import org.apache.airavata.model.data.resource.DataResourceModel;
-import org.apache.airavata.registry.core.data.catalog.model.DataReplicaLocation;
-import org.apache.airavata.registry.core.data.catalog.model.DataResource;
-import org.apache.airavata.registry.core.data.catalog.utils.DataCatalogJPAUtils;
-import org.apache.airavata.registry.core.data.catalog.utils.ThriftDataModelConversion;
-import org.apache.airavata.registry.cpi.DataCatalog;
-import org.apache.airavata.registry.cpi.DataCatalogException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.UUID;
-
-public class DataCatalogImpl implements DataCatalog {
-
-    private final static Logger logger = LoggerFactory.getLogger(DataCatalogImpl.class);
-
-    @Override
-    public String publishResource(DataResourceModel resourceModel) throws DataCatalogException {
-        String resourceId = UUID.randomUUID().toString();
-        resourceModel.setResourceId(resourceId);
-        if(resourceModel.getDataReplicaLocations() != null){
-            resourceModel.getDataReplicaLocations().stream().forEach(r-> {
-                r.setResourceId(resourceId);
-                r.setReplicaId(UUID.randomUUID().toString());
-            });
-        }
-        resourceModel.setCreationTime(System.currentTimeMillis());
-        resourceModel.setLastModifiedTime(System.currentTimeMillis());
-        DataResource dataResource = ThriftDataModelConversion.getDataResource(resourceModel);
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            em.getTransaction().begin();
-            em.persist(dataResource);
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceId;
-    }
-
-    @Override
-    public boolean removeResource(String resourceId) throws DataCatalogException {
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            DataResource dataResource = em.find(DataResource.class, resourceId);
-            if(dataResource == null)
-                return false;
-            em.getTransaction().begin();
-            em.remove(dataResource);
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return true;
-    }
-
-    @Override
-    public boolean updateResource(DataResourceModel resourceModel) throws DataCatalogException {
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            DataResource dataResource = em.find(DataResource.class, resourceModel.getResourceId());
-            if(dataResource == null)
-                return false;
-            em.getTransaction().begin();
-            resourceModel.setCreationTime(dataResource.getCreationTime().getTime());
-            resourceModel.setLastModifiedTime(System.currentTimeMillis());
-            em.merge(ThriftDataModelConversion.getUpdatedDataResource(resourceModel, dataResource));
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return true;
-    }
-
-    @Override
-    public DataResourceModel getResource(String resourceId) throws DataCatalogException  {
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            DataResource dataResource = em.find(DataResource.class, resourceId);
-            return ThriftDataModelConversion.getDataResourceModel(dataResource);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    @Override
-    public String publishReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataCatalogException {
-        String replicaId = UUID.randomUUID().toString();
-        dataReplicaLocationModel.setReplicaId(replicaId);
-        dataReplicaLocationModel.setCreationTime(System.currentTimeMillis());
-        dataReplicaLocationModel.setLastModifiedTime(System.currentTimeMillis());
-        DataReplicaLocation replicaLocation = ThriftDataModelConversion.getDataReplicaLocation(dataReplicaLocationModel);
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            em.getTransaction().begin();
-            em.persist(replicaLocation);
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return replicaId;
-    }
-
-    @Override
-    public boolean removeReplicaLocation(String replicaId) throws DataCatalogException {
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            DataReplicaLocation replicaLocation = em.find(DataReplicaLocation.class, replicaId);
-            if(replicaLocation == null)
-                return false;
-            em.getTransaction().begin();
-            em.remove(replicaLocation);
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return true;
-    }
-
-    @Override
-    public boolean updateReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws DataCatalogException {
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            DataReplicaLocation dataReplicaLocation = em.find(DataReplicaLocation.class, dataReplicaLocationModel.getReplicaId());
-            if(dataReplicaLocation == null)
-                return false;
-            em.getTransaction().begin();
-            dataReplicaLocationModel.setCreationTime(dataReplicaLocation.getCreationTime().getTime());
-            dataReplicaLocationModel.setLastModifiedTime(System.currentTimeMillis());
-            em.merge(ThriftDataModelConversion.getUpdatedDataReplicaLocation(dataReplicaLocationModel, dataReplicaLocation));
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return true;
-    }
-
-    @Override
-    public DataReplicaLocationModel getReplicaLocation(String replicaId) throws DataCatalogException {
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            DataReplicaLocation replicaLocation = em.find(DataReplicaLocation.class, replicaId);
-            return ThriftDataModelConversion.getDataReplicaLocationModel(replicaLocation);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    @Override
-    public List<DataReplicaLocationModel> getAllReplicaLocations(String resourceId) throws DataCatalogException {
-        EntityManager em = null;
-        try {
-            em = DataCatalogJPAUtils.getEntityManager();
-            DataResource dataResource = em.find(DataResource.class, resourceId);
-            if(dataResource == null)
-                return null;
-            ArrayList<DataReplicaLocationModel> dataReplicaLocationModels = new ArrayList<>();
-            dataResource.getDataReplicaLocations().stream().forEach(rl->dataReplicaLocationModels
-                    .add(ThriftDataModelConversion.getDataReplicaLocationModel(rl)));
-            return dataReplicaLocationModels;
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new DataCatalogException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()) {
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/Configuration.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/Configuration.java
deleted file mode 100644
index e4ad0ec..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/Configuration.java
+++ /dev/null
@@ -1,55 +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.registry.core.data.catalog.model;
-
-import org.apache.airavata.registry.core.app.catalog.model.Configuration_PK;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@Entity
-@Table(name ="CONFIGURATION")
-@IdClass(Configuration_PK.class)
-public class Configuration implements Serializable {
-    @Id
-    @Column(name = "CONFIG_KEY")
-    private String config_key;
-
-    @Id
-    @Column(name = "CONFIG_VAL")
-    private String config_val;
-
-    public String getConfig_key() {
-        return config_key;
-    }
-
-    public String getConfig_val() {
-        return config_val;
-    }
-
-    public void setConfig_key(String config_key) {
-        this.config_key = config_key;
-    }
-
-    public void setConfig_val(String config_val) {
-        this.config_val = config_val;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaLocation.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaLocation.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaLocation.java
deleted file mode 100644
index 65b5a0f..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaLocation.java
+++ /dev/null
@@ -1,147 +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.registry.core.data.catalog.model;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.sql.Timestamp;
-import java.util.Collection;
-
-@Entity
-@Table(name = "DATA_REPLICA_LOCATION")
-public class DataReplicaLocation {
-    private final static Logger logger = LoggerFactory.getLogger(DataReplicaLocation.class);
-    private String replicaId;
-    private String resourceId;
-    private String replicaName;
-    private String replicaDescription;
-    private String dataLocations;
-    private String replicaLocationCategory;
-    private String replicaPersistentType;
-    private Timestamp creationTime;
-    private Timestamp lastModifiedTime;
-
-    private DataResource dataResource;
-    private Collection<DataReplicaMetaData> dataReplicaMetaData;
-
-    @Id
-    @Column(name = "REPLICA_ID")
-    public String getReplicaId() {
-        return replicaId;
-    }
-
-    public void setReplicaId(String replicaId) {
-        this.replicaId = replicaId;
-    }
-
-    @Column(name = "RESOURCE_ID")
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    @Column(name = "DATA_LOCATIONS")
-    public String getDataLocations() {
-        return dataLocations;
-    }
-
-    public void setDataLocations(String dataLocations) {
-        this.dataLocations = dataLocations;
-    }
-
-    @Column(name = "REPLICA_NAME")
-    public String getReplicaName() {
-        return replicaName;
-    }
-
-    public void setReplicaName(String replicaName) {
-        this.replicaName = replicaName;
-    }
-
-    @Column(name = "REPLICA_DESCRIPTION")
-    public String getReplicaDescription() {
-        return replicaDescription;
-    }
-
-    public void setReplicaDescription(String replicaDescription) {
-        this.replicaDescription = replicaDescription;
-    }
-
-    @Column(name = "CREATION_TIME")
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    @Column(name = "LAST_MODIFIED_TIME")
-    public Timestamp getLastModifiedTime() {
-        return lastModifiedTime;
-    }
-
-    public void setLastModifiedTime(Timestamp lastModifiedTime) {
-        this.lastModifiedTime = lastModifiedTime;
-    }
-
-    @Column(name = "REPLICA_LOCATION_CATEGORY")
-    public String getReplicaLocationCategory() {
-        return replicaLocationCategory;
-    }
-
-    public void setReplicaLocationCategory(String replicaLocationCategory) {
-        this.replicaLocationCategory = replicaLocationCategory;
-    }
-
-    @Column(name = "REPLICA_PERSISTENT_TYPE")
-    public String getReplicaPersistentType() {
-        return replicaPersistentType;
-    }
-
-    public void setReplicaPersistentType(String replicaPersistentType) {
-        this.replicaPersistentType = replicaPersistentType;
-    }
-
-    @ManyToOne
-    @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "RESOURCE_ID")
-    public DataResource getDataResource() {
-        return dataResource;
-    }
-
-    public void setDataResource(DataResource dataResource) {
-        this.dataResource = dataResource;
-    }
-
-    @OneToMany(mappedBy = "dataReplicaLocation", cascade = {CascadeType.ALL})
-    public Collection<DataReplicaMetaData> getDataReplicaMetaData() {
-        return dataReplicaMetaData;
-    }
-
-    public void setDataReplicaMetaData(Collection<DataReplicaMetaData> dataReplicaMetaData) {
-        this.dataReplicaMetaData = dataReplicaMetaData;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaMetaData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaMetaData.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaMetaData.java
deleted file mode 100644
index e9a2203..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaMetaData.java
+++ /dev/null
@@ -1,77 +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.registry.core.data.catalog.model;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "DATA_REPLICA_METADATA")
-@IdClass(DataReplicaMetaData_PK.class)
-public class DataReplicaMetaData {
-    private final static Logger logger = LoggerFactory.getLogger(DataReplicaMetaData.class);
-    private String replicaId;
-    private String key;
-    private String value;
-
-    private DataReplicaLocation dataReplicaLocation;
-
-    @Id
-    @Column(name = "REPLICA_ID")
-    public String getReplicaId() {
-        return replicaId;
-    }
-
-    public void setReplicaId(String replicaId) {
-        this.replicaId = replicaId;
-    }
-
-    @Id
-    @Column(name = "METADATA_KEY")
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Column(name = "METADATA_VALUE")
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    @ManyToOne
-    @JoinColumn(name = "REPLICA_ID", referencedColumnName = "REPLICA_ID")
-    public DataReplicaLocation getDataReplicaLocation() {
-        return dataReplicaLocation;
-    }
-
-    public void setDataReplicaLocation(DataReplicaLocation dataReplicaLocation) {
-        this.dataReplicaLocation = dataReplicaLocation;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaMetaData_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaMetaData_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaMetaData_PK.java
deleted file mode 100644
index 617cc41..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataReplicaMetaData_PK.java
+++ /dev/null
@@ -1,59 +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.registry.core.data.catalog.model;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Serializable;
-
-public class DataReplicaMetaData_PK implements Serializable {
-    private final static Logger logger = LoggerFactory.getLogger(DataReplicaMetaData_PK.class);
-
-    private String replicaId;
-    private String key;
-
-    public String getReplicaId() {
-        return replicaId;
-    }
-
-    public void setReplicaId(String replicaId) {
-        this.replicaId = replicaId;
-    }
-
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResource.java
deleted file mode 100644
index 1e33d78..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResource.java
+++ /dev/null
@@ -1,126 +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.registry.core.data.catalog.model;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.sql.Timestamp;
-import java.util.Collection;
-
-@Entity
-@Table(name = "DATA_RESOURCE")
-public class DataResource {
-    private final static Logger logger = LoggerFactory.getLogger(DataResource.class);
-    private String resourceId;
-    private String resourceName;
-    private String resourceDescription;
-    private String ownerName;
-    private int resourceSize;
-    private Timestamp creationTime;
-    private Timestamp lastModifiedTime;
-
-    private Collection<DataReplicaLocation> dataReplicaLocations;
-    private Collection<DataResourceMetaData> dataResourceMetaData;
-
-    @Id
-    @Column(name = "RESOURCE_ID")
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    @Column(name = "RESOURCE_NAME")
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public void setResourceName(String resourceName) {
-        this.resourceName = resourceName;
-    }
-
-    @Column(name = "RESOURCE_DESCRIPTION")
-    public String getResourceDescription() {
-        return resourceDescription;
-    }
-
-    public void setResourceDescription(String resourceDescription) {
-        this.resourceDescription = resourceDescription;
-    }
-
-    @Column(name = "OWNER_NAME")
-    public String getOwnerName() {
-        return ownerName;
-    }
-
-    public void setOwnerName(String ownerName) {
-        this.ownerName = ownerName;
-    }
-
-    @Column(name = "RESOURCE_SIZE")
-    public int getResourceSize() {
-        return resourceSize;
-    }
-
-    public void setResourceSize(int resourceSize) {
-        this.resourceSize = resourceSize;
-    }
-
-    @Column(name = "CREATION_TIME")
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    @Column(name = "LAST_MODIFIED_TIME")
-    public Timestamp getLastModifiedTime() {
-        return lastModifiedTime;
-    }
-
-    public void setLastModifiedTime(Timestamp lastModifiedTime) {
-        this.lastModifiedTime = lastModifiedTime;
-    }
-
-    @OneToMany(mappedBy = "dataResource", cascade = {CascadeType.ALL})
-    public Collection<DataReplicaLocation> getDataReplicaLocations() {
-        return dataReplicaLocations;
-    }
-
-    public void setDataReplicaLocations(Collection<DataReplicaLocation> dataReplicaLocations) {
-        this.dataReplicaLocations = dataReplicaLocations;
-    }
-
-    @OneToMany(mappedBy = "dataResource", cascade = {CascadeType.ALL})
-    public Collection<DataResourceMetaData> getDataResourceMetaData() {
-        return dataResourceMetaData;
-    }
-
-    public void setDataResourceMetaData(Collection<DataResourceMetaData> dataResourceMetaData) {
-        this.dataResourceMetaData = dataResourceMetaData;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResourceMetaData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResourceMetaData.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResourceMetaData.java
deleted file mode 100644
index ca37b3d..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResourceMetaData.java
+++ /dev/null
@@ -1,80 +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.registry.core.data.catalog.model;
-
-import org.apache.airavata.registry.core.app.catalog.model.AppEnvironment_PK;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.sql.Timestamp;
-import java.util.Collection;
-
-@Entity
-@Table(name = "DATA_RESOURCE_METADATA")
-@IdClass(DataResourceMetaData_PK.class)
-public class DataResourceMetaData {
-    private final static Logger logger = LoggerFactory.getLogger(DataResourceMetaData.class);
-    private String resourceId;
-    private String key;
-    private String value;
-
-    private DataResource dataResource;
-
-    @Id
-    @Column(name = "RESOURCE_ID")
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    @Id
-    @Column(name = "METADATA_KEY")
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Column(name = "METADATA_VALUE")
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    @ManyToOne
-    @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "RESOURCE_ID")
-    public DataResource getDataResource() {
-        return dataResource;
-    }
-
-    public void setDataResource(DataResource dataResource) {
-        this.dataResource = dataResource;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResourceMetaData_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResourceMetaData_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResourceMetaData_PK.java
deleted file mode 100644
index 60545fe..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/model/DataResourceMetaData_PK.java
+++ /dev/null
@@ -1,59 +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.registry.core.data.catalog.model;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Serializable;
-
-public class DataResourceMetaData_PK implements Serializable {
-    private final static Logger logger = LoggerFactory.getLogger(DataResourceMetaData_PK.class);
-
-    private String resourceId;
-    private String key;
-
-    public String getResourceId() {
-        return resourceId;
-    }
-
-    public void setResourceId(String resourceId) {
-        this.resourceId = resourceId;
-    }
-
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogConstants.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogConstants.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogConstants.java
deleted file mode 100644
index c9e18f6..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogConstants.java
+++ /dev/null
@@ -1,49 +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.registry.core.data.catalog.utils;
-
-public class DataCatalogConstants {
-	// table names
-	public static final String DATA_RESOURCE = "DataResource";
-	public static final String DATA_REPLICA_LOCATION = "DataReplicaLocation";
-	public static final String CONFIGURATION = "Configuration";
-
-	// DataResource Table
-	public final class DataResourceConstants {
-		public static final String RESOURCE_ID = "resourceId";
-		public static final String RESOURCE_NAME = "resourceName";
-		public static final String RESOURCE_DESCRIPTION = "resourceDescription";
-		public static final String RESOURCE_SIZE = "resourceSize";
-        public static final String CREATION_TIME = "creationTime";
-        public static final String LAST_MODIFIED_TIME = "lastModifiedTime";
-	}
-
-	// Users table
-	public final class DataReplicaLocationConstants {
-        public static final String REPLICA_ID = "replicaId";
-        public static final String RESOURCE_ID = "resourceId";
-        public static final String DATA_LOCATIONS = "dataLocations";
-        public static final String REPLICA_NAME = "replicaName";
-        public static final String REPLICA_DESCRIPTION = "replicaDescription";
-        public static final String CREATION_TIME = "creationTime";
-        public static final String LAST_MODIFIED_TIME = "lastModifiedTime";
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogJPAUtils.java
deleted file mode 100644
index b8257cb..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogJPAUtils.java
+++ /dev/null
@@ -1,82 +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.registry.core.data.catalog.utils;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.util.HashMap;
-import java.util.Map;
-
-public class DataCatalogJPAUtils {
-    private final static Logger logger = LoggerFactory.getLogger(DataCatalogJPAUtils.class);
-
-    private static final String PERSISTENCE_UNIT_NAME = "datacatalog_data";
-    private static final String DATACATALOG_JDBC_DRIVER = "datacatalog.jdbc.driver";
-    private static final String DATACATALOG_JDBC_URL = "datacatalog.jdbc.url";
-    private static final String DATACATALOG_JDBC_USER = "datacatalog.jdbc.user";
-    private static final String DATACATALOG_JDBC_PWD = "datacatalog.jdbc.password";
-    private static final String DATACATALOG_VALIDATION_QUERY = "datacatalog.validationQuery";
-
-    @PersistenceUnit(unitName="datacatalog_data")
-    protected static EntityManagerFactory factory;
-
-    @PersistenceContext(unitName="datacatalog_data")
-    private static EntityManager dataCatEntityManager;
-
-    public static EntityManager getEntityManager() throws ApplicationSettingsException {
-        if (factory == null) {
-            String connectionProperties = "DriverClassName=" + readServerProperties(DATACATALOG_JDBC_DRIVER) + "," +
-                    "Url=" + readServerProperties(DATACATALOG_JDBC_URL) + "?autoReconnect=true," +
-                    "Username=" + readServerProperties(DATACATALOG_JDBC_USER) + "," +
-                    "Password=" + readServerProperties(DATACATALOG_JDBC_PWD) +
-                    ",validationQuery=" + readServerProperties(DATACATALOG_VALIDATION_QUERY);
-            System.out.println(connectionProperties);
-            Map<String, String> properties = new HashMap<String, String>();
-            properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
-            properties.put("openjpa.ConnectionProperties", connectionProperties);
-            properties.put("openjpa.DynamicEnhancementAgent", "true");
-            properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
-            properties.put("openjpa.RemoteCommitProvider","sjvm");
-            properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
-            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
-            properties.put("openjpa.jdbc.QuerySQLCache", "false");
-            properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
-                    " PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
-            factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
-        }
-        dataCatEntityManager = factory.createEntityManager();
-        return dataCatEntityManager;
-    }
-
-    private static String readServerProperties (String propertyName) throws ApplicationSettingsException {
-        try {
-            return ServerSettings.getSetting(propertyName);
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read airavata-server.properties...", e);
-            throw new ApplicationSettingsException("Unable to read airavata-server.properties...");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogQueryGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogQueryGenerator.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogQueryGenerator.java
deleted file mode 100644
index 4ddf8d3..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/DataCatalogQueryGenerator.java
+++ /dev/null
@@ -1,111 +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.registry.core.data.catalog.utils;
-
-import org.apache.airavata.registry.cpi.ResultOrderType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.util.HashMap;
-import java.util.Map;
-
-public class DataCatalogQueryGenerator {
-
-    private final static Logger logger = LoggerFactory.getLogger(DataCatalogQueryGenerator.class);
-	private String tableName;
-	private Map<String,Object> matches=new HashMap<String, Object>();
-	private static final String SELECT_OBJ="p";
-	private static final String DELETE_OBJ="p";
-	private static final String TABLE_OBJ="p";
-
-	public DataCatalogQueryGenerator(String tableName, Object[]... params) {
-		setTableName(tableName);
-		for (Object[] param : params) {
-			addMatch(param[0].toString(), param[1]);
-		}
-	}
-	
-	public String getTableName() {
-		return tableName;
-	}
-
-    public void setTableName(String tableName) {
-		this.tableName = tableName;
-	}
-
-    public void addMatch(String colName, Object matchValue){
-		matches.put(colName, matchValue);
-	}
-	
-	public void setParameter(String colName, Object matchValue){
-		addMatch(colName, matchValue);
-	}
-
-    public Query selectQuery(EntityManager entityManager){
-        String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
-        return generateQueryWithParameters(entityManager, queryString);
-    }
-
-    public Query selectQuery(EntityManager entityManager, String orderByColumn,
-                             ResultOrderType resultOrderType){
-        String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
-        String orderByClause = " ORDER BY " + SELECT_OBJ + "." + orderByColumn + " " + order;
-        String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
-        return generateQueryWithParameters(entityManager, queryString, orderByClause);
-    }
-
-	public Query deleteQuery(EntityManager entityManager){
-		String queryString="Delete FROM "+getTableName()+" "+TABLE_OBJ;
-		return generateQueryWithParameters(entityManager, queryString);
-	}
-
-	private Query generateQueryWithParameters(EntityManager entityManager, String queryString) {
-		return generateQueryWithParameters(entityManager, queryString, "");
-	}
-
-    private Query generateQueryWithParameters(EntityManager entityManager,
-                                              String queryString, String orderByClause) {
-        Map<String,Object> queryParameters=new HashMap<String, Object>();
-        if (matches.size()>0){
-            String matchString = "";
-            int paramCount=0;
-            for (String colName : matches.keySet()) {
-                String paramName="param"+paramCount;
-                queryParameters.put(paramName, matches.get(colName));
-                if (!matchString.equals("")){
-                    matchString+=" AND ";
-                }
-                matchString+=TABLE_OBJ+"."+colName+" =:"+paramName;
-                paramCount++;
-            }
-            queryString+=" WHERE "+matchString;
-        }
-        queryString += orderByClause;
-        Query query = entityManager.createQuery(queryString);
-        for (String paramName : queryParameters.keySet()) {
-            query.setParameter(paramName, queryParameters.get(paramName));
-        }
-        return query;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/ThriftDataModelConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/ThriftDataModelConversion.java
deleted file mode 100644
index 4edb047..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/utils/ThriftDataModelConversion.java
+++ /dev/null
@@ -1,186 +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.registry.core.data.catalog.utils;
-
-import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
-import org.apache.airavata.model.data.resource.DataResourceModel;
-import org.apache.airavata.model.data.resource.ReplicaLocationCategory;
-import org.apache.airavata.model.data.resource.ReplicaPersistentType;
-import org.apache.airavata.registry.core.data.catalog.model.DataReplicaLocation;
-import org.apache.airavata.registry.core.data.catalog.model.DataReplicaMetaData;
-import org.apache.airavata.registry.core.data.catalog.model.DataResource;
-import org.apache.airavata.registry.core.data.catalog.model.DataResourceMetaData;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-public class ThriftDataModelConversion {
-
-    private final static Logger logger = LoggerFactory.getLogger(ThriftDataModelConversion.class);
-
-    public static DataResourceModel getDataResourceModel(DataResource dataResource){
-        if (dataResource != null) {
-            DataResourceModel dataResourceModel = new DataResourceModel();
-            dataResourceModel.setResourceId(dataResource.getResourceId());
-            dataResourceModel.setResourceName(dataResource.getResourceName());
-            dataResourceModel.setResourceDescription(dataResource.getResourceDescription());
-            dataResourceModel.setOwnerName(dataResource.getOwnerName());
-            dataResourceModel.setResourceSize(dataResource.getResourceSize());
-            dataResourceModel.setCreationTime(dataResource.getCreationTime().getTime());
-            dataResourceModel.setLastModifiedTime(dataResource.getLastModifiedTime().getTime());
-            dataResourceModel.setResourceMetadata(getResourceMetaData(dataResource.getDataResourceMetaData()));
-            if(dataResource.getDataReplicaLocations() != null){
-                ArrayList<DataReplicaLocationModel> dataReplicaLocationModels = new ArrayList<>();
-                dataResource.getDataReplicaLocations().stream().forEach(r->dataReplicaLocationModels
-                        .add(getDataReplicaLocationModel(r)));
-                dataResourceModel.setDataReplicaLocations(dataReplicaLocationModels);
-            }
-            return dataResourceModel;
-        }
-        return null;
-    }
-
-    public static DataResource getDataResource(DataResourceModel dataResourceModel){
-        if(dataResourceModel != null){
-            DataResource dataResource = new DataResource();
-            return getUpdatedDataResource(dataResourceModel, dataResource);
-        }
-        return null;
-    }
-
-    public static DataResource getUpdatedDataResource(DataResourceModel dataResourceModel, DataResource dataResource){
-        dataResource.setResourceId(dataResourceModel.getResourceId());
-        dataResource.setResourceName(dataResourceModel.getResourceName());
-        dataResource.setResourceDescription(dataResourceModel.getResourceDescription());
-        dataResource.setOwnerName(dataResourceModel.getOwnerName());
-        dataResource.setResourceSize(dataResourceModel.getResourceSize());
-        dataResource.setCreationTime(new Timestamp(dataResourceModel.getCreationTime()));
-        dataResource.setLastModifiedTime(new Timestamp(dataResourceModel.getLastModifiedTime()));
-        ArrayList<DataResourceMetaData> dataResourceMetaData = new ArrayList<>();
-        if(dataResourceModel.getResourceMetadata() != null) {
-            dataResourceModel.getResourceMetadata().keySet().stream().forEach(k -> {
-                String v = dataResourceModel.getResourceMetadata().get(k);
-                DataResourceMetaData temp = new DataResourceMetaData();
-                temp.setResourceId(dataResource.getResourceId());
-                temp.setKey(k);
-                temp.setValue(v);
-                dataResourceMetaData.add(temp);
-            });
-            dataResource.setDataResourceMetaData(dataResourceMetaData);
-        }
-        if(dataResourceModel.getDataReplicaLocations() != null){
-            ArrayList<DataReplicaLocation> dataReplicaLocations = new ArrayList<>();
-            dataResourceModel.getDataReplicaLocations().stream().forEach(r->{
-                DataReplicaLocation dataReplicaLocationModel = getDataReplicaLocation(r);
-                dataReplicaLocationModel.setResourceId(dataResourceModel.getResourceId());
-                dataReplicaLocations.add(dataReplicaLocationModel);
-            });
-            dataResource.setDataReplicaLocations(dataReplicaLocations);
-        }
-        return dataResource;
-    }
-
-    public static DataReplicaLocationModel getDataReplicaLocationModel(DataReplicaLocation replicaLocation){
-        if (replicaLocation != null) {
-            DataReplicaLocationModel replicaLocationModel = new DataReplicaLocationModel();
-            replicaLocationModel.setReplicaId(replicaLocation.getReplicaId());
-            replicaLocationModel.setResourceId(replicaLocation.getResourceId());
-            replicaLocationModel.setReplicaName(replicaLocation.getReplicaName());
-            replicaLocationModel.setReplicaDescription(replicaLocation.getReplicaDescription());
-            replicaLocationModel.setCreationTime(replicaLocation.getCreationTime().getTime());
-            replicaLocationModel.setLastModifiedTime(replicaLocation.getLastModifiedTime().getTime());
-            if(replicaLocation.getReplicaLocationCategory() != null)
-                replicaLocationModel.setReplicaLocationCategory(ReplicaLocationCategory.valueOf(replicaLocation
-                    .getReplicaLocationCategory().toString()));
-            if(replicaLocation.getReplicaPersistentType() != null)
-                replicaLocationModel.setReplicaPersistentType(ReplicaPersistentType.valueOf(replicaLocation
-                    .getReplicaPersistentType().toString()));
-            if(replicaLocation.getDataLocations()!=null && !replicaLocation.getDataLocations().isEmpty()) {
-                String[] dataLocations = replicaLocation.getDataLocations().split(",");
-                for(String dataLocation : dataLocations){
-                    replicaLocationModel.addToDataLocations(dataLocation);
-                }
-            }
-            replicaLocationModel.setReplicaMetadata(getReplicaMetaData(replicaLocation.getDataReplicaMetaData()));
-            return replicaLocationModel;
-        }
-        return null;
-    }
-
-    public static DataReplicaLocation getDataReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel){
-        if(dataReplicaLocationModel != null){
-            DataReplicaLocation dataReplicaLocation = new DataReplicaLocation();
-            return getUpdatedDataReplicaLocation(dataReplicaLocationModel, dataReplicaLocation);
-        }
-        return null;
-    }
-
-    public static DataReplicaLocation getUpdatedDataReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel,
-                                                                    DataReplicaLocation dataReplicaLocation){
-        dataReplicaLocation.setReplicaId(dataReplicaLocationModel.getReplicaId());
-        dataReplicaLocation.setResourceId(dataReplicaLocationModel.getResourceId());
-        dataReplicaLocation.setReplicaName(dataReplicaLocationModel.getReplicaName());
-        dataReplicaLocation.setReplicaDescription(dataReplicaLocationModel.getReplicaDescription());
-        dataReplicaLocation.setDataLocations(StringUtils.join(dataReplicaLocationModel.getDataLocations(), ','));
-        dataReplicaLocation.setCreationTime(new Timestamp(dataReplicaLocationModel.getCreationTime()));
-        dataReplicaLocation.setLastModifiedTime(new Timestamp(dataReplicaLocationModel.getLastModifiedTime()));
-        if(dataReplicaLocationModel.getReplicaLocationCategory() != null)
-            dataReplicaLocation.setReplicaLocationCategory(dataReplicaLocationModel.getReplicaLocationCategory().toString());
-        if(dataReplicaLocationModel.getReplicaPersistentType() != null)
-            dataReplicaLocation.setReplicaPersistentType(dataReplicaLocationModel.getReplicaPersistentType().toString());
-        ArrayList<DataReplicaMetaData> dataReplicaMetadata = new ArrayList<>();
-        if(dataReplicaLocation.getDataReplicaMetaData() != null){
-            dataReplicaLocationModel.getReplicaMetadata().keySet().stream().forEach(k -> {
-                String v = dataReplicaLocationModel.getReplicaMetadata().get(k);
-                DataReplicaMetaData temp = new DataReplicaMetaData();
-                temp.setReplicaId(dataReplicaLocationModel.getResourceId());
-                temp.setKey(k);
-                temp.setValue(v);
-                dataReplicaMetadata.add(temp);
-            });
-            dataReplicaLocation.setDataReplicaMetaData(dataReplicaMetadata);
-        }
-        return dataReplicaLocation;
-    }
-
-    public static Map<String, String> getResourceMetaData(Collection<DataResourceMetaData> dataResourceMetaData){
-        HashMap<String, String> metadata = new HashMap<>();
-        if(dataResourceMetaData!=null && !dataResourceMetaData.isEmpty()) {
-            dataResourceMetaData.stream().forEach(m -> metadata.put(m.getKey(),m.getValue()));
-        }
-        return metadata;
-    }
-
-    public static Map<String, String> getReplicaMetaData(Collection<DataReplicaMetaData> dataReplicaMetaData){
-        HashMap<String, String> metadata = new HashMap<>();
-        if(dataReplicaMetaData!=null && !dataReplicaMetaData.isEmpty()) {
-            dataReplicaMetaData.stream().forEach(m -> metadata.put(m.getKey(),m.getValue()));
-        }
-        return metadata;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/RegistryFactory.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/RegistryFactory.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/RegistryFactory.java
index ac8ca97..400208f 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/RegistryFactory.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/RegistryFactory.java
@@ -24,7 +24,7 @@ package org.apache.airavata.registry.core.experiment.catalog.impl;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.registry.core.app.catalog.impl.AppCatalogImpl;
-import org.apache.airavata.registry.core.data.catalog.impl.DataCatalogImpl;
+import org.apache.airavata.registry.core.replica.catalog.impl.DataCatalogImpl;
 import org.apache.airavata.registry.core.impl.RegistryImpl;
 import org.apache.airavata.registry.cpi.*;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/impl/RegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/impl/RegistryImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/impl/RegistryImpl.java
index 5207fee..ea5663e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/impl/RegistryImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/impl/RegistryImpl.java
@@ -22,7 +22,7 @@
 package org.apache.airavata.registry.core.impl;
 
 import org.apache.airavata.registry.core.app.catalog.impl.AppCatalogImpl;
-import org.apache.airavata.registry.core.data.catalog.impl.DataCatalogImpl;
+import org.apache.airavata.registry.core.replica.catalog.impl.DataCatalogImpl;
 import org.apache.airavata.registry.core.experiment.catalog.impl.ExperimentCatalogImpl;
 import org.apache.airavata.registry.cpi.*;
 


[3/8] airavata git commit: adding gatewayId to the replica catalog

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/test/java/org/apache/airavata/data/catalog/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/test/java/org/apache/airavata/data/catalog/util/Initialize.java b/modules/registry/registry-core/src/test/java/org/apache/airavata/data/catalog/util/Initialize.java
deleted file mode 100644
index 002e51e..0000000
--- a/modules/registry/registry-core/src/test/java/org/apache/airavata/data/catalog/util/Initialize.java
+++ /dev/null
@@ -1,315 +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.data.catalog.util;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.registry.core.data.catalog.utils.DataCatalogConstants;
-import org.apache.derby.drda.NetworkServerControl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.net.URI;
-import java.sql.*;
-import java.util.StringTokenizer;
-
-public class Initialize {
-    private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
-    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
-    public  String scriptName = "datacatalog-derby.sql";
-    private NetworkServerControl server;
-    private static final String delimiter = ";";
-    private String jdbcUrl = null;
-    private String jdbcDriver = null;
-    private String jdbcUser = null;
-    private String jdbcPassword = null;
-
-    public Initialize(String scriptName) {
-        this.scriptName = scriptName;
-    }
-
-    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
-        if (suffix.length() > buffer.length()) {
-            return false;
-        }
-        // this loop is done on purpose to avoid memory allocation performance
-        // problems on various JDKs
-        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
-        // implementation is ok though does allocation/copying
-        // StringBuffer.toString().endsWith() does massive memory
-        // allocation/copying on JDK 1.5
-        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
-        int endIndex = suffix.length() - 1;
-        int bufferIndex = buffer.length() - 1;
-        while (endIndex >= 0) {
-            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
-                return false;
-            }
-            bufferIndex--;
-            endIndex--;
-        }
-        return true;
-    }
-
-    private static boolean isServerStarted(NetworkServerControl server, int ntries)
-    {
-        for (int i = 1; i <= ntries; i ++)
-        {
-            try {
-                Thread.sleep(500);
-                server.ping();
-                return true;
-            }
-            catch (Exception e) {
-                if (i == ntries)
-                    return false;
-            }
-        }
-        return false;
-    }
-
-    public void initializeDB() {
-        try{
-            jdbcDriver = ServerSettings.getSetting("datacatalog.jdbc.driver");
-            jdbcUrl = ServerSettings.getSetting("datacatalog.jdbc.url");
-            jdbcUser = ServerSettings.getSetting("datacatalog.jdbc.user");
-            jdbcPassword = ServerSettings.getSetting("datacatalog.jdbc.password");
-            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read properties", e);
-        }
-
-        startDerbyInServerMode();
-        if(!isServerStarted(server, 20)){
-           throw new RuntimeException("Derby server could not started within five seconds...");
-        }
-        Connection conn = null;
-        try {
-            Class.forName(jdbcDriver).newInstance();
-            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
-            if (!isDatabaseStructureCreated(DataCatalogConstants.CONFIGURATION, conn)) {
-                executeSQLScript(conn);
-                logger.info("New Database created for Data Catalog !!!");
-            } else {
-                logger.debug("Database already created for Data Catalog!");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RuntimeException("Database failure", e);
-        } finally {
-            try {
-                if (conn != null){
-                    if (!conn.getAutoCommit()) {
-                        conn.commit();
-                    }
-                    conn.close();
-                }
-            } catch (SQLException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-    }
-
-    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
-        try {
-            System.out.println("Running a query to test the database tables existence.");
-            // check whether the tables are already created with a query
-            Statement statement = null;
-            try {
-                statement = conn.createStatement();
-                ResultSet rs = statement.executeQuery("select * from " + tableName);
-                if (rs != null) {
-                    rs.close();
-                }
-            } finally {
-                try {
-                    if (statement != null) {
-                        statement.close();
-                    }
-                } catch (SQLException e) {
-                    return false;
-                }
-            }
-        } catch (SQLException e) {
-            return false;
-        }
-
-        return true;
-    }
-
-    private void executeSQLScript(Connection conn) throws Exception {
-        StringBuffer sql = new StringBuffer();
-        BufferedReader reader = null;
-        try{
-
-        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
-        reader = new BufferedReader(new InputStreamReader(inputStream));
-        String line;
-        while ((line = reader.readLine()) != null) {
-            line = line.trim();
-            if (line.startsWith("//")) {
-                continue;
-            }
-            if (line.startsWith("--")) {
-                continue;
-            }
-            StringTokenizer st = new StringTokenizer(line);
-            if (st.hasMoreTokens()) {
-                String token = st.nextToken();
-                if ("REM".equalsIgnoreCase(token)) {
-                    continue;
-                }
-            }
-            sql.append(" ").append(line);
-
-            // SQL defines "--" as a comment to EOL
-            // and in Oracle it may contain a hint
-            // so we cannot just remove it, instead we must end it
-            if (line.indexOf("--") >= 0) {
-                sql.append("\n");
-            }
-            if ((checkStringBufferEndsWith(sql, delimiter))) {
-                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
-                sql.replace(0, sql.length(), "");
-            }
-        }
-        // Catch any statements not followed by ;
-        if (sql.length() > 0) {
-            executeSQL(sql.toString(), conn);
-        }
-        }catch (IOException e){
-            logger.error("Error occurred while executing SQL script for creating Airavata Data Catalog database", e);
-            throw new Exception("Error occurred while executing SQL script for creating Airavata Data Catalog database", e);
-        }finally {
-            if (reader != null) {
-                reader.close();
-            }
-        }
-    }
-
-    private static void executeSQL(String sql, Connection conn) throws Exception {
-        // Check and ignore empty statements
-        if ("".equals(sql.trim())) {
-            return;
-        }
-
-        Statement statement = null;
-        try {
-            logger.debug("SQL : " + sql);
-
-            boolean ret;
-            int updateCount = 0, updateCountTotal = 0;
-            statement = conn.createStatement();
-            ret = statement.execute(sql);
-            updateCount = statement.getUpdateCount();
-            do {
-                if (!ret) {
-                    if (updateCount != -1) {
-                        updateCountTotal += updateCount;
-                    }
-                }
-                ret = statement.getMoreResults();
-                if (ret) {
-                    updateCount = statement.getUpdateCount();
-                }
-            } while (ret);
-
-            logger.debug(sql + " : " + updateCountTotal + " rows affected");
-
-            SQLWarning warning = conn.getWarnings();
-            while (warning != null) {
-                logger.warn(warning + " sql warning");
-                warning = warning.getNextWarning();
-            }
-            conn.clearWarnings();
-        } catch (SQLException e) {
-            if (e.getSQLState().equals("X0Y32")) {
-                // eliminating the table already exception for the derby
-                // database
-                logger.info("Table Already Exists", e);
-            } else {
-                throw new Exception("Error occurred while executing : " + sql, e);
-            }
-        } finally {
-            if (statement != null) {
-                try {
-                    statement.close();
-                } catch (SQLException e) {
-                    logger.error("Error occurred while closing result set.", e);
-                }
-            }
-        }
-    }
-
-    private void startDerbyInServerMode() {
-        try {
-            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
-            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
-                    20000,
-                    jdbcUser, jdbcPassword);
-            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
-            server.start(consoleWriter);
-        } catch (IOException e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        } catch (Exception e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        }
-
-    }
-
-    public static int getPort(String jdbcURL){
-        try{
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getPort();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return -1;
-        }
-    }
-
-    private void startDerbyInEmbeddedMode(){
-        try {
-            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
-            DriverManager.getConnection("jdbc:derby:memory:unit-testing-jpa;create=true").close();
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-
-    public void stopDerbyServer() {
-        try {
-            server.shutdown();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/DataCatalogTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/DataCatalogTest.java b/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/DataCatalogTest.java
new file mode 100644
index 0000000..80138a4
--- /dev/null
+++ b/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/DataCatalogTest.java
@@ -0,0 +1,221 @@
+/*
+ *
+ * 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.replica.catalog;
+
+import org.apache.airavata.replica.catalog.util.Initialize;
+import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
+import org.apache.airavata.model.data.resource.DataResourceModel;
+import org.apache.airavata.model.data.resource.ReplicaLocationCategory;
+import org.apache.airavata.model.data.resource.ReplicaPersistentType;
+import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.DataCatalog;
+import org.apache.airavata.registry.cpi.DataCatalogException;
+import org.junit.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.UUID;
+
+public class DataCatalogTest {
+    private final static Logger logger = LoggerFactory.getLogger(DataCatalogTest.class);
+    private static Initialize initialize;
+    private static DataCatalog datacatalog;
+    private static DataResourceModel dataResourceModel;
+    private static DataReplicaLocationModel replicaLocationModel;
+
+    @BeforeClass
+    public static void setUp() {
+        try {
+            System.out.println("********** SET UP ************");
+            initialize = new Initialize("replicacatalog-derby.sql");
+            initialize.initializeDB();
+            datacatalog = RegistryFactory.getDataCatalog();
+            dataResourceModel = new DataResourceModel();
+            dataResourceModel.setResourceName("test-file.txt");
+            HashMap<String, String> resMetadata = new HashMap<>();
+            resMetadata.put("name", "name");
+            dataResourceModel.setResourceMetadata(resMetadata);
+
+            replicaLocationModel = new DataReplicaLocationModel();
+            replicaLocationModel.setReplicaName("1-st-replica");
+            replicaLocationModel.setReplicaLocationCategory(ReplicaLocationCategory.COMPUTE_RESOURCE);
+            replicaLocationModel.setReplicaPersistentType(ReplicaPersistentType.PERSISTENT);
+            HashMap<String, String> rMetadata = new HashMap<>();
+            rMetadata.put("name", "name");
+            replicaLocationModel.setReplicaMetadata(rMetadata);
+            ArrayList<String> dataLocations = new ArrayList<>();
+            dataLocations.add("scp://g75.iu.xsede.org:/var/www/portal/experimentData/test-file.txt");
+            replicaLocationModel.setDataLocations(dataLocations);
+
+            dataResourceModel.addToDataReplicaLocations(replicaLocationModel);
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @AfterClass
+    public static void tearDown() throws Exception {
+        System.out.println("********** TEAR DOWN ************");
+        initialize.stopDerbyServer();
+    }
+
+    @Test
+    public void testPublishDataResource(){
+        try {
+            String resourceId = datacatalog.publishResource(dataResourceModel);
+            org.junit.Assert.assertNotNull(resourceId);
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testRemoveDataResource(){
+        try {
+            boolean result = datacatalog.removeResource("234234234");
+            Assert.assertFalse(result);
+            String resourceId = datacatalog.publishResource(dataResourceModel);
+            Assert.assertNotNull(resourceId);
+            result = datacatalog.removeResource(resourceId);
+            Assert.assertTrue(result);
+            result = datacatalog.removeResource(resourceId);
+            Assert.assertFalse(result);
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testGetDataResource(){
+        try {
+            String resourceId = datacatalog.publishResource(dataResourceModel);
+            Assert.assertNotNull(resourceId);
+            DataResourceModel persistedCopy = datacatalog.getResource(resourceId);
+            Assert.assertNotNull(persistedCopy);
+            Assert.assertTrue(persistedCopy.getDataReplicaLocations().size()==1);
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testUpdateDataResource(){
+        try {
+            dataResourceModel.setResourceId(UUID.randomUUID().toString());
+            boolean result = datacatalog.updateResource(dataResourceModel);
+            Assert.assertFalse(result);
+            datacatalog.publishResource(dataResourceModel);
+            dataResourceModel.setResourceName("updated-name");
+            datacatalog.updateResource(dataResourceModel);
+            dataResourceModel = datacatalog.getResource(dataResourceModel.getResourceId());
+            Assert.assertTrue(dataResourceModel.getResourceName().equals("updated-name"));
+            Assert.assertTrue(dataResourceModel.getResourceMetadata().size()==1);
+            dataResourceModel.getResourceMetadata().put("name2","name2");
+            datacatalog.updateResource(dataResourceModel);
+            dataResourceModel = datacatalog.getResource(dataResourceModel.getResourceId());
+            Assert.assertTrue(dataResourceModel.getResourceMetadata().size()==2);
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testPublishReplicaLocation(){
+        try {
+            String resourceId = datacatalog.publishResource(dataResourceModel);
+            replicaLocationModel.setResourceId(resourceId);
+            String replicaId = datacatalog.publishReplicaLocation(replicaLocationModel);
+            Assert.assertNotNull(replicaId);;
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testRemoveReplicaLocation(){
+        try {
+            String resourceId = datacatalog.publishResource(dataResourceModel);
+            replicaLocationModel.setResourceId(resourceId);
+            String replicaId = datacatalog.publishReplicaLocation(replicaLocationModel);
+            boolean result = datacatalog.removeReplicaLocation(replicaId);
+            Assert.assertTrue(result);
+            result = datacatalog.removeReplicaLocation(replicaLocationModel.getReplicaId());
+            Assert.assertFalse(result);
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testGetReplicaLocation(){
+        try {
+            String resourceId = datacatalog.publishResource(dataResourceModel);
+            replicaLocationModel.setResourceId(resourceId);
+            String replicaId = datacatalog.publishReplicaLocation(replicaLocationModel);
+            DataReplicaLocationModel persistedCopy = datacatalog.getReplicaLocation(replicaId);
+            Assert.assertNotNull(persistedCopy);
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testUpdateReplicaLocation(){
+        try {
+            String resourceId = datacatalog.publishResource(dataResourceModel);
+            replicaLocationModel.setResourceId(resourceId);
+            String replicaId = datacatalog.publishReplicaLocation(replicaLocationModel);
+            DataReplicaLocationModel persistedCopy = datacatalog.getReplicaLocation(replicaId);
+            persistedCopy.setReplicaDescription("updated-description");
+            datacatalog.updateReplicaLocation(persistedCopy);
+            persistedCopy = datacatalog.getReplicaLocation(replicaId);
+            Assert.assertTrue(persistedCopy.getReplicaDescription().equals("updated-description"));
+            Assert.assertEquals(persistedCopy.getReplicaLocationCategory(), replicaLocationModel.getReplicaLocationCategory());
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testGetAllReplicaLocations(){
+        try {
+            String resourceId = datacatalog.publishResource(dataResourceModel);
+            replicaLocationModel.setResourceId(resourceId);
+            datacatalog.publishReplicaLocation(replicaLocationModel);
+            List<DataReplicaLocationModel> replicaLocationModelList = datacatalog.getAllReplicaLocations(resourceId);
+            Assert.assertNotNull(replicaLocationModelList.get(0).getReplicaId());
+        } catch (DataCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/util/Initialize.java b/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/util/Initialize.java
new file mode 100644
index 0000000..e7fd09a
--- /dev/null
+++ b/modules/registry/registry-core/src/test/java/org/apache/airavata/replica/catalog/util/Initialize.java
@@ -0,0 +1,315 @@
+/*
+ *
+ * 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.replica.catalog.util;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.registry.core.replica.catalog.utils.DataCatalogConstants;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.URI;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+public class Initialize {
+    private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    public  String scriptName = "replicacatalog-derby.sql";
+    private NetworkServerControl server;
+    private static final String delimiter = ";";
+    private String jdbcUrl = null;
+    private String jdbcDriver = null;
+    private String jdbcUser = null;
+    private String jdbcPassword = null;
+
+    public Initialize(String scriptName) {
+        this.scriptName = scriptName;
+    }
+
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+
+    private static boolean isServerStarted(NetworkServerControl server, int ntries)
+    {
+        for (int i = 1; i <= ntries; i ++)
+        {
+            try {
+                Thread.sleep(500);
+                server.ping();
+                return true;
+            }
+            catch (Exception e) {
+                if (i == ntries)
+                    return false;
+            }
+        }
+        return false;
+    }
+
+    public void initializeDB() {
+        try{
+            jdbcDriver = ServerSettings.getSetting("datacatalog.jdbc.driver");
+            jdbcUrl = ServerSettings.getSetting("datacatalog.jdbc.url");
+            jdbcUser = ServerSettings.getSetting("datacatalog.jdbc.user");
+            jdbcPassword = ServerSettings.getSetting("datacatalog.jdbc.password");
+            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+        }
+
+        startDerbyInServerMode();
+        if(!isServerStarted(server, 20)){
+           throw new RuntimeException("Derby server could not started within five seconds...");
+        }
+        Connection conn = null;
+        try {
+            Class.forName(jdbcDriver).newInstance();
+            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+            if (!isDatabaseStructureCreated(DataCatalogConstants.CONFIGURATION, conn)) {
+                executeSQLScript(conn);
+                logger.info("New Database created for Data Catalog !!!");
+            } else {
+                logger.debug("Database already created for Data Catalog!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            try {
+                if (conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+    }
+
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+            System.out.println("Running a query to test the database tables existence.");
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private void executeSQLScript(Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+        try{
+
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
+        reader = new BufferedReader(new InputStreamReader(inputStream));
+        String line;
+        while ((line = reader.readLine()) != null) {
+            line = line.trim();
+            if (line.startsWith("//")) {
+                continue;
+            }
+            if (line.startsWith("--")) {
+                continue;
+            }
+            StringTokenizer st = new StringTokenizer(line);
+            if (st.hasMoreTokens()) {
+                String token = st.nextToken();
+                if ("REM".equalsIgnoreCase(token)) {
+                    continue;
+                }
+            }
+            sql.append(" ").append(line);
+
+            // SQL defines "--" as a comment to EOL
+            // and in Oracle it may contain a hint
+            // so we cannot just remove it, instead we must end it
+            if (line.indexOf("--") >= 0) {
+                sql.append("\n");
+            }
+            if ((checkStringBufferEndsWith(sql, delimiter))) {
+                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                sql.replace(0, sql.length(), "");
+            }
+        }
+        // Catch any statements not followed by ;
+        if (sql.length() > 0) {
+            executeSQL(sql.toString(), conn);
+        }
+        }catch (IOException e){
+            logger.error("Error occurred while executing SQL script for creating Airavata Data Catalog database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata Data Catalog database", e);
+        }finally {
+            if (reader != null) {
+                reader.close();
+            }
+        }
+    }
+
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            logger.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            logger.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                logger.warn(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                logger.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    logger.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    private void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
+                    20000,
+                    jdbcUser, jdbcPassword);
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+
+    }
+
+    public static int getPort(String jdbcURL){
+        try{
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getPort();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return -1;
+        }
+    }
+
+    private void startDerbyInEmbeddedMode(){
+        try {
+            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
+            DriverManager.getConnection("jdbc:derby:memory:unit-testing-jpa;create=true").close();
+        } catch (ClassNotFoundException e) {
+            logger.error(e.getMessage(), e);
+        } catch (SQLException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    public void stopDerbyServer() {
+        try {
+            server.shutdown();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/pom.xml
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/pom.xml b/modules/replica-catalog/pom.xml
new file mode 100644
index 0000000..4a46bcb
--- /dev/null
+++ b/modules/replica-catalog/pom.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>airavata</artifactId>
+        <groupId>org.apache.airavata</groupId>
+        <version>0.16-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>replica-catalog</artifactId>
+    <packaging>jar</packaging>
+    <name>Airavata Replica Catalog</name>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-data-models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-cpi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-commons</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-server-configuration</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.7</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalog.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalog.java b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalog.java
new file mode 100644
index 0000000..8272c45
--- /dev/null
+++ b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalog.java
@@ -0,0 +1,99 @@
+/*
+ *
+ * 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.replica.catalog;
+
+import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
+import org.apache.airavata.model.data.resource.DataResourceModel;
+import org.apache.airavata.registry.cpi.DataCatalogException;
+
+import java.util.List;
+
+public interface ReplicaCatalog {
+
+    /**
+     * To create a new dataResourceModel. This is how the system comes to know about already
+     * existing resources
+     * @param dataResourceModel
+     * @return
+     */
+    String publishResource(DataResourceModel dataResourceModel) throws ReplicaCatalogException;
+
+    /**
+     * To remove a resource entry from the replica catalog
+     * @param resourceId
+     * @return
+     */
+    boolean removeResource(String resourceId) throws ReplicaCatalogException;
+
+
+    /**
+     * To update an existing data resource model
+     * @param dataResourceModel
+     * @return
+     * @throws ReplicaCatalogException
+     */
+    boolean updateResource(DataResourceModel dataResourceModel) throws ReplicaCatalogException;
+
+    /**
+     * To retrieve a resource object providing the resourceId
+     * @param resourceId
+     * @return
+     */
+    DataResourceModel getResource(String resourceId) throws ReplicaCatalogException;
+
+    /**
+     * To create a new data replica location. This is how the system comes to know about already
+     * existing resources
+     * @param dataReplicaLocationModel
+     * @return
+     */
+    String publishReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws ReplicaCatalogException;
+
+    /**
+     * To remove a replica entry from the replica catalog
+     * @param replicaId
+     * @return
+     */
+    boolean removeReplicaLocation(String replicaId) throws ReplicaCatalogException;
+
+    /**
+     * To update an existing data replica model
+     * @param dataReplicaLocationModel
+     * @return
+     * @throws ReplicaCatalogException
+     */
+    boolean updateReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws ReplicaCatalogException;
+
+    /**
+     * To retrieve a replica object providing the replicaId
+     * @param replicaId
+     * @return
+     */
+    DataReplicaLocationModel getReplicaLocation(String replicaId) throws ReplicaCatalogException;
+
+    /**
+     * To retrieve all the replica entries for a given resource id
+     * @param resourceId
+     * @return
+     * @throws DataCatalogException
+     */
+    List<DataReplicaLocationModel> getAllReplicaLocations(String resourceId) throws ReplicaCatalogException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogConstants.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogConstants.java b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogConstants.java
new file mode 100644
index 0000000..cdc0fa5
--- /dev/null
+++ b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogConstants.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * 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.replica.catalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ReplicaCatalogConstants {
+    private final static Logger logger = LoggerFactory.getLogger(ReplicaCatalogConstants.class);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogException.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogException.java b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogException.java
new file mode 100644
index 0000000..aaa56f4
--- /dev/null
+++ b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogException.java
@@ -0,0 +1,35 @@
+/**
+ * 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.replica.catalog;
+
+public class ReplicaCatalogException extends Exception{
+
+    public ReplicaCatalogException(Throwable e) {
+        super(e);
+    }
+
+    public ReplicaCatalogException(String message) {
+        super(message, null);
+    }
+
+    public ReplicaCatalogException(String message, Throwable e) {
+        super(message, e);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogFactory.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogFactory.java b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogFactory.java
new file mode 100644
index 0000000..de661ca
--- /dev/null
+++ b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogFactory.java
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.replica.catalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ReplicaCatalogFactory {
+    private final static Logger logger = LoggerFactory.getLogger(ReplicaCatalogFactory.class);
+
+    public static ReplicaCatalog getDataManager() throws ReplicaCatalogException {
+        return new ReplicaCatalogImpl();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogImpl.java b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogImpl.java
new file mode 100644
index 0000000..e50a35c
--- /dev/null
+++ b/modules/replica-catalog/src/main/java/org/apache/airavata/replica/catalog/ReplicaCatalogImpl.java
@@ -0,0 +1,204 @@
+/*
+ *
+ * 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.replica.catalog;
+
+import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
+import org.apache.airavata.model.data.resource.DataResourceModel;
+import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.DataCatalog;
+import org.apache.airavata.registry.cpi.DataCatalogException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class ReplicaCatalogImpl implements ReplicaCatalog {
+    private final static Logger logger = LoggerFactory.getLogger(ReplicaCatalogImpl.class);
+
+    private final DataCatalog dataCatalog;
+
+    public ReplicaCatalogImpl() throws ReplicaCatalogException {
+        try {
+            this.dataCatalog = RegistryFactory.getDataCatalog();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    public ReplicaCatalogImpl(DataCatalog dataCatalog){
+        this.dataCatalog = dataCatalog;
+    }
+
+    /**
+     * To create a replica entry for an already existing file(s). This is how the system comes to know about already
+     * existing resources
+     * @param dataResourceModel
+     * @return
+     */
+    @Override
+    public String publishResource(DataResourceModel dataResourceModel) throws ReplicaCatalogException {
+        try {
+            String resourceId = dataCatalog.publishResource(dataResourceModel);
+            return resourceId;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    /**
+     * To remove a resource entry from the replica catalog
+     * @param resourceId
+     * @return
+     */
+    @Override
+    public boolean removeResource(String resourceId) throws ReplicaCatalogException {
+        try {
+            boolean result = dataCatalog.removeResource(resourceId);
+            return result;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    /**
+     * To update an existing data resource model
+     * @param dataResourceModel
+     * @return
+     * @throws ReplicaCatalogException
+     */
+    @Override
+    public boolean updateResource(DataResourceModel dataResourceModel) throws ReplicaCatalogException {
+        try {
+            boolean result = dataCatalog.updateResource(dataResourceModel);
+            return result;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    /**
+     * To retrieve a resource object providing the resourceId
+     * @param resourceId
+     * @return
+     */
+    @Override
+    public DataResourceModel getResource(String resourceId) throws ReplicaCatalogException {
+        try {
+            DataResourceModel dataResource = dataCatalog.getResource(resourceId);
+            return dataResource;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    /**
+     * To create a new data replica location. This is how the system comes to know about already
+     * existing resources
+     *
+     * @param dataReplicaLocationModel
+     * @return
+     */
+    @Override
+    public String publishReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws ReplicaCatalogException {
+        try {
+            String replicaId = dataCatalog.publishReplicaLocation(dataReplicaLocationModel);
+            return replicaId;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    /**
+     * To remove a replica entry from the replica catalog
+     *
+     * @param replicaId
+     * @return
+     */
+    @Override
+    public boolean removeReplicaLocation(String replicaId) throws ReplicaCatalogException {
+        try {
+            boolean result = dataCatalog.removeReplicaLocation(replicaId);
+            return result;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    /**
+     * To update an existing data replica model
+     *
+     * @param dataReplicaLocationModel
+     * @return
+     * @throws ReplicaCatalogException
+     */
+    @Override
+    public boolean updateReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws ReplicaCatalogException {
+        try {
+            boolean result = dataCatalog.updateReplicaLocation(dataReplicaLocationModel);
+            return result;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    /**
+     * To retrieve a replica object providing the replicaId
+     *
+     * @param replicaId
+     * @return
+     */
+    @Override
+    public DataReplicaLocationModel getReplicaLocation(String replicaId) throws ReplicaCatalogException {
+        try {
+            DataReplicaLocationModel dataReplicaLocationModel = dataCatalog.getReplicaLocation(replicaId);
+            return dataReplicaLocationModel;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+
+    /**
+     * To retrieve all the replica entries for a given resource id
+     *
+     * @param resourceId
+     * @return
+     * @throws DataCatalogException
+     */
+    @Override
+    public List<DataReplicaLocationModel> getAllReplicaLocations(String resourceId) throws ReplicaCatalogException {
+        try {
+            List<DataReplicaLocationModel> dataReplicaLocationModelList = dataCatalog.getAllReplicaLocations(resourceId);
+            return dataReplicaLocationModelList;
+        } catch (DataCatalogException e) {
+            logger.error(e.getMessage(), e);
+            throw new ReplicaCatalogException(e);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogFactoryTest.java b/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogFactoryTest.java
new file mode 100644
index 0000000..7988e7f
--- /dev/null
+++ b/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogFactoryTest.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * 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.replica.catalog;
+
+import junit.framework.Assert;
+import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.DataCatalog;
+import org.apache.airavata.registry.cpi.DataCatalogException;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ReplicaCatalogFactoryTest {
+    private final static Logger logger = LoggerFactory.getLogger(ReplicaCatalogFactoryTest.class);
+
+    @Test
+    public void testCreateDataManager() throws ReplicaCatalogException, DataCatalogException {
+        DataCatalog dataCatalog = RegistryFactory.getDataCatalog();
+        ReplicaCatalog replicaCatalog = new ReplicaCatalogImpl(dataCatalog);
+        Assert.assertNotNull(replicaCatalog);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogImplTest.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogImplTest.java b/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogImplTest.java
new file mode 100644
index 0000000..75b3405
--- /dev/null
+++ b/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/ReplicaCatalogImplTest.java
@@ -0,0 +1,207 @@
+/*
+ *
+ * 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.replica.catalog;
+
+import org.apache.airavata.replica.catalog.utils.AppCatInit;
+import org.apache.airavata.replica.catalog.utils.DataCatInit;
+import org.apache.airavata.model.data.resource.DataReplicaLocationModel;
+import org.apache.airavata.model.data.resource.DataResourceModel;
+import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.DataCatalog;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+public class ReplicaCatalogImplTest {
+    private final static Logger logger = LoggerFactory.getLogger(ReplicaCatalogImplTest.class);
+    private static AppCatInit appCatInit;
+    private static DataCatInit dataCatInit;
+    private static ReplicaCatalog replicaCatalog;
+    private static DataResourceModel dataResourceModel;
+    private static DataReplicaLocationModel dataReplicaLocationModel;
+
+    @BeforeClass
+    public static void setUp() {
+        try {
+            System.out.println("********** SET UP ************");
+            appCatInit = new AppCatInit("appcatalog-derby.sql");
+            appCatInit.initializeDB();
+            dataCatInit = new DataCatInit("datacatalog-derby.sql");
+            dataCatInit.initializeDB();
+            DataCatalog dataCatalog = RegistryFactory.getDataCatalog();
+            replicaCatalog = new ReplicaCatalogImpl(dataCatalog);
+            dataResourceModel = new DataResourceModel();
+            dataResourceModel.setResourceName("test-file.txt");
+            dataReplicaLocationModel = new DataReplicaLocationModel();
+            dataReplicaLocationModel.setReplicaName("1-st-replica");
+            ArrayList<String> dataLocations = new ArrayList<>();
+            dataLocations.add("scp://g75.iu.xsede.org:/var/www/portal/experimentData/test-file.txt");
+            dataReplicaLocationModel.setDataLocations(dataLocations);
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @AfterClass
+    public static void tearDown() throws Exception {
+        System.out.println("********** TEAR DOWN ************");
+        dataCatInit.stopDerbyServer();
+    }
+
+    @Test
+    public void testPublishDataResource(){
+        try {
+            String resourceId = replicaCatalog.publishResource(dataResourceModel);
+            org.junit.Assert.assertNotNull(resourceId);
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testRemoveDataResource(){
+        try {
+            boolean result = replicaCatalog.removeResource("234234234");
+            Assert.assertFalse(result);
+            String resourceId = replicaCatalog.publishResource(dataResourceModel);
+            Assert.assertNotNull(resourceId);
+            result = replicaCatalog.removeResource(resourceId);
+            Assert.assertTrue(result);
+            result = replicaCatalog.removeResource(resourceId);
+            Assert.assertFalse(result);
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testGetDataResource(){
+        try {
+            String resourceId = replicaCatalog.publishResource(dataResourceModel);
+            Assert.assertNotNull(resourceId);
+            DataResourceModel persistedCopy = replicaCatalog.getResource(resourceId);
+            Assert.assertNotNull(persistedCopy);
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testUpdateDataResource(){
+        try {
+            dataResourceModel.setResourceId(UUID.randomUUID().toString());
+            boolean result = replicaCatalog.updateResource(dataResourceModel);
+            Assert.assertFalse(result);
+            replicaCatalog.publishResource(dataResourceModel);
+            dataResourceModel.setResourceName("updated-name");
+            replicaCatalog.updateResource(dataResourceModel);
+            dataResourceModel = replicaCatalog.getResource(dataResourceModel.getResourceId());
+            Assert.assertTrue(dataResourceModel.getResourceName().equals("updated-name"));
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testPublishReplicaLocation(){
+        try {
+            String resourceId = replicaCatalog.publishResource(dataResourceModel);
+            dataReplicaLocationModel.setResourceId(resourceId);
+            String replicaId = replicaCatalog.publishReplicaLocation(dataReplicaLocationModel);
+            org.junit.Assert.assertNotNull(replicaId);
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testRemoveReplicaLocation(){
+        try {
+            String resourceId = replicaCatalog.publishResource(dataResourceModel);
+            dataReplicaLocationModel.setResourceId(resourceId);
+            String replicaId = replicaCatalog.publishReplicaLocation(dataReplicaLocationModel);
+            boolean result = replicaCatalog.removeReplicaLocation(replicaId);
+            Assert.assertTrue(result);
+            result = replicaCatalog.removeReplicaLocation(dataReplicaLocationModel.getReplicaId());
+            Assert.assertFalse(result);
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testGetReplicaLocation(){
+        try {
+            String resourceId = replicaCatalog.publishResource(dataResourceModel);
+            dataReplicaLocationModel.setResourceId(resourceId);
+            String replicaId = replicaCatalog.publishReplicaLocation(dataReplicaLocationModel);
+            DataReplicaLocationModel persistedCopy = replicaCatalog.getReplicaLocation(replicaId);
+            Assert.assertNotNull(persistedCopy);
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testUpdateReplicaLocation(){
+        try {
+            String resourceId = replicaCatalog.publishResource(dataResourceModel);
+            dataReplicaLocationModel.setResourceId(resourceId);
+            String replicaId = replicaCatalog.publishReplicaLocation(dataReplicaLocationModel);
+            DataReplicaLocationModel persistedCopy = replicaCatalog.getReplicaLocation(replicaId);
+            persistedCopy.setReplicaDescription("updated-description");
+            replicaCatalog.updateReplicaLocation(persistedCopy);
+            persistedCopy = replicaCatalog.getReplicaLocation(replicaId);
+            Assert.assertTrue(persistedCopy.getReplicaDescription().equals("updated-description"));
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+
+    @Test
+    public void testGetAllReplicaLocations(){
+        try {
+            String resourceId = replicaCatalog.publishResource(dataResourceModel);
+            dataReplicaLocationModel.setResourceId(resourceId);
+            String replicaId = replicaCatalog.publishReplicaLocation(dataReplicaLocationModel);
+            List<DataReplicaLocationModel> replicaLocationModelList = replicaCatalog.getAllReplicaLocations(resourceId);
+            Assert.assertTrue(replicaLocationModelList.get(0).getReplicaId().equals(replicaId));
+        } catch (ReplicaCatalogException e) {
+            e.printStackTrace();
+            Assert.fail();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/utils/AppCatInit.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/utils/AppCatInit.java b/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/utils/AppCatInit.java
new file mode 100644
index 0000000..abc5e01
--- /dev/null
+++ b/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/utils/AppCatInit.java
@@ -0,0 +1,320 @@
+/*
+ *
+ * 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.replica.catalog.utils;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.URI;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+public class AppCatInit {
+    private static final Logger logger = LoggerFactory.getLogger(AppCatInit.class);
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    public  String scriptName = "appcatalog-derby.sql";
+    private NetworkServerControl server;
+    private static final String delimiter = ";";
+    public static final String COMPUTE_RESOURCE_TABLE = "COMPUTE_RESOURCE";
+    private String jdbcUrl = null;
+    private String jdbcDriver = null;
+    private String jdbcUser = null;
+    private String jdbcPassword = null;
+
+    public AppCatInit(String scriptName) {
+        this.scriptName = scriptName;
+    }
+
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+
+    private static boolean isServerStarted(NetworkServerControl server, int ntries)
+    {
+        for (int i = 1; i <= ntries; i ++)
+        {
+            try {
+                Thread.sleep(500);
+                server.ping();
+                return true;
+            }
+            catch (Exception e) {
+                if (i == ntries)
+                    return false;
+            }
+        }
+        return false;
+    }
+
+    public void initializeDB() {
+
+        try{
+            jdbcDriver = ServerSettings.getSetting("appcatalog.jdbc.driver");
+            jdbcUrl = ServerSettings.getSetting("appcatalog.jdbc.url");
+            jdbcUser = ServerSettings.getSetting("appcatalog.jdbc.user");
+            jdbcPassword = ServerSettings.getSetting("appcatalog.jdbc.password");
+            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+        }
+
+        startDerbyInServerMode();
+        if(!isServerStarted(server, 20)){
+           throw new RuntimeException("Derby server cound not started within five seconds...");
+        }
+//      startDerbyInEmbeddedMode();
+
+        Connection conn = null;
+        try {
+            Class.forName(jdbcDriver).newInstance();
+            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+            if (!isDatabaseStructureCreated(COMPUTE_RESOURCE_TABLE, conn)) {
+                executeSQLScript(conn);
+                logger.info("New Database created for App Catalog !!!");
+            } else {
+                logger.debug("Database already created for App Catalog!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            try {
+                if (conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+    }
+
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+            System.out.println("Running a query to test the database tables existence.");
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private void executeSQLScript(Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+        try{
+
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
+        reader = new BufferedReader(new InputStreamReader(inputStream));
+        String line;
+        while ((line = reader.readLine()) != null) {
+            line = line.trim();
+            if (line.startsWith("//")) {
+                continue;
+            }
+            if (line.startsWith("--")) {
+                continue;
+            }
+            StringTokenizer st = new StringTokenizer(line);
+            if (st.hasMoreTokens()) {
+                String token = st.nextToken();
+                if ("REM".equalsIgnoreCase(token)) {
+                    continue;
+                }
+            }
+            sql.append(" ").append(line);
+
+            // SQL defines "--" as a comment to EOL
+            // and in Oracle it may contain a hint
+            // so we cannot just remove it, instead we must end it
+            if (line.indexOf("--") >= 0) {
+                sql.append("\n");
+            }
+            if ((checkStringBufferEndsWith(sql, delimiter))) {
+                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                sql.replace(0, sql.length(), "");
+            }
+        }
+        // Catch any statements not followed by ;
+        if (sql.length() > 0) {
+            executeSQL(sql.toString(), conn);
+        }
+        }catch (IOException e){
+            logger.error("Error occurred while executing SQL script for creating Airavata database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+        }finally {
+            if (reader != null) {
+                reader.close();
+            }
+
+        }
+
+    }
+
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            logger.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            logger.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                logger.warn(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                logger.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    logger.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    private void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
+                    20000,
+                    jdbcUser, jdbcPassword);
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+
+    }
+
+    public static int getPort(String jdbcURL){
+        try{
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getPort();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return -1;
+        }
+    }
+
+    private void startDerbyInEmbeddedMode(){
+        try {
+            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
+            DriverManager.getConnection("jdbc:derby:memory:unit-testing-jpa;create=true").close();
+        } catch (ClassNotFoundException e) {
+            logger.error(e.getMessage(), e);
+        } catch (SQLException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    public void stopDerbyServer() {
+        try {
+            server.shutdown();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+}


[2/8] airavata git commit: adding gatewayId to the replica catalog

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/utils/DataCatInit.java
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/utils/DataCatInit.java b/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/utils/DataCatInit.java
new file mode 100644
index 0000000..3d1d936
--- /dev/null
+++ b/modules/replica-catalog/src/test/java/org/apache/airavata/replica/catalog/utils/DataCatInit.java
@@ -0,0 +1,315 @@
+/*
+ *
+ * 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.replica.catalog.utils;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.registry.core.replica.catalog.utils.DataCatalogConstants;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.URI;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+public class DataCatInit {
+    private static final Logger logger = LoggerFactory.getLogger(DataCatInit.class);
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    public  String scriptName = "datacatalog-derby.sql";
+    private NetworkServerControl server;
+    private static final String delimiter = ";";
+    private String jdbcUrl = null;
+    private String jdbcDriver = null;
+    private String jdbcUser = null;
+    private String jdbcPassword = null;
+
+    public DataCatInit(String scriptName) {
+        this.scriptName = scriptName;
+    }
+
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+
+    private static boolean isServerStarted(NetworkServerControl server, int ntries)
+    {
+        for (int i = 1; i <= ntries; i ++)
+        {
+            try {
+                Thread.sleep(500);
+                server.ping();
+                return true;
+            }
+            catch (Exception e) {
+                if (i == ntries)
+                    return false;
+            }
+        }
+        return false;
+    }
+
+    public void initializeDB() {
+        try{
+            jdbcDriver = ServerSettings.getSetting("datacatalog.jdbc.driver");
+            jdbcUrl = ServerSettings.getSetting("datacatalog.jdbc.url");
+            jdbcUser = ServerSettings.getSetting("datacatalog.jdbc.user");
+            jdbcPassword = ServerSettings.getSetting("datacatalog.jdbc.password");
+            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+        }
+
+        startDerbyInServerMode();
+        if(!isServerStarted(server, 20)){
+           throw new RuntimeException("Derby server could not started within five seconds...");
+        }
+        Connection conn = null;
+        try {
+            Class.forName(jdbcDriver).newInstance();
+            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+            if (!isDatabaseStructureCreated(DataCatalogConstants.CONFIGURATION, conn)) {
+                executeSQLScript(conn);
+                logger.info("New Database created for Data Catalog !!!");
+            } else {
+                logger.debug("Database already created for Data Catalog!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            try {
+                if (conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+    }
+
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+            System.out.println("Running a query to test the database tables existence.");
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private void executeSQLScript(Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+        try{
+
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
+        reader = new BufferedReader(new InputStreamReader(inputStream));
+        String line;
+        while ((line = reader.readLine()) != null) {
+            line = line.trim();
+            if (line.startsWith("//")) {
+                continue;
+            }
+            if (line.startsWith("--")) {
+                continue;
+            }
+            StringTokenizer st = new StringTokenizer(line);
+            if (st.hasMoreTokens()) {
+                String token = st.nextToken();
+                if ("REM".equalsIgnoreCase(token)) {
+                    continue;
+                }
+            }
+            sql.append(" ").append(line);
+
+            // SQL defines "--" as a comment to EOL
+            // and in Oracle it may contain a hint
+            // so we cannot just remove it, instead we must end it
+            if (line.indexOf("--") >= 0) {
+                sql.append("\n");
+            }
+            if ((checkStringBufferEndsWith(sql, delimiter))) {
+                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                sql.replace(0, sql.length(), "");
+            }
+        }
+        // Catch any statements not followed by ;
+        if (sql.length() > 0) {
+            executeSQL(sql.toString(), conn);
+        }
+        }catch (IOException e){
+            logger.error("Error occurred while executing SQL script for creating Airavata Data Catalog database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata Data Catalog database", e);
+        }finally {
+            if (reader != null) {
+                reader.close();
+            }
+        }
+    }
+
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            logger.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            logger.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                logger.warn(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                logger.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    logger.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    private void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
+                    20000,
+                    jdbcUser, jdbcPassword);
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+
+    }
+
+    public static int getPort(String jdbcURL){
+        try{
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getPort();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return -1;
+        }
+    }
+
+    private void startDerbyInEmbeddedMode(){
+        try {
+            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
+            DriverManager.getConnection("jdbc:derby:memory:unit-testing-jpa;create=true").close();
+        } catch (ClassNotFoundException e) {
+            logger.error(e.getMessage(), e);
+        } catch (SQLException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    public void stopDerbyServer() {
+        try {
+            server.shutdown();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/test/resources/id_rsa
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/test/resources/id_rsa b/modules/replica-catalog/src/test/resources/id_rsa
new file mode 100644
index 0000000..4527347
--- /dev/null
+++ b/modules/replica-catalog/src/test/resources/id_rsa
@@ -0,0 +1,30 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: AES-128-CBC,4882DC230357A4388E4A1690AB275C75
+
+/REcchTscfYjoYsJ8W6C1o0elvwpEpz/orX7+uoRTv0Iar9KxCOIg+Ms24cfO2Jn
+0PLHbB373XWTCtLMWojY0EgOJvQlzP3T4rzllGW/4nm+xhioxmxHY5nV3hi1JeFg
+H4BS9OJH1bfZvlLZiIgjmDQEKM2hMRjm2SXv9wrreZfiAgF1D7XfIYd15Tkaitzh
+bGkeAAFucC1Se3dw8aDvou5o9hLSyq/o6qg3WUcUMTSl8Cwh/8ubVjKpdonB0JO8
+hekvaeMkKCe4lh4ITsvQ09pyC3OpK+KzOVHbJeFZNGZ3uSNDnegG1I4AOpd+ypAt
+ZF5NZDQBW/LS85pghRS/LEjPJhW1M2Z05lpDWNpN4B2T51BomOvHKZKcuZk97V45
+1s/BI8I3sUsEyUqHumZXdSpnsSY10GfE+agY+0ltLRNtC+UMyDOZnQXepG7AZsAp
+xRlzuNvCt21oWdZPUuc8eHStAjzaxnbOlEG1AO1FMS11uXKSH8MfMSk0yYBUvQSv
+Ug5GZv9jkuSlHxBNGZqZU/xPNzkgixeRiBGyQAg75UcxXjTgQGawSL196baR3kS7
+66o+13Aq3hEtnUqePb1iD0XqxDKRdNe8oZiI+eTzjqNL6m0dWQeVLUO8nzRqR37S
++/fpY/NQWkEubeRmunVq074rdjvZOk9oBXBTe5eMDhUbqM3yKN9GYx9MYDjAK06Y
+nvZmtl6So979JyGlAFXuc9YqxYiS/BGmOZ/iYLeSC0Bn566c0+nHydfnsxdZWicO
+YzvZrqte/LywJWZkcjHv9St8hCram346M9QTBDAp9id2RuQiIW0cx4PUOeEzN+AC
+AEQM5qIkqZYyx9z3eTZJIP/aT7bwQdRlZ7lJ8AIwX8AaLAwlDNDdwAjXojiPuqe3
+AWnfrWSHsdiojgoSxbmbDH8lZz110tk3TId2yjOZC5Fsy4eOW68/GQZMKeWD3ylT
+ajpNYZyYUlERUJDsFDoJA877lbaGii/D5vAU5HSZUnFJeiCXTGWfBlouG/GnNhrk
+I+sfajxagJBHTa1Gamo12h/0xUftxuWqp1Sh3uTInoGowmWYEazNw9FFm/fjT6Sr
+sYpw0UD77vPsziWqaZyLyvc0hVEyupnvKwz0B2IdvTHOgF//XEezjy3Ivu6c/cJs
+qt4z8WACX+yeepzyEkJ5aVluHUtjNG+EfkFhnhg9dGZ5pOVVck6M6fo4b8dw15NF
+e0OPgLU8hfwqUwalG3QVrlZjhdPlDk0rAKTDWiQuvozkLcrT862tYkxrKnAcMdZN
+uEgbbKkuF32csp9zbgJtGBf/yvI1BaomIN/ZSp02h0onlAYC4u/ybA/bjDEWy8Qv
+u1m9YKpQYQtXiY5bB3++FzVVOBpkjyBPd/S9m5apPw4FP5IECSszcGFz7ReAG2AY
+u4wTnDcL19tGn0k1Z03VVgESAh04SxVZBKzC6BtTEYwwYkP2HoG11XEEfIQ5JY7W
+IowHL1WcPx69C2TbGt3JGkIjPatXR67sFKGiRceJzTEjsoUbjaqsRJO8QZN6vq31
+8iuI0VFM8VAG4bTc10s/18QaPd3lpKIo/OIIxUJc+c5GrppcHib9CEaCD0qn7vEd
+-----END RSA PRIVATE KEY-----

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/test/resources/id_rsa.pub
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/test/resources/id_rsa.pub b/modules/replica-catalog/src/test/resources/id_rsa.pub
new file mode 100644
index 0000000..c7eaaf3
--- /dev/null
+++ b/modules/replica-catalog/src/test/resources/id_rsa.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH5ggPJf0yYW39EEW2PsEojMLILZX/EvaMnghsj9/0HPY3C+DpFx5PAeYND4ITxZWnRjQmKsYN6Z7tL4wYbWfhMPUk8urKEB8ncdQK7tZZHdJuUmprfIi02LgeE2JmM13eimF2fEMRrCFqqMnCM63ihE/jzcyhwosRjlKfzYv5C23a8orGZh9g1V2LxjA7lkUyga7B/nsJBk75SA/uJZ4TcfeWS3okk2Pv8mKLmN23WKfAqvQadDkUphYPITa7MpdaUoVIDkUllzE82V6KQ4tXcbh1xSktv6k8sR9e7BsZSJVHFHoDitV9dcQGZIOdzmpNw2ZfmNW6IdrfrrVER7Cb supun@156-56-179-175.dhcp-bl.indiana.edu

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/modules/replica-catalog/src/test/resources/known_hosts
----------------------------------------------------------------------
diff --git a/modules/replica-catalog/src/test/resources/known_hosts b/modules/replica-catalog/src/test/resources/known_hosts
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0f320b5..dfa5f2b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -551,7 +551,7 @@
 				<module>modules/commons</module>
                 <module>modules/messaging</module>
 				<module>modules/gfac</module>
-				<module>modules/data-manager</module>
+				<module>modules/replica-catalog</module>
 				<!--<module>modules/workflow-model</module>-->
 				<module>modules/registry</module>
 				<module>modules/security</module>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/thrift-interface-descriptions/airavata-api/airavata_api.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-api/airavata_api.thrift b/thrift-interface-descriptions/airavata-api/airavata_api.thrift
index 55e8437..26c1d96 100644
--- a/thrift-interface-descriptions/airavata-api/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-api/airavata_api.thrift
@@ -40,7 +40,7 @@ include "gateway_resource_profile_model.thrift"
 include "workflow_data_model.thrift"
 include "security_model.thrift"
 include "data_movement_models.thrift"
-include "data_resource_models.thrift"
+include "replica_catalog_models.thrift"
 
 namespace java org.apache.airavata.api
 namespace php Airavata.API
@@ -2338,13 +2338,13 @@ service Airavata {
  /**
   * Replica Catalog Related API Methods
  **/
- string publishDataResource(1: required security_model.AuthzToken authzToken, 2: required data_resource_models.DataResourceModel dataResourceModel)
+ string publishDataResource(1: required security_model.AuthzToken authzToken, 2: required replica_catalog_models.DataResourceModel dataResourceModel)
           throws (1: airavata_errors.InvalidRequestException ire,
                   2: airavata_errors.AiravataClientException ace,
                   3: airavata_errors.AiravataSystemException ase,
                   4: airavata_errors.AuthorizationException ae)
 
- void updateDataResource(1: required security_model.AuthzToken authzToken, 2: required data_resource_models.DataResourceModel dataResourceModel)
+ void updateDataResource(1: required security_model.AuthzToken authzToken, 2: required replica_catalog_models.DataResourceModel dataResourceModel)
            throws (1: airavata_errors.InvalidRequestException ire,
                    2: airavata_errors.AiravataClientException ace,
                    3: airavata_errors.AiravataSystemException ase,
@@ -2356,7 +2356,7 @@ service Airavata {
                    3: airavata_errors.AiravataSystemException ase,
                    4: airavata_errors.AuthorizationException ae)
 
- data_resource_models.DataResourceModel getDataResource(1: required security_model.AuthzToken authzToken, 2: required string resourceId)
+ replica_catalog_models.DataResourceModel getDataResource(1: required security_model.AuthzToken authzToken, 2: required string resourceId)
             throws (1: airavata_errors.InvalidRequestException ire,
                     2: airavata_errors.AiravataClientException ace,
                     3: airavata_errors.AiravataSystemException ase,

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/thrift-interface-descriptions/airavata-api/airavata_data_models.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-api/airavata_data_models.thrift b/thrift-interface-descriptions/airavata-api/airavata_data_models.thrift
index 118bac4..4e9badf 100644
--- a/thrift-interface-descriptions/airavata-api/airavata_data_models.thrift
+++ b/thrift-interface-descriptions/airavata-api/airavata_data_models.thrift
@@ -30,7 +30,7 @@ include "process_model.thrift"
 include "scheduling_model.thrift"
 include "status_models.thrift"
 include "data_movement_models.thrift"
-include "data_resource_models.thrift"
+include "replica_catalog_models.thrift"
 
 namespace java org.apache.airavata.model
 namespace php Airavata.Model

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/thrift-interface-descriptions/airavata-api/data_resource_models.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-api/data_resource_models.thrift b/thrift-interface-descriptions/airavata-api/data_resource_models.thrift
deleted file mode 100644
index 935d2fc..0000000
--- a/thrift-interface-descriptions/airavata-api/data_resource_models.thrift
+++ /dev/null
@@ -1,61 +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.
- *
- */
-
-  namespace java org.apache.airavata.model.data.resource
-  namespace php Airavata.Model.Data.Resource
-  namespace cpp apache.airavata.model.data.resource
-  namespace py apache.airavata.model.data.resource
-
-enum ReplicaLocationCategory {
-    GATEWAY_DATA_STORE,
-    COMPUTE_RESOURCE,
-    LONG_TERM_STORAGE_RESOURCE,
-    OTHER
-}
-
-enum ReplicaPersistentType {
-    TRANSIENT,
-    PERSISTENT
-}
-
-struct DataResourceModel {
-    1: optional string resourceId,
-    2: optional string resourceName,
-    3: optional string resourceDescription,
-    4: optional string ownerName,
-    5: optional i32 resourceSize,
-    6: optional i64 creationTime,
-    7: optional i64 lastModifiedTime,
-    8: optional map<string, string> resourceMetadata,
-    9: optional list<DataReplicaLocationModel> dataReplicaLocations
-}
-
-struct DataReplicaLocationModel {
-    1: optional string replicaId,
-    2: optional string resourceId,
-    3: optional string replicaName,
-    4: optional string replicaDescription,
-    5: optional i64 creationTime,
-    6: optional i64 lastModifiedTime,
-    7: optional ReplicaLocationCategory replicaLocationCategory,
-    8: optional ReplicaPersistentType replicaPersistentType,
-    9: optional list<string> dataLocations,
-    10: optional map<string, string> replicaMetadata
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/thrift-interface-descriptions/airavata-api/replica_catalog_models.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-api/replica_catalog_models.thrift b/thrift-interface-descriptions/airavata-api/replica_catalog_models.thrift
new file mode 100644
index 0000000..0d44941
--- /dev/null
+++ b/thrift-interface-descriptions/airavata-api/replica_catalog_models.thrift
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ *
+ */
+
+  namespace java org.apache.airavata.model.data.resource
+  namespace php Airavata.Model.Data.Resource
+  namespace cpp apache.airavata.model.data.resource
+  namespace py apache.airavata.model.data.resource
+
+enum ReplicaLocationCategory {
+    GATEWAY_DATA_STORE,
+    COMPUTE_RESOURCE,
+    LONG_TERM_STORAGE_RESOURCE,
+    OTHER
+}
+
+enum ReplicaPersistentType {
+    TRANSIENT,
+    PERSISTENT
+}
+
+struct DataResourceModel {
+    1: optional string resourceId,
+    2: optional string gatewayId,
+    3: optional string resourceName,
+    4: optional string resourceDescription,
+    5: optional string ownerName,
+    6: optional i32 resourceSize,
+    7: optional i64 creationTime,
+    8: optional i64 lastModifiedTime,
+    9: optional map<string, string> resourceMetadata,
+    10: optional list<DataReplicaLocationModel> dataReplicaLocations
+}
+
+struct DataReplicaLocationModel {
+    1: optional string replicaId,
+    2: optional string resourceId,
+    3: optional string replicaName,
+    4: optional string replicaDescription,
+    5: optional i64 creationTime,
+    6: optional i64 lastModifiedTime,
+    7: optional ReplicaLocationCategory replicaLocationCategory,
+    8: optional ReplicaPersistentType replicaPersistentType,
+    9: optional list<string> dataLocations,
+    10: optional map<string, string> replicaMetadata
+}


[7/8] airavata git commit: adding gatewayId to the replica catalog

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
index 4d1147d..42c6d86 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
@@ -77,7 +77,7 @@ import org.slf4j.LoggerFactory;
  *  assigns to the environment variable "NAME" the value
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ApplicationDeploymentDescription implements org.apache.thrift.TBase<ApplicationDeploymentDescription, ApplicationDeploymentDescription._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationDeploymentDescription> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationDeploymentDescription");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java
index d8b0b3f..c5078fe 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationModule.java
@@ -66,7 +66,7 @@ import org.slf4j.LoggerFactory;
  *    Descriprion of the Module
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ApplicationModule implements org.apache.thrift.TBase<ApplicationModule, ApplicationModule._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationModule> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationModule");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/CommandObject.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/CommandObject.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/CommandObject.java
index 6af6348..7c2e268 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/CommandObject.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/CommandObject.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * commandOrder:
  *   Order of the command in the multiple command situation
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class CommandObject implements org.apache.thrift.TBase<CommandObject, CommandObject._Fields>, java.io.Serializable, Cloneable, Comparable<CommandObject> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CommandObject");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/SetEnvPaths.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/SetEnvPaths.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/SetEnvPaths.java
index a73e990..5048f96 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/SetEnvPaths.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/SetEnvPaths.java
@@ -63,7 +63,7 @@ import org.slf4j.LoggerFactory;
  * envPathOrder:
  *   The order of the setting of the env variables when there are multiple env variables
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class SetEnvPaths implements org.apache.thrift.TBase<SetEnvPaths, SetEnvPaths._Fields>, java.io.Serializable, Cloneable, Comparable<SetEnvPaths> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SetEnvPaths");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
index 9503fc4..5adcdf0 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
@@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory;
  *   Outputs generated from the application
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<ApplicationInterfaceDescription, ApplicationInterfaceDescription._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationInterfaceDescription> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationInterfaceDescription");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java
index c6b9245..ce3b8a0 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java
@@ -57,7 +57,7 @@ import org.slf4j.LoggerFactory;
  * maxRunTime:
  *  Maximum allowed run time in hours.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueue._Fields>, java.io.Serializable, Cloneable, Comparable<BatchQueue> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchQueue");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java
index 412695e..df267fb 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  * 
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmission, CloudJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<CloudJobSubmission> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloudJobSubmission");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
index e71ad7e..1c0101d 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
@@ -80,7 +80,7 @@ import org.slf4j.LoggerFactory;
  *  Map of file systems type and the path.
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ComputeResourceDescription implements org.apache.thrift.TBase<ComputeResourceDescription, ComputeResourceDescription._Fields>, java.io.Serializable, Cloneable, Comparable<ComputeResourceDescription> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputeResourceDescription");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
index 4e7fb3a..4aea760 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class GlobusJobSubmission implements org.apache.thrift.TBase<GlobusJobSubmission, GlobusJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<GlobusJobSubmission> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GlobusJobSubmission");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java
index a4631b5..34c52d3 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java
@@ -61,7 +61,7 @@ import org.slf4j.LoggerFactory;
  *   Lower the numerical number, higher the priority
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class JobSubmissionInterface implements org.apache.thrift.TBase<JobSubmissionInterface, JobSubmissionInterface._Fields>, java.io.Serializable, Cloneable, Comparable<JobSubmissionInterface> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobSubmissionInterface");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
index b4538c3..cd1b4e8 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * sshPort:
  *  If a non-default port needs to used, specify it.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission, LOCALSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<LOCALSubmission> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LOCALSubmission");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
index 3455c6b..3236aa9 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
@@ -68,7 +68,7 @@ import org.slf4j.LoggerFactory;
  *  An enumeration of commonly used manager commands.
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ResourceJobManager implements org.apache.thrift.TBase<ResourceJobManager, ResourceJobManager._Fields>, java.io.Serializable, Cloneable, Comparable<ResourceJobManager> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ResourceJobManager");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
index 807e9bd..8861d89 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
@@ -67,7 +67,7 @@ import org.slf4j.LoggerFactory;
  *    the same. Example: *@*.example.com or *@example.com
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class SSHJobSubmission implements org.apache.thrift.TBase<SSHJobSubmission, SSHJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<SSHJobSubmission> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHJobSubmission");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
index d3c78aa..f2bb07b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
@@ -59,7 +59,7 @@ import org.slf4j.LoggerFactory;
  * authenticationMode
  *  The authenticationMode defines the way certificate is fetched.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class UnicoreJobSubmission implements org.apache.thrift.TBase<UnicoreJobSubmission, UnicoreJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<UnicoreJobSubmission> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnicoreJobSubmission");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
index 48490e3..1202c29 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@ -85,7 +85,7 @@ import org.slf4j.LoggerFactory;
  *   default credential store.
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ComputeResourcePreference implements org.apache.thrift.TBase<ComputeResourcePreference, ComputeResourcePreference._Fields>, java.io.Serializable, Cloneable, Comparable<ComputeResourcePreference> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputeResourcePreference");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
index 0ad18d1..fd7b78e 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
@@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory;
  *  List of resource preferences for each of the registered compute resources.
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class GatewayResourceProfile implements org.apache.thrift.TBase<GatewayResourceProfile, GatewayResourceProfile._Fields>, java.io.Serializable, Cloneable, Comparable<GatewayResourceProfile> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GatewayResourceProfile");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java
index f8c7427..6ebf460 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/StoragePreference.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class StoragePreference implements org.apache.thrift.TBase<StoragePreference, StoragePreference._Fields>, java.io.Serializable, Cloneable, Comparable<StoragePreference> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StoragePreference");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java
index c4d03bb..a36cb5c 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/storageresource/StorageResourceDescription.java
@@ -68,7 +68,7 @@ import org.slf4j.LoggerFactory;
  * 
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class StorageResourceDescription implements org.apache.thrift.TBase<StorageResourceDescription, StorageResourceDescription._Fields>, java.io.Serializable, Cloneable, Comparable<StorageResourceDescription> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StorageResourceDescription");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/InputDataObjectType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/InputDataObjectType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/InputDataObjectType.java
index 64e6a5d..6ad04a8 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/InputDataObjectType.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/InputDataObjectType.java
@@ -77,7 +77,7 @@ import org.slf4j.LoggerFactory;
  *   Any metadat. This is typically ignore by Airavata and is used by gateways for application configuration.
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class InputDataObjectType implements org.apache.thrift.TBase<InputDataObjectType, InputDataObjectType._Fields>, java.io.Serializable, Cloneable, Comparable<InputDataObjectType> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InputDataObjectType");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/OutputDataObjectType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/OutputDataObjectType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/OutputDataObjectType.java
index 3e35c74..df4d750 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/OutputDataObjectType.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/application/io/OutputDataObjectType.java
@@ -77,7 +77,7 @@ import org.slf4j.LoggerFactory;
  *   Any metadat. This is typically ignore by Airavata and is used by gateways for application configuration.
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class OutputDataObjectType implements org.apache.thrift.TBase<OutputDataObjectType, OutputDataObjectType._Fields>, java.io.Serializable, Cloneable, Comparable<OutputDataObjectType> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputDataObjectType");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ErrorModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ErrorModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ErrorModel.java
index 83f2ab5..b20cd38 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ErrorModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ErrorModel.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ErrorModel implements org.apache.thrift.TBase<ErrorModel, ErrorModel._Fields>, java.io.Serializable, Cloneable, Comparable<ErrorModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ErrorModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidationResults.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidationResults.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidationResults.java
index fbbecc0..a6d4d5d 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidationResults.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidationResults.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ValidationResults implements org.apache.thrift.TBase<ValidationResults, ValidationResults._Fields>, java.io.Serializable, Cloneable, Comparable<ValidationResults> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidationResults");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidatorResult.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidatorResult.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidatorResult.java
index d24e19a..c60d39c 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidatorResult.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/commons/ValidatorResult.java
@@ -58,7 +58,7 @@ import org.slf4j.LoggerFactory;
  * during the experiment launch operation
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult, ValidatorResult._Fields>, java.io.Serializable, Cloneable, Comparable<ValidatorResult> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidatorResult");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/DataMovementInterface.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/DataMovementInterface.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/DataMovementInterface.java
index fb64c0d..8142d2b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/DataMovementInterface.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/DataMovementInterface.java
@@ -61,7 +61,7 @@ import org.slf4j.LoggerFactory;
  *   Lower the numerical number, higher the priority
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class DataMovementInterface implements org.apache.thrift.TBase<DataMovementInterface, DataMovementInterface._Fields>, java.io.Serializable, Cloneable, Comparable<DataMovementInterface> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataMovementInterface");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/GridFTPDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/GridFTPDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/GridFTPDataMovement.java
index b9825c0..bc85840 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/GridFTPDataMovement.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/GridFTPDataMovement.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * sshPort:
  *  If a non-default port needs to used, specify it.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class GridFTPDataMovement implements org.apache.thrift.TBase<GridFTPDataMovement, GridFTPDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<GridFTPDataMovement> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GridFTPDataMovement");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/LOCALDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/LOCALDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/LOCALDataMovement.java
index 16a43de..4827ca9 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/LOCALDataMovement.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/LOCALDataMovement.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * sshPort:
  *  If a non-defualt port needs to used, specify it.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class LOCALDataMovement implements org.apache.thrift.TBase<LOCALDataMovement, LOCALDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<LOCALDataMovement> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LOCALDataMovement");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/SCPDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/SCPDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/SCPDataMovement.java
index c274f88..d739474 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/SCPDataMovement.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/SCPDataMovement.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * sshPort:
  *  If a non-default port needs to used, specify it.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class SCPDataMovement implements org.apache.thrift.TBase<SCPDataMovement, SCPDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<SCPDataMovement> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SCPDataMovement");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/UnicoreDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/UnicoreDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/UnicoreDataMovement.java
index f221cfe..0e2120a 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/UnicoreDataMovement.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/movement/UnicoreDataMovement.java
@@ -57,7 +57,7 @@ import org.slf4j.LoggerFactory;
  * unicoreEndPointURL:
  *  unicoreGateway End Point. The provider will query this service to fetch required service end points.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class UnicoreDataMovement implements org.apache.thrift.TBase<UnicoreDataMovement, UnicoreDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<UnicoreDataMovement> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnicoreDataMovement");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataReplicaLocationModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataReplicaLocationModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataReplicaLocationModel.java
index a234d97..ce672b1 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataReplicaLocationModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataReplicaLocationModel.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataReplicaLocationModel, DataReplicaLocationModel._Fields>, java.io.Serializable, Cloneable, Comparable<DataReplicaLocationModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataReplicaLocationModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java
index 5f8defc..3c30a7e 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/resource/DataResourceModel.java
@@ -51,19 +51,20 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class DataResourceModel implements org.apache.thrift.TBase<DataResourceModel, DataResourceModel._Fields>, java.io.Serializable, Cloneable, Comparable<DataResourceModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataResourceModel");
 
   private static final org.apache.thrift.protocol.TField RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceId", org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField RESOURCE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceName", org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField RESOURCE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceDescription", org.apache.thrift.protocol.TType.STRING, (short)3);
-  private static final org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)4);
-  private static final org.apache.thrift.protocol.TField RESOURCE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceSize", org.apache.thrift.protocol.TType.I32, (short)5);
-  private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)6);
-  private static final org.apache.thrift.protocol.TField LAST_MODIFIED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastModifiedTime", org.apache.thrift.protocol.TType.I64, (short)7);
-  private static final org.apache.thrift.protocol.TField RESOURCE_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceMetadata", org.apache.thrift.protocol.TType.MAP, (short)8);
-  private static final org.apache.thrift.protocol.TField DATA_REPLICA_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("dataReplicaLocations", org.apache.thrift.protocol.TType.LIST, (short)9);
+  private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField RESOURCE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceName", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField RESOURCE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceDescription", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField RESOURCE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceSize", org.apache.thrift.protocol.TType.I32, (short)6);
+  private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)7);
+  private static final org.apache.thrift.protocol.TField LAST_MODIFIED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastModifiedTime", org.apache.thrift.protocol.TType.I64, (short)8);
+  private static final org.apache.thrift.protocol.TField RESOURCE_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceMetadata", org.apache.thrift.protocol.TType.MAP, (short)9);
+  private static final org.apache.thrift.protocol.TField DATA_REPLICA_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("dataReplicaLocations", org.apache.thrift.protocol.TType.LIST, (short)10);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -72,6 +73,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
   }
 
   private String resourceId; // optional
+  private String gatewayId; // optional
   private String resourceName; // optional
   private String resourceDescription; // optional
   private String ownerName; // optional
@@ -84,14 +86,15 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     RESOURCE_ID((short)1, "resourceId"),
-    RESOURCE_NAME((short)2, "resourceName"),
-    RESOURCE_DESCRIPTION((short)3, "resourceDescription"),
-    OWNER_NAME((short)4, "ownerName"),
-    RESOURCE_SIZE((short)5, "resourceSize"),
-    CREATION_TIME((short)6, "creationTime"),
-    LAST_MODIFIED_TIME((short)7, "lastModifiedTime"),
-    RESOURCE_METADATA((short)8, "resourceMetadata"),
-    DATA_REPLICA_LOCATIONS((short)9, "dataReplicaLocations");
+    GATEWAY_ID((short)2, "gatewayId"),
+    RESOURCE_NAME((short)3, "resourceName"),
+    RESOURCE_DESCRIPTION((short)4, "resourceDescription"),
+    OWNER_NAME((short)5, "ownerName"),
+    RESOURCE_SIZE((short)6, "resourceSize"),
+    CREATION_TIME((short)7, "creationTime"),
+    LAST_MODIFIED_TIME((short)8, "lastModifiedTime"),
+    RESOURCE_METADATA((short)9, "resourceMetadata"),
+    DATA_REPLICA_LOCATIONS((short)10, "dataReplicaLocations");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -108,21 +111,23 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
       switch(fieldId) {
         case 1: // RESOURCE_ID
           return RESOURCE_ID;
-        case 2: // RESOURCE_NAME
+        case 2: // GATEWAY_ID
+          return GATEWAY_ID;
+        case 3: // RESOURCE_NAME
           return RESOURCE_NAME;
-        case 3: // RESOURCE_DESCRIPTION
+        case 4: // RESOURCE_DESCRIPTION
           return RESOURCE_DESCRIPTION;
-        case 4: // OWNER_NAME
+        case 5: // OWNER_NAME
           return OWNER_NAME;
-        case 5: // RESOURCE_SIZE
+        case 6: // RESOURCE_SIZE
           return RESOURCE_SIZE;
-        case 6: // CREATION_TIME
+        case 7: // CREATION_TIME
           return CREATION_TIME;
-        case 7: // LAST_MODIFIED_TIME
+        case 8: // LAST_MODIFIED_TIME
           return LAST_MODIFIED_TIME;
-        case 8: // RESOURCE_METADATA
+        case 9: // RESOURCE_METADATA
           return RESOURCE_METADATA;
-        case 9: // DATA_REPLICA_LOCATIONS
+        case 10: // DATA_REPLICA_LOCATIONS
           return DATA_REPLICA_LOCATIONS;
         default:
           return null;
@@ -168,12 +173,14 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
   private static final int __CREATIONTIME_ISSET_ID = 1;
   private static final int __LASTMODIFIEDTIME_ISSET_ID = 2;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.RESOURCE_ID,_Fields.RESOURCE_NAME,_Fields.RESOURCE_DESCRIPTION,_Fields.OWNER_NAME,_Fields.RESOURCE_SIZE,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.RESOURCE_METADATA,_Fields.DATA_REPLICA_LOCATIONS};
+  private static final _Fields optionals[] = {_Fields.RESOURCE_ID,_Fields.GATEWAY_ID,_Fields.RESOURCE_NAME,_Fields.RESOURCE_DESCRIPTION,_Fields.OWNER_NAME,_Fields.RESOURCE_SIZE,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.RESOURCE_METADATA,_Fields.DATA_REPLICA_LOCATIONS};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
     tmpMap.put(_Fields.RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("resourceId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.RESOURCE_NAME, new org.apache.thrift.meta_data.FieldMetaData("resourceName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.RESOURCE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("resourceDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -208,6 +215,9 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
     if (other.isSetResourceId()) {
       this.resourceId = other.resourceId;
     }
+    if (other.isSetGatewayId()) {
+      this.gatewayId = other.gatewayId;
+    }
     if (other.isSetResourceName()) {
       this.resourceName = other.resourceName;
     }
@@ -240,6 +250,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
   @Override
   public void clear() {
     this.resourceId = null;
+    this.gatewayId = null;
     this.resourceName = null;
     this.resourceDescription = null;
     this.ownerName = null;
@@ -276,6 +287,29 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
     }
   }
 
+  public String getGatewayId() {
+    return this.gatewayId;
+  }
+
+  public void setGatewayId(String gatewayId) {
+    this.gatewayId = gatewayId;
+  }
+
+  public void unsetGatewayId() {
+    this.gatewayId = null;
+  }
+
+  /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+  public boolean isSetGatewayId() {
+    return this.gatewayId != null;
+  }
+
+  public void setGatewayIdIsSet(boolean value) {
+    if (!value) {
+      this.gatewayId = null;
+    }
+  }
+
   public String getResourceName() {
     return this.resourceName;
   }
@@ -493,6 +527,14 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
       }
       break;
 
+    case GATEWAY_ID:
+      if (value == null) {
+        unsetGatewayId();
+      } else {
+        setGatewayId((String)value);
+      }
+      break;
+
     case RESOURCE_NAME:
       if (value == null) {
         unsetResourceName();
@@ -565,6 +607,9 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
     case RESOURCE_ID:
       return getResourceId();
 
+    case GATEWAY_ID:
+      return getGatewayId();
+
     case RESOURCE_NAME:
       return getResourceName();
 
@@ -602,6 +647,8 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
     switch (field) {
     case RESOURCE_ID:
       return isSetResourceId();
+    case GATEWAY_ID:
+      return isSetGatewayId();
     case RESOURCE_NAME:
       return isSetResourceName();
     case RESOURCE_DESCRIPTION:
@@ -644,6 +691,15 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
         return false;
     }
 
+    boolean this_present_gatewayId = true && this.isSetGatewayId();
+    boolean that_present_gatewayId = true && that.isSetGatewayId();
+    if (this_present_gatewayId || that_present_gatewayId) {
+      if (!(this_present_gatewayId && that_present_gatewayId))
+        return false;
+      if (!this.gatewayId.equals(that.gatewayId))
+        return false;
+    }
+
     boolean this_present_resourceName = true && this.isSetResourceName();
     boolean that_present_resourceName = true && that.isSetResourceName();
     if (this_present_resourceName || that_present_resourceName) {
@@ -728,6 +784,11 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
     if (present_resourceId)
       list.add(resourceId);
 
+    boolean present_gatewayId = true && (isSetGatewayId());
+    list.add(present_gatewayId);
+    if (present_gatewayId)
+      list.add(gatewayId);
+
     boolean present_resourceName = true && (isSetResourceName());
     list.add(present_resourceName);
     if (present_resourceName)
@@ -789,6 +850,16 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGatewayId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     lastComparison = Boolean.valueOf(isSetResourceName()).compareTo(other.isSetResourceName());
     if (lastComparison != 0) {
       return lastComparison;
@@ -898,6 +969,16 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
       }
       first = false;
     }
+    if (isSetGatewayId()) {
+      if (!first) sb.append(", ");
+      sb.append("gatewayId:");
+      if (this.gatewayId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gatewayId);
+      }
+      first = false;
+    }
     if (isSetResourceName()) {
       if (!first) sb.append(", ");
       sb.append("resourceName:");
@@ -1019,7 +1100,15 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 2: // RESOURCE_NAME
+          case 2: // GATEWAY_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.gatewayId = iprot.readString();
+              struct.setGatewayIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // RESOURCE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.resourceName = iprot.readString();
               struct.setResourceNameIsSet(true);
@@ -1027,7 +1116,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // RESOURCE_DESCRIPTION
+          case 4: // RESOURCE_DESCRIPTION
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.resourceDescription = iprot.readString();
               struct.setResourceDescriptionIsSet(true);
@@ -1035,7 +1124,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 4: // OWNER_NAME
+          case 5: // OWNER_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.ownerName = iprot.readString();
               struct.setOwnerNameIsSet(true);
@@ -1043,7 +1132,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 5: // RESOURCE_SIZE
+          case 6: // RESOURCE_SIZE
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
               struct.resourceSize = iprot.readI32();
               struct.setResourceSizeIsSet(true);
@@ -1051,7 +1140,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // CREATION_TIME
+          case 7: // CREATION_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.creationTime = iprot.readI64();
               struct.setCreationTimeIsSet(true);
@@ -1059,7 +1148,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 7: // LAST_MODIFIED_TIME
+          case 8: // LAST_MODIFIED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.lastModifiedTime = iprot.readI64();
               struct.setLastModifiedTimeIsSet(true);
@@ -1067,7 +1156,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 8: // RESOURCE_METADATA
+          case 9: // RESOURCE_METADATA
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
                 org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
@@ -1087,7 +1176,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 9: // DATA_REPLICA_LOCATIONS
+          case 10: // DATA_REPLICA_LOCATIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
@@ -1126,6 +1215,13 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
           oprot.writeFieldEnd();
         }
       }
+      if (struct.gatewayId != null) {
+        if (struct.isSetGatewayId()) {
+          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.gatewayId);
+          oprot.writeFieldEnd();
+        }
+      }
       if (struct.resourceName != null) {
         if (struct.isSetResourceName()) {
           oprot.writeFieldBegin(RESOURCE_NAME_FIELD_DESC);
@@ -1212,34 +1308,40 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
       if (struct.isSetResourceId()) {
         optionals.set(0);
       }
-      if (struct.isSetResourceName()) {
+      if (struct.isSetGatewayId()) {
         optionals.set(1);
       }
-      if (struct.isSetResourceDescription()) {
+      if (struct.isSetResourceName()) {
         optionals.set(2);
       }
-      if (struct.isSetOwnerName()) {
+      if (struct.isSetResourceDescription()) {
         optionals.set(3);
       }
-      if (struct.isSetResourceSize()) {
+      if (struct.isSetOwnerName()) {
         optionals.set(4);
       }
-      if (struct.isSetCreationTime()) {
+      if (struct.isSetResourceSize()) {
         optionals.set(5);
       }
-      if (struct.isSetLastModifiedTime()) {
+      if (struct.isSetCreationTime()) {
         optionals.set(6);
       }
-      if (struct.isSetResourceMetadata()) {
+      if (struct.isSetLastModifiedTime()) {
         optionals.set(7);
       }
-      if (struct.isSetDataReplicaLocations()) {
+      if (struct.isSetResourceMetadata()) {
         optionals.set(8);
       }
-      oprot.writeBitSet(optionals, 9);
+      if (struct.isSetDataReplicaLocations()) {
+        optionals.set(9);
+      }
+      oprot.writeBitSet(optionals, 10);
       if (struct.isSetResourceId()) {
         oprot.writeString(struct.resourceId);
       }
+      if (struct.isSetGatewayId()) {
+        oprot.writeString(struct.gatewayId);
+      }
       if (struct.isSetResourceName()) {
         oprot.writeString(struct.resourceName);
       }
@@ -1282,36 +1384,40 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, DataResourceModel struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(9);
+      BitSet incoming = iprot.readBitSet(10);
       if (incoming.get(0)) {
         struct.resourceId = iprot.readString();
         struct.setResourceIdIsSet(true);
       }
       if (incoming.get(1)) {
+        struct.gatewayId = iprot.readString();
+        struct.setGatewayIdIsSet(true);
+      }
+      if (incoming.get(2)) {
         struct.resourceName = iprot.readString();
         struct.setResourceNameIsSet(true);
       }
-      if (incoming.get(2)) {
+      if (incoming.get(3)) {
         struct.resourceDescription = iprot.readString();
         struct.setResourceDescriptionIsSet(true);
       }
-      if (incoming.get(3)) {
+      if (incoming.get(4)) {
         struct.ownerName = iprot.readString();
         struct.setOwnerNameIsSet(true);
       }
-      if (incoming.get(4)) {
+      if (incoming.get(5)) {
         struct.resourceSize = iprot.readI32();
         struct.setResourceSizeIsSet(true);
       }
-      if (incoming.get(5)) {
+      if (incoming.get(6)) {
         struct.creationTime = iprot.readI64();
         struct.setCreationTimeIsSet(true);
       }
-      if (incoming.get(6)) {
+      if (incoming.get(7)) {
         struct.lastModifiedTime = iprot.readI64();
         struct.setLastModifiedTimeIsSet(true);
       }
-      if (incoming.get(7)) {
+      if (incoming.get(8)) {
         {
           org.apache.thrift.protocol.TMap _map11 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
           struct.resourceMetadata = new HashMap<String,String>(2*_map11.size);
@@ -1326,7 +1432,7 @@ public class DataResourceModel implements org.apache.thrift.TBase<DataResourceMo
         }
         struct.setResourceMetadataIsSet(true);
       }
-      if (incoming.get(8)) {
+      if (incoming.get(9)) {
         {
           org.apache.thrift.protocol.TList _list15 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
           struct.dataReplicaLocations = new ArrayList<DataReplicaLocationModel>(_list15.size);

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java
index c24ee55..654dda3 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataClientException.java
@@ -66,7 +66,7 @@ import org.slf4j.LoggerFactory;
  * parameter:  If the error applied to a particular input parameter, this will
  *   indicate which parameter.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class AiravataClientException extends TException implements org.apache.thrift.TBase<AiravataClientException, AiravataClientException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataClientException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataClientException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java
index 009a9f1..de130f2 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AiravataSystemException.java
@@ -61,7 +61,7 @@ import org.slf4j.LoggerFactory;
  * message:  This may contain additional information about the error
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class AiravataSystemException extends TException implements org.apache.thrift.TBase<AiravataSystemException, AiravataSystemException._Fields>, java.io.Serializable, Cloneable, Comparable<AiravataSystemException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AiravataSystemException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java
index 7f7f71c..2e5c537 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthenticationException.java
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  * 
  *  message: contains the cause of the authorization failure.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java
index 7f28580..72e1dab 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/AuthorizationException.java
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  * 
  *  message: contains the authorization failure message
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ExperimentNotFoundException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ExperimentNotFoundException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ExperimentNotFoundException.java
index 7ee3621..13a3a10 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ExperimentNotFoundException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ExperimentNotFoundException.java
@@ -58,7 +58,7 @@ import org.slf4j.LoggerFactory;
  * 
  * key:  The value passed from the client in the identifier, which was not found.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ExperimentNotFoundException extends TException implements org.apache.thrift.TBase<ExperimentNotFoundException, ExperimentNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentNotFoundException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentNotFoundException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/InvalidRequestException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/InvalidRequestException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/InvalidRequestException.java
index 5fed039..a026e66 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/InvalidRequestException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/InvalidRequestException.java
@@ -57,7 +57,7 @@ import org.slf4j.LoggerFactory;
  * 
  *  message: contains the associated error message.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class InvalidRequestException extends TException implements org.apache.thrift.TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidRequestException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidRequestException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/LaunchValidationException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/LaunchValidationException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/LaunchValidationException.java
index f2bae69..98a892b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/LaunchValidationException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/LaunchValidationException.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class LaunchValidationException extends TException implements org.apache.thrift.TBase<LaunchValidationException, LaunchValidationException._Fields>, java.io.Serializable, Cloneable, Comparable<LaunchValidationException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LaunchValidationException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ProjectNotFoundException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ProjectNotFoundException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ProjectNotFoundException.java
index 96c0792..b128c8a 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ProjectNotFoundException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ProjectNotFoundException.java
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  * 2:  optional  string key
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ProjectNotFoundException extends TException implements org.apache.thrift.TBase<ProjectNotFoundException, ProjectNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<ProjectNotFoundException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProjectNotFoundException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/TimedOutException.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/TimedOutException.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/TimedOutException.java
index 3a42204..fea62f6 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/TimedOutException.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/TimedOutException.java
@@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory;
 /**
  * This exception is thrown when RPC timeout gets exceeded.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class TimedOutException extends TException implements org.apache.thrift.TBase<TimedOutException, TimedOutException._Fields>, java.io.Serializable, Cloneable, Comparable<TimedOutException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimedOutException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
index 0d1efdc..8562754 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidationResults.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ValidationResults implements org.apache.thrift.TBase<ValidationResults, ValidationResults._Fields>, java.io.Serializable, Cloneable, Comparable<ValidationResults> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidationResults");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
index 244cdb7..65f8139 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/error/ValidatorResult.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult, ValidatorResult._Fields>, java.io.Serializable, Cloneable, Comparable<ValidatorResult> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidatorResult");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentModel.java
index f762b83..6a43222 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentModel.java
@@ -67,7 +67,7 @@ import org.slf4j.LoggerFactory;
  * experimentDescription:
  *    The verbose description of the experiment. This is an optional parameter.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ExperimentModel implements org.apache.thrift.TBase<ExperimentModel, ExperimentModel._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatistics.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatistics.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatistics.java
index d7c7480..bb204e0 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatistics.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentStatistics.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ExperimentStatistics implements org.apache.thrift.TBase<ExperimentStatistics, ExperimentStatistics._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentStatistics> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentStatistics");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java
index dfd6ba8..d7141e7 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ExperimentSummaryModel implements org.apache.thrift.TBase<ExperimentSummaryModel, ExperimentSummaryModel._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentSummaryModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentSummaryModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
index 8afb9a8..aebd02c 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  * 
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserConfigurationDataModel, UserConfigurationDataModel._Fields>, java.io.Serializable, Cloneable, Comparable<UserConfigurationDataModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserConfigurationDataModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java
index e294bfb..5679008 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class JobModel implements org.apache.thrift.TBase<JobModel, JobModel._Fields>, java.io.Serializable, Cloneable, Comparable<JobModel> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobModel");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java
index 9d81aa1..6dcd5c8 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class ExperimentStatusChangeEvent implements org.apache.thrift.TBase<ExperimentStatusChangeEvent, ExperimentStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentStatusChangeEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentStatusChangeEvent");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d3a5a5ea/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java
index 0e9aabc..473feb4 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-11")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-12-14")
 public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, JobIdentifier._Fields>, java.io.Serializable, Cloneable, Comparable<JobIdentifier> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobIdentifier");