diff --git a/src/main/java/eu/dnetlib/dnetrolemanagement/utils/AuthoritiesUtils.java b/src/main/java/eu/dnetlib/dnetrolemanagement/utils/AuthoritiesUtils.java index 593c587..717cc96 100644 --- a/src/main/java/eu/dnetlib/dnetrolemanagement/utils/AuthoritiesUtils.java +++ b/src/main/java/eu/dnetlib/dnetrolemanagement/utils/AuthoritiesUtils.java @@ -10,11 +10,11 @@ public class AuthoritiesUtils { * Type = FUNDER | COMMUNITY | INSTITUTION | PROJECT etc. */ public static String curator(String type) { - return "CURATOR_" + type.toUpperCase(); + return "CURATOR_" + type.replaceAll("[.]", "_").toUpperCase(); } public static String curatorRole(String type) { - return "Curator - " + Character.toString(type.charAt(0)).toUpperCase() + type.substring(1); + return "Curator - " + Character.toString(type.replaceAll("[.]", "_").charAt(0)).toUpperCase() + type.substring(1); } /** @@ -23,7 +23,7 @@ public class AuthoritiesUtils { * Id = EE, EGI, etc */ public static String manager(String type, String id) { - return type.toUpperCase() + "_" + id.toUpperCase() + "_MANAGER"; + return type.replaceAll("[.]", "_").toUpperCase() + "_" + id.toUpperCase() + "_MANAGER"; } /** @@ -32,7 +32,7 @@ public class AuthoritiesUtils { * Id = EE, EGI, etc */ public static String member(String type, String id) { - return type.toUpperCase() + "_" + id.toUpperCase(); + return type.replaceAll("[.]", "_").toUpperCase() + "_" + id.toUpperCase(); } public static String memberRole(String type, String id) {