Project

General

Profile

« Previous | Next » 

Revision 961bb5d1

Added by Andreas Müller almost 6 years ago

ref #7369 implement taxonomically valueless taxa with markers

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelTaxonImport.java
38 38
import eu.etaxonomy.cdm.model.common.Extension;
39 39
import eu.etaxonomy.cdm.model.common.ExtensionType;
40 40
import eu.etaxonomy.cdm.model.common.Language;
41
import eu.etaxonomy.cdm.model.common.Marker;
42
import eu.etaxonomy.cdm.model.common.MarkerType;
41 43
import eu.etaxonomy.cdm.model.description.Feature;
42 44
import eu.etaxonomy.cdm.model.description.TaxonDescription;
43 45
import eu.etaxonomy.cdm.model.description.TextData;
......
253 255
					//
254 256
					if (resultSetHasColumn(rs,"LastScrutiny")){
255 257
						String lastScrutiny = rs.getString("LastScrutiny");
256
						ExtensionType extensionTypeSpeciesExpert = getExtensionType(state, BerlinModelTransformer.uuidSpeciesExpertName, "Species Expert", "Species Expert", "Species Expert");
257
						taxonBase.addExtension(lastScrutiny, extensionTypeSpeciesExpert);
258
						ExtensionType extensionTypeExpert = getExtensionType(state, BerlinModelTransformer.uuidExpertName, "Expert", "Expert for a taxonomic group", "Expert");
259
						taxonBase.addExtension(lastScrutiny, extensionTypeExpert);
258
						//TODO strange, why not Extension last scrutiny? To match PESI? Is there a difference
259
						//to LastScrutinyFK and SpeciesExpertFK?
260
						if (isNotBlank(lastScrutiny)){
261
						    ExtensionType extensionTypeSpeciesExpert = getExtensionType(state, BerlinModelTransformer.uuidSpeciesExpertName, "Species Expert", "Species Expert", "Species Expert");
262
						    taxonBase.addExtension(lastScrutiny, extensionTypeSpeciesExpert);
263
						    ExtensionType extensionTypeExpert = getExtensionType(state, BerlinModelTransformer.uuidExpertName, "Expert", "Expert for a taxonomic group", "Expert");
264
						    taxonBase.addExtension(lastScrutiny, extensionTypeExpert);
265
						}
266
					}
267
					//
268
					if (resultSetHasColumn(rs, "IsExcludedMarker")){
269
					    boolean isExcluded = rs.getBoolean("IsExcludedMarker");
270
					    if (isExcluded){
271
					        String extension = rs.getString("IsExcludedExtension");
272
					        String valueless = "not accepted: taxonomically valueless local or singular biotype";
273
					        String provisional = "provisional: probably a taxonomically valueless local or singular biotype";
274

  
275
					        MarkerType markerType = null;
276
					        if (valueless.equals(extension)){
277
					            markerType = getMarkerType(state, BerlinModelTransformer.uuidTaxonomicallyValueless, "taxonomically valueless", valueless, "valueless");
278
					        }else if (provisional.equals(extension)){
279
                                markerType = getMarkerType(state, BerlinModelTransformer.uuidProbablyTaxonomicallyValueless, "probably taxonomically valueless", provisional, "provisional");
280
                            }
281
					        if (markerType != null){
282
					            taxonBase.addMarker(Marker.NewInstance(markerType, true));
283
					        }else{
284
					            logger.warn("IsExcludedExtension not regonized for taxon " + taxonId + "; " + extension);
285
					        }
286
					    }
260 287
					}
261 288

  
262 289
					//Notes

Also available in: Unified diff