Revision 27d23ab7
Added by Patrick Plitzner about 8 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportNames.java | ||
---|---|---|
129 | 129 |
RedListUtil.logMessage(id, RedListUtil.EPI1+" is empty!", logger); |
130 | 130 |
} |
131 | 131 |
name.setGenusOrUninomial(ep1String); |
132 |
if(!CdmUtils.isBlank(ep2String)){
|
|
132 |
if(CdmUtils.isNotBlank(ep2String)){
|
|
133 | 133 |
name.setSpecificEpithet(ep2String); |
134 | 134 |
} |
135 |
if(!CdmUtils.isBlank(ep3String)){
|
|
135 |
if(CdmUtils.isNotBlank(ep3String)){
|
|
136 | 136 |
if(rank==Rank.SUBSPECIES() || |
137 | 137 |
rank==Rank.VARIETY()){ |
138 | 138 |
name.setInfraSpecificEpithet(ep3String); |
139 | 139 |
} |
140 | 140 |
} |
141 | 141 |
//nomenclatural status |
142 |
NomenclaturalStatusType status = makeNomenclaturalStatus(id, state, nomZusatzString); |
|
143 |
if(status!=null){ |
|
144 |
name.addStatus(NomenclaturalStatus.NewInstance(status)); |
|
142 |
if(CdmUtils.isNotBlank(nomZusatzString)){ |
|
143 |
NomenclaturalStatusType status = makeNomenclaturalStatus(id, state, nomZusatzString); |
|
144 |
if(status!=null){ |
|
145 |
name.addStatus(NomenclaturalStatus.NewInstance(status)); |
|
146 |
} |
|
145 | 147 |
} |
146 | 148 |
|
147 | 149 |
|
... | ... | |
168 | 170 |
else if(authorKombString.trim().equals(RedListUtil.AUCT)){ |
169 | 171 |
RedListUtil.logMessage(id, "AUCT information in "+RedListUtil.AUTOR_KOMB+" column", logger); |
170 | 172 |
} |
171 |
else if(!CdmUtils.isBlank(authorKombString)){
|
|
173 |
else if(CdmUtils.isNotBlank(authorKombString)){
|
|
172 | 174 |
TeamOrPersonBase authorKomb = (TeamOrPersonBase) state.getRelatedObject(RedListUtil.AUTHOR_NAMESPACE, authorKombString); |
173 | 175 |
name.setCombinationAuthorship(authorKomb); |
174 | 176 |
} |
... | ... | |
202 | 204 |
else if(authorBasiString.trim().equals(RedListUtil.AUCT)){ |
203 | 205 |
name.setAppendedPhrase(authorBasiString); |
204 | 206 |
} |
205 |
else if(!CdmUtils.isBlank(authorBasiString)){
|
|
207 |
else if(CdmUtils.isNotBlank(authorBasiString)){
|
|
206 | 208 |
//this seems to be a convention in the source database: When there is only a single author then only the "AUTOR_BASI" column is used |
207 | 209 |
TeamOrPersonBase authorBasi= (TeamOrPersonBase) state.getRelatedObject(RedListUtil.AUTHOR_NAMESPACE, authorBasiString); |
208 | 210 |
if(CdmUtils.isBlank(authorKombString)){ |
... | ... | |
217 | 219 |
String authorString = rs.getString(RedListUtil.AUTOR); |
218 | 220 |
String authorshipCache = name.getAuthorshipCache(); |
219 | 221 |
|
220 |
if(!CdmUtils.isBlank(zusatzString)){
|
|
222 |
if(CdmUtils.isNotBlank(zusatzString)){
|
|
221 | 223 |
authorString = authorString.replace(", "+zusatzString, ""); |
222 | 224 |
} |
223 | 225 |
// if(CdmUtils.isBlank(authorKombString) && !CdmUtils.isBlank(authorBasiString)){ |
... | ... | |
302 | 304 |
} |
303 | 305 |
} |
304 | 306 |
} |
305 |
else if(!CdmUtils.isBlank(authorKombString) && !authorMap.containsKey(authorKombString)){
|
|
307 |
else if(CdmUtils.isNotBlank(authorKombString) && !authorMap.containsKey(authorKombString)){
|
|
306 | 308 |
authorMap.put(authorKombString, getAgentService().load(state.getAuthorMap().get(authorKombString))); |
307 | 309 |
} |
308 | 310 |
|
... | ... | |
316 | 318 |
} |
317 | 319 |
} |
318 | 320 |
} |
319 |
else if(!CdmUtils.isBlank(authorBasiString) && !authorMap.containsKey(authorBasiString)){
|
|
321 |
else if(CdmUtils.isNotBlank(authorBasiString) && !authorMap.containsKey(authorBasiString)){
|
|
320 | 322 |
authorMap.put(authorBasiString, getAgentService().load(state.getAuthorMap().get(authorBasiString))); |
321 | 323 |
} |
322 | 324 |
} |
Also available in: Unified diff
Refactor use of CdmUtils