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:
parent
4114bf0f92
commit
80c29474f3
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue