Revision 60657
Added by Michele Artini about 3 years ago
XsltFunctions.java | ||
---|---|---|
81 | 81 |
public static String calculatePersonName(final String s) { |
82 | 82 |
final Pattern pattern = Pattern.compile("info:cnr-pdr\\/author\\/(.+):(.+)\\/(.+)\\/(.+)"); |
83 | 83 |
final Matcher matcher = pattern.matcher(s); |
84 |
return matcher.find() ? capitalize(String.format("%s %s", matcher.group(4), matcher.group(3))) : "";
|
|
84 |
return matcher.find() ? capitalize(String.format("%s, %s", matcher.group(3), matcher.group(4))) : "";
|
|
85 | 85 |
} |
86 | 86 |
|
87 | 87 |
public static String serverName(final String s) { |
Also available in: Unified diff
author format: surname, name