Project

General

Profile

« Previous | Next » 

Revision 2c649209

Added by Andreas Müller over 9 years ago

latest globis

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/globis/GlobisSpecTaxImport.java
16 16
import java.util.List;
17 17
import java.util.Map;
18 18
import java.util.Set;
19
import java.util.UUID;
19 20
import java.util.regex.Matcher;
20 21
import java.util.regex.Pattern;
21 22

  
......
30 31
import eu.etaxonomy.cdm.io.common.mapping.IMappingImport;
31 32
import eu.etaxonomy.cdm.io.globis.validation.GlobisSpecTaxaImportValidator;
32 33
import eu.etaxonomy.cdm.model.common.CdmBase;
34
import eu.etaxonomy.cdm.model.common.ExtensionType;
33 35
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
34 36
import eu.etaxonomy.cdm.model.common.Marker;
35 37
import eu.etaxonomy.cdm.model.common.MarkerType;
......
67 69
	private static final Class cdmTargetClass = Reference.class;
68 70
	public static final String SPEC_TAX_NAMESPACE = dbTableName;
69 71
	public static final String TYPE_NAMESPACE = dbTableName + ".SpecTypeDepository";
72
	
73
	private static UUID uuidCitedTypeLocality = UUID.fromString("ca431e0a-84ec-4828-935f-df4c8f5cf880");
74
	private static UUID uuidCitedTypeMaterial = UUID.fromString("8395021a-e596-4a55-9794-8c03aaad9e16");
70 75

  
71 76
	public GlobisSpecTaxImport(){
72 77
		super(pluralString, dbTableName, cdmTargetClass);
......
183 188
					if (acceptedTaxon != null){
184 189
						objectsToSave.add(acceptedTaxon); 
185 190
					}
191
					
192
					//SpecCitedTypeLocality
193
					String citedTypeLocality = rs.getString("SpecCitedTypeLocality");
194
					if (isNotBlank(citedTypeLocality)){
195
						ExtensionType exTypeCitedTypeLoc = getExtensionType(state, uuidCitedTypeLocality, "Type locality as cited in original description", "Type locality as cited in original description", null, ExtensionType.DOI().getVocabulary());
196
						name.addExtension(citedTypeLocality, exTypeCitedTypeLoc);
197
					}
198

  
199
					//SpecCitedTypeMaterial
200
					String citedTypeMaterial = rs.getString("SpecCitedTypeMaterial");
201
					if (isNotBlank(citedTypeMaterial)){
202
						ExtensionType exTypeCitedTypeLoc = getExtensionType(state, uuidCitedTypeMaterial, "Type material as cited in original description", "Type locality as cited in original description", null, ExtensionType.DOI().getVocabulary());
203
						name.addExtension(citedTypeLocality, exTypeCitedTypeLoc);
204
					}
205

  
206
					
186 207
					namesToSave.add(name);
187 208
					
188 209

  

Also available in: Unified diff