Revision 0c8759ce
Added by U-BGBM\k.luther over 8 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/faunaEuropaea/FaunaEuropaeaImportBase.java | ||
---|---|---|
25 | 25 |
import eu.etaxonomy.cdm.io.common.CdmImportBase; |
26 | 26 |
import eu.etaxonomy.cdm.io.common.ICdmImport; |
27 | 27 |
import eu.etaxonomy.cdm.io.common.Source; |
28 |
import eu.etaxonomy.cdm.io.pesi.out.PesiTransformer; |
|
29 |
import eu.etaxonomy.cdm.model.common.MarkerType; |
|
28 | 30 |
import eu.etaxonomy.cdm.model.reference.Reference; |
29 | 31 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
30 | 32 |
|
... | ... | |
167 | 169 |
return matcher; |
168 | 170 |
} |
169 | 171 |
|
172 |
protected MarkerType getUuidMarkerType(UUID uuid, FaunaEuropaeaImportState state){ |
|
173 |
if (uuid == null){ |
|
174 |
uuid = UUID.randomUUID(); |
|
175 |
} |
|
170 | 176 |
|
177 |
MarkerType markerType = state.getMarkerType(uuid); |
|
178 |
if (markerType == null){ |
|
179 |
markerType = (MarkerType)getTermService().find(uuid); |
|
180 |
if (markerType == null){ |
|
181 |
if (uuid.equals(PesiTransformer.uuidMarkerGuidIsMissing)){ |
|
182 |
markerType = MarkerType.NewInstance("Uuid is Missing", "Uuid is missing", null); |
|
183 |
markerType.setUuid(uuid); |
|
184 |
} else if (uuid.equals(PesiTransformer.uuidMarkerTypeHasNoLastAction)){ |
|
185 |
markerType = MarkerType.NewInstance("Has no last Action", "Has no last action", null); |
|
186 |
markerType.setUuid(uuid); |
|
187 |
} |
|
188 |
markerType = (MarkerType)getTermService().save(markerType); |
|
189 |
} |
|
190 |
} |
|
191 |
|
|
192 |
state.putMarkerType(markerType); |
|
193 |
return markerType; |
|
194 |
} |
|
171 | 195 |
|
172 | 196 |
} |
Also available in: Unified diff
minor Fauna Eu changes