1 |
48001
|
claudio.at
|
package eu.dnetlib.data.transform.xml;
|
2 |
|
|
|
3 |
|
|
import org.apache.commons.lang.StringUtils;
|
4 |
|
|
|
5 |
|
|
/**
|
6 |
|
|
* Created by miriam on 04/05/2017.
|
7 |
|
|
*/
|
8 |
|
|
public class FWFXsltFunctions {
|
9 |
|
|
public static String getName(String name, boolean first){
|
10 |
|
|
String[] split = name.split(" ");
|
11 |
|
|
name ="";
|
12 |
|
|
for (int i = 0; i< split.length; i++)
|
13 |
|
|
if(!split[i].equals(split[i].toUpperCase())) {
|
14 |
|
|
if (first)
|
15 |
|
|
name += split[i] + " ";
|
16 |
|
|
}
|
17 |
|
|
else{
|
18 |
|
|
if(!first){
|
19 |
|
|
name += split[i] + " ";
|
20 |
|
|
}
|
21 |
|
|
}
|
22 |
|
|
return name.trim();
|
23 |
|
|
}
|
24 |
|
|
|
25 |
|
|
public static String getMd5(String name){
|
26 |
|
|
if(StringUtils.isNotBlank(name ) && StringUtils.isNotEmpty(name))
|
27 |
|
|
return AbstractDNetXsltFunctions.md5(name);
|
28 |
|
|
return name;
|
29 |
|
|
}
|
30 |
|
|
}
|