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 2016/03/23 19:45:46 UTC

airavata git commit: append filename to logical path only when data type is file

Repository: airavata
Updated Branches:
  refs/heads/develop 37487421c -> a23cc639e


append filename to logical path only when data type is file


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

Branch: refs/heads/develop
Commit: a23cc639e0ee34bc78e64706328feccc482c30f5
Parents: 3748742
Author: scnakandala <su...@gmail.com>
Authored: Wed Mar 23 14:45:42 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Mar 23 14:45:42 2016 -0400

----------------------------------------------------------------------
 .../airavata/registry/core/data/catalog/impl/DataCatalogImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a23cc639/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 be0cb40..308abfc 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
@@ -22,6 +22,7 @@
 package org.apache.airavata.registry.core.data.catalog.impl;
 
 import org.apache.airavata.model.data.product.DataProductModel;
+import org.apache.airavata.model.data.product.DataProductType;
 import org.apache.airavata.model.data.product.DataReplicaLocationModel;
 import org.apache.airavata.registry.core.data.catalog.model.DataProduct;
 import org.apache.airavata.registry.core.data.catalog.model.DataReplicaLocation;
@@ -48,7 +49,7 @@ public class DataCatalogImpl implements DataCatalog {
             throw new DataCatalogException("owner name, gateway id and logical path should be non empty and logical path" +
                     " should start with /");
         }
-        if(!productModel.getLogicalPath().endsWith(productModel.getProductName())){
+        if(productModel.getDataProductType().equals(DataProductType.FILE) && !productModel.getLogicalPath().endsWith(productModel.getProductName())){
             if(!productModel.getLogicalPath().endsWith("/"))
                 productModel.setLogicalPath(productModel.getLogicalPath()+"/");
             productModel.setLogicalPath(productModel.getLogicalPath()+productModel.getProductName());