Revision f33355c3
Added by Andreas Müller over 3 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/Language.java | ||
---|---|---|
24 | 24 |
import javax.xml.bind.annotation.XmlRootElement; |
25 | 25 |
import javax.xml.bind.annotation.XmlType; |
26 | 26 |
|
27 |
import org.apache.commons.lang.StringUtils; |
|
28 | 27 |
import org.apache.log4j.Logger; |
29 | 28 |
import org.hibernate.envers.Audited; |
30 | 29 |
|
... | ... | |
649 | 648 |
|
650 | 649 |
public Language(String text, String label, String labelAbbrev, Language lang) { |
651 | 650 |
super(TermType.Language); |
652 |
if (StringUtils.isNotBlank(label) || StringUtils.isNotBlank(labelAbbrev) || lang != null){
|
|
651 |
if (isNotBlank(label) || isNotBlank(labelAbbrev) || lang != null){
|
|
653 | 652 |
this.addRepresentation(new Representation(text,label,labelAbbrev, lang)); |
654 | 653 |
} |
655 | 654 |
} |
... | ... | |
1264 | 1263 |
} |
1265 | 1264 |
|
1266 | 1265 |
public static Language getLanguageByDescription(String text){ |
1267 |
if (StringUtils.isBlank(text)){
|
|
1266 |
if (isBlank(text)){ |
|
1268 | 1267 |
return null; |
1269 | 1268 |
} |
1270 | 1269 |
for (Language language : termMap.values()){ |
... | ... | |
1276 | 1275 |
} |
1277 | 1276 |
|
1278 | 1277 |
public static Language getLanguageByLabel(String label){ |
1279 |
if (StringUtils.isBlank(label)){
|
|
1278 |
if (isBlank(label)){ |
|
1280 | 1279 |
return null; |
1281 | 1280 |
} |
1282 | 1281 |
for (Language language : termMap.values()){ |
... | ... | |
1287 | 1286 |
return null; |
1288 | 1287 |
} |
1289 | 1288 |
public static Language getLanguageByIsoCode(String code){ |
1290 |
if (StringUtils.isBlank(code)){
|
|
1289 |
if (isBlank(code)){ |
|
1291 | 1290 |
return null; |
1292 | 1291 |
} |
1293 | 1292 |
for (Language language : termMap.values()){ |
Also available in: Unified diff
ref #9204 remove commons-lang2 from cdmlib dependencies