minor fix to method's name

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@131992 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-09-28 14:21:27 +00:00
parent 4114bf0f92
commit 80c29474f3
2 changed files with 3 additions and 3 deletions

View File

@ -607,7 +607,7 @@ public class DataCatalogueImpl implements DataCatalogue{
CkanDataset dataset = new CkanDataset();
// get the name from the title
String name = UtilMethods.fromTitleToName(title);
String name = UtilMethods.fromProductTitleToName(title);
logger.debug("Name of the dataset is going to be " + name);
dataset.setName(name);
dataset.setTitle(title);

View File

@ -31,12 +31,12 @@ public class UtilMethods {
* @param title
* @return
*/
public static String fromTitleToName(String title) {
public static String fromProductTitleToName(String title) {
if(title == null)
return null;
String regexTitleNameTransform = "[^A-Za-z0-9_-]";
return title.trim().replaceAll(regexTitleNameTransform, "_").replace("_+", "_").toLowerCase();
return title.trim().replaceAll(regexTitleNameTransform, "_").replace("_+", "_").toLowerCase();
}
/**