You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by is...@apache.org on 2022/10/12 19:59:42 UTC

[airavata-data-lake] branch master updated: filter properties

This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-data-lake.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e6611b  filter properties
     new c5b2627  Merge pull request #188 from isururanawaka/mysql_conversion
8e6611b is described below

commit 8e6611b8c7be137ece31f226e69893a6746bb3ce
Author: Isuru Ranawaka <ir...@gmail.com>
AuthorDate: Wed Oct 12 15:58:41 2022 -0400

    filter properties
---
 .../drms/api/persistance/mapper/ResourceMapper.java        | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/persistance/mapper/ResourceMapper.java b/data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/persistance/mapper/ResourceMapper.java
index 4046c7d..1491410 100644
--- a/data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/persistance/mapper/ResourceMapper.java
+++ b/data-resource-management-service/drms-rdbms-impl/drms-server/src/main/java/org/apache/airavata/drms/api/persistance/mapper/ResourceMapper.java
@@ -37,7 +37,19 @@ public class ResourceMapper {
             if (resourceProperty.getPropertyKey().equals("resourcePath")) {
                 genericResourceBuilder.setResourcePath(resourceProperty.getPropertyValue());
             }
-            genericResourceBuilder.putProperties(resourceProperty.getPropertyKey(), resourceProperty.getPropertyValue());
+            if (resourceProperty.getPropertyKey().equals("note") || resourceProperty.getPropertyKey().equals("permission")){
+                genericResourceBuilder.putProperties(resourceProperty.getPropertyKey(),resourceProperty.getPropertyValue());
+            }
+
+            if (resourceProperty.getPropertyKey().equals("image") || resourceProperty.getPropertyKey().equals("thumbnail")){
+                String[] urlArrays = resourceProperty.getPropertyValue().split("/");
+                String imagePath = "https://gateway.iubemcenter.indiana.edu/resource-images/";
+                String fullPath = imagePath+ urlArrays[urlArrays.length-1];
+                genericResourceBuilder.putProperties(resourceProperty.getPropertyKey(),fullPath);
+            }
+
+
+//            genericResourceBuilder.putProperties(resourceProperty.getPropertyKey(), resourceProperty.getPropertyValue());
 
         }
         return genericResourceBuilder.build();