Revision ab63ee71
Added by Andreas Müller over 11 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/cyprus/CyprusTransformer.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import java.util.UUID; |
14 | 14 |
|
15 |
import org.apache.commons.lang.StringUtils; |
|
15 | 16 |
import org.apache.log4j.Logger; |
16 | 17 |
|
17 | 18 |
import eu.etaxonomy.cdm.common.CdmUtils; |
... | ... | |
69 | 70 |
*/ |
70 | 71 |
@Override |
71 | 72 |
public MarkerType getMarkerTypeByKey(String key) throws UndefinedTransformerMethodException { |
72 |
if (CdmUtils.isEmpty(key)){return null;
|
|
73 |
if (StringUtils.isBlank(key)){return null;
|
|
73 | 74 |
// }else if (key.equalsIgnoreCase("distribution")){return MarkerType.; |
74 | 75 |
// }else if (key.equalsIgnoreCase("habitatecology")){return Feature.ECOLOGY(); |
75 | 76 |
}else{ |
... | ... | |
79 | 80 |
|
80 | 81 |
@Override |
81 | 82 |
public UUID getMarkerTypeUuid(String key) throws UndefinedTransformerMethodException { |
82 |
if (CdmUtils.isEmpty(key)){return null;
|
|
83 |
if (StringUtils.isBlank(key)){return null;
|
|
83 | 84 |
// }else if (key.equalsIgnoreCase("IMPERFECTLY KNOWN SPECIES")){return uuidIncompleteTaxon; |
84 | 85 |
}else{ |
85 | 86 |
return null; |
... | ... | |
89 | 90 |
|
90 | 91 |
@Override |
91 | 92 |
public UUID getPresenceTermUuid(String key) throws UndefinedTransformerMethodException { |
92 |
if (CdmUtils.isEmpty(key)){return null;
|
|
93 |
if (StringUtils.isBlank(key)){return null;
|
|
93 | 94 |
}else if (key.equalsIgnoreCase("IN")){return indigenousUuid; |
94 | 95 |
}else if (key.equalsIgnoreCase("CA")){return casualUuid; |
95 | 96 |
}else if (key.equalsIgnoreCase("NN")){return nonInvasiveUuid; |
... | ... | |
109 | 110 |
|
110 | 111 |
@Override |
111 | 112 |
public UUID getFeatureUuid(String key) throws UndefinedTransformerMethodException { |
112 |
if (CdmUtils.isEmpty(key)){return null;
|
|
113 |
if (StringUtils.isBlank(key)){return null;
|
|
113 | 114 |
}else if (key.equalsIgnoreCase("Red book")){return redBookUuid; |
114 | 115 |
}else if (key.equalsIgnoreCase("Endemism")){return endemismUuid; |
115 | 116 |
}else{ |
... | ... | |
120 | 121 |
|
121 | 122 |
@Override |
122 | 123 |
public UUID getNamedAreaUuid(String key) throws UndefinedTransformerMethodException { |
123 |
if (CdmUtils.isEmpty(key)){return null;
|
|
124 |
if (StringUtils.isBlank(key)){return null;
|
|
124 | 125 |
}else if (key.equalsIgnoreCase("1")){return uuidDivision1; |
125 | 126 |
}else if (key.equalsIgnoreCase("2")){return uuidDivision2; |
126 | 127 |
}else if (key.equalsIgnoreCase("3")){return uuidDivision3; |
Also available in: Unified diff
isEmpty > isBlank