From 58641a14b244a5a0f3d8c789a0b137859d216a8a Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Tue, 21 Feb 2017 19:49:44 +0000 Subject: [PATCH] minor fix for csv git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@144031 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../utils/threads/ManageTimeSeriesThread.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/threads/ManageTimeSeriesThread.java b/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/threads/ManageTimeSeriesThread.java index 6857f76..de06759 100644 --- a/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/threads/ManageTimeSeriesThread.java +++ b/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/threads/ManageTimeSeriesThread.java @@ -164,8 +164,7 @@ public class ManageTimeSeriesThread extends Thread{ char firstLetter = productName.charAt(0); // the whole path of the directory is going to be... - productName = replaceIllegalChars(productName); - String csvDirectoryForThisProduct = recordTypeFolderName + PATH_SEPARATOR + firstLetter + PATH_SEPARATOR + productName + PATH_SEPARATOR + "csv"; + String csvDirectoryForThisProduct = recordTypeFolderName + PATH_SEPARATOR + firstLetter + PATH_SEPARATOR + replaceIllegalChars(productName) + PATH_SEPARATOR + "csv"; logger.debug("The path under which the time series are going to be saved is " + csvDirectoryForThisProduct); WorkspaceFolder csvFolder = HelperMethods.createOrGetSubFoldersByPath(catalogueFolder, csvDirectoryForThisProduct); @@ -188,7 +187,7 @@ public class ManageTimeSeriesThread extends Thread{ CustomField customAnnotation = field.getAnnotation(CustomField.class); logger.debug("A time series has been just found (from field " + customAnnotation.key() + ")"); - String resourceToAttachName = (productName + "_" + customAnnotation.key()).replaceAll("\\s", "_").replaceAll("[_]+", "_") + CSV_FILE_FORMAT; + String resourceToAttachName = (replaceIllegalChars(productName) + "_" + customAnnotation.key()).replaceAll("\\s", "_").replaceAll("[_]+", "_") + CSV_FILE_FORMAT; String resourceToAttachDescription = productName + " : " + customAnnotation.key() + " time series"; File csvFile = CSVHelpers.listToCSV(asList);