Project

General

Profile

« Previous | Next » 

Revision 0e8e8d41

Added by Andreas Müller almost 10 years ago

CommonName compatible handling of areas in BMoccurrence

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelOccurrenceImport.java
222 222
			emCode = unit;
223 223
		}
224 224
		
225
		//label
226
		NamedArea area = NamedArea.NewInstance(geoSearch, unit, emCode);
227
		
228 225
		//uuid
229 226
		UUID uuid = BerlinModelTransformer.getEMAreaUuid(emCode);
230
		if (uuid != null){
231
			area.setUuid(uuid);
232
		}else{
233
			logger.warn("Uuuid for emCode could not be defined: " + emCode);
227
		NamedArea area = (NamedArea)getTermService().find(uuid);
228
		if (area == null){
229
			//label
230
			area = NamedArea.NewInstance(geoSearch, unit, emCode);
231
			if (uuid != null){
232
				area.setUuid(uuid);
233
			}else{
234
				logger.warn("Uuuid for emCode could not be defined: " + emCode);
235
			}
234 236
		}
235 237
		
238
		
236 239
		//code
237 240
		area.setIdInVocabulary(emCode);
238 241
		//notes

Also available in: Unified diff