Revision 50642
Added by Alessia Bardi about 6 years ago
DnetXsltFunctions.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.text.ParseException; |
4 | 4 |
import java.text.SimpleDateFormat; |
5 |
import java.util.*; |
|
5 |
import java.util.Calendar; |
|
6 |
import java.util.Date; |
|
7 |
import java.util.GregorianCalendar; |
|
8 |
import java.util.Random; |
|
6 | 9 |
import java.util.regex.Matcher; |
7 | 10 |
import java.util.regex.Pattern; |
8 | 11 |
|
9 | 12 |
import com.google.common.base.Joiner; |
10 |
import com.google.common.base.Predicate; |
|
11 |
import com.google.common.collect.Iterables; |
|
12 |
import org.apache.commons.lang.StringUtils; |
|
13 |
import eu.dnetlib.miscutils.functional.hash.Hashing; |
|
14 |
import org.apache.commons.lang3.StringUtils; |
|
13 | 15 |
import org.apache.commons.logging.Log; |
14 | 16 |
import org.apache.commons.logging.LogFactory; |
15 | 17 |
|
16 |
import eu.dnetlib.miscutils.functional.hash.Hashing; |
|
17 |
|
|
18 | 18 |
/** |
19 | 19 |
* This class provides some XSLT functions. |
20 | 20 |
* |
... | ... | |
111 | 111 |
} |
112 | 112 |
|
113 | 113 |
public static String join(final String s1, final String separator, final String s2) { |
114 |
if(StringUtils.isBlank(s1) || StringUtils.isBlank(s2)) {
|
|
114 |
if(StringUtils.isBlank(s1) || StringUtils.isBlank(s2)){ |
|
115 | 115 |
return ""; |
116 | 116 |
} |
117 | 117 |
return Joiner.on(separator).join(s1, s2); |
Also available in: Unified diff
using commons-lang3 3.5