Project

General

Profile

« Previous | Next » 

Revision 3ef2e1bd

Added by Andreas Müller over 7 years ago

ref #5974 Remove synonym relationships (not finished yet)

View differences:

cdm-eflora/src/main/java/eu/etaxonomy/cdm/io/eflora/centralAfrica/ferns/CentralAfricaFernsTaxonRelationImport.java
54 54
import eu.etaxonomy.cdm.model.reference.Reference;
55 55
import eu.etaxonomy.cdm.model.taxon.Classification;
56 56
import eu.etaxonomy.cdm.model.taxon.Synonym;
57
import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
58
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
57
import eu.etaxonomy.cdm.model.taxon.SynonymType;
59 58
import eu.etaxonomy.cdm.model.taxon.Taxon;
60 59
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
61 60
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
......
242 241

  
243 242

  
244 243
	/**
245
	 * Handles records with status synonym. A synonym relationship to the accepted taxon
246
	 * is created.
244
	 * Handles records with status synonym. The synonym is attached to the accepted taxon.
245
	 *
247 246
	 * @param rs
248 247
	 * @param state
249 248
	 * @return
......
264 263
		if (taxonBase != null){
265 264
			if (taxonBase.isInstanceOf(Taxon.class)){
266 265
				Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
267
				SynonymRelationship rel = taxon.addSynonym(synonym, SynonymRelationshipType.SYNONYM_OF());
266
				taxon.addSynonym(synonym, SynonymType.SYNONYM_OF());
268 267
				if ("p.p.".equalsIgnoreCase(nomRemarksString)){
269
					rel.setProParte(true);
268
					synonym.setProParte(true);
270 269
				}
271 270
			}else{
272 271
				logger.warn("Accepted taxon (" + accTaxonId + ") for synonym (" + synonymId +") is not of type 'Current'");

Also available in: Unified diff