Project

General

Profile

Revision da891ec9

IDda891ec9f7b42295b6f40e6f6106053aad66e9bf
Parent c40d7820
Child 56946f39

Added by Patrick Plitzner about 5 years ago

Import taxNr as identifier of taxon

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlConstants.java
169 169

  
170 170
    //redList feature vocabulary
171 171
    public static final UUID vocRLFeatures =  UUID.fromString("74091f30-faa0-487b-bd7e-c82eed05d3c9");
172
   
173
    public static final UUID TAX_NR_IDENTIFIER =  UUID.fromString("7d12de50-0db7-47b3-bb8e-703ad1d54fbc");
172 174

  
173 175
    //redList state Vocabularies
174 176
    public static final UUID vocStateRLKat =  UUID.fromString("66bbb391-af8a-423b-9506-a235b61af922");
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/in/BfnXmlImportTaxonName.java
227 227
			childName = BfnXmlConstants.EL_WISSNAME;
228 228
			Element elWissName = XmlHelp.getSingleChildElement(success, elTaxon, childName, bfnNamespace, obligatory);
229 229
			String childElementName = BfnXmlConstants.EL_NANTEIL;
230
			Taxon taxon = createOrUpdateTaxon(success, idNamespace, config, bfnNamespace, elWissName, childElementName, state);
230
			Taxon taxon = createOrUpdateTaxon(success, taxonId, config, bfnNamespace, elWissName, childElementName, state);
231 231

  
232 232
			//for each synonym
233 233
			childName = "SYNONYME";
......
333 333
	 * <b>Existing taxon names won't be matched yet</b>
334 334
	 *
335 335
	 * @param success
336
	 * @param idNamespace
336
	 * @param taxonId
337 337
	 * @param config
338 338
	 * @param bfnNamespace
339 339
	 * @param elTaxonName
......
344 344

  
345 345
	@SuppressWarnings({ "unchecked" })
346 346
	private Taxon createOrUpdateTaxon(
347
			ResultWrapper<Boolean> success, String idNamespace,
347
			ResultWrapper<Boolean> success, String taxonId,
348 348
			BfnXmlImportConfigurator config, Namespace bfnNamespace,
349 349
			Element elTaxonName, String childElementName, BfnXmlImportState state) {
350 350

  
......
419 419
					String namespace = grandParentElement.getName() + ":" + parentElement.getName() + ":"+elWissName.getName() + ":" + uriNameSpace;
420 420
					String microRefStr = microRef == null ? null : microRef.getTitle();
421 421
					taxon.addImportSource(uniqueID, namespace, state.getCompleteSourceRef(), microRefStr);
422

  
423
					taxon.addIdentifier(taxonId, getIdentiferType(state, BfnXmlConstants.TAX_NR_IDENTIFIER, "taxNr", "TaxNr attribute of Bfn Xml file", "taxNr", null));
422 424
				} catch (UnknownCdmTypeException e) {
423 425
					success.setValue(false);
424 426
				}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)