Project

General

Profile

Revision 35a4f2f3

ID35a4f2f3ace4a5b6cbd5b7982f163301085af59e
Parent 41e8eb66
Child 5a36818d

Added by Andreas Müller 8 months ago

ref #8724 add Taxon to ICdmTarget

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java
60 60
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
61 61
import eu.etaxonomy.cdm.model.name.ITaxonNameBase;
62 62
import eu.etaxonomy.cdm.model.name.TaxonName;
63
import eu.etaxonomy.cdm.model.reference.ICdmTarget;
63 64
import eu.etaxonomy.cdm.model.reference.Reference;
64 65
import eu.etaxonomy.cdm.strategy.cache.taxon.ITaxonCacheStrategy;
65 66
import eu.etaxonomy.cdm.strategy.cache.taxon.TaxonBaseDefaultCacheStrategy;
......
94 95
})
95 96
public class Taxon
96 97
            extends TaxonBase<ITaxonCacheStrategy<Taxon>>
97
            implements IRelated<RelationshipBase>, IDescribable<TaxonDescription>{
98
            implements IRelated<RelationshipBase>, IDescribable<TaxonDescription>, ICdmTarget{
98 99

  
99 100
    private static final long serialVersionUID = -584946869762749006L;
100 101
    private static final Logger logger = Logger.getLogger(Taxon.class);
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/description/DescriptionAggregationConfigurationBase.java
71 71
        NONE,
72 72
        ALL,
73 73
        ALL_SAMEVALUE,
74
        DESCRIPTION;
74
        DESCRIPTION,
75
        TAXON;
75 76
     }
76 77

  
77 78
//******************* CONSTRUCTOR **********************/
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/description/DistributionAggregation.java
361 361
                return;
362 362
            }else if (sourceMode == SourceMode.DESCRIPTION){
363 363
                sources.add(DescriptionElementSource.NewAggregationInstance(deb.getInDescription()));
364
            }else if (sourceMode == SourceMode.TAXON){
365
                if (deb.getInDescription().isInstanceOf(TaxonDescription.class)){
366
                    TaxonDescription td = CdmBase.deproxy(deb.getInDescription(), TaxonDescription.class);
367
                    sources.add(DescriptionElementSource.NewAggregationInstance(td.getTaxon()));
368
                }else{
369
                    logger.warn("Description is not of type TaxonDescription. Adding source not possible");
370
                }
364 371
            }else if (sourceMode == SourceMode.ALL || sourceMode == SourceMode.ALL_SAMEVALUE){
365 372
                addSourcesDeduplicated(this.sources, deb.getSources());
366 373
            }else{

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)