Project

General

Profile

« Previous | Next » 

Revision b59db821

Added by Andreas Müller almost 8 years ago

Include nom. illeg. in homotypic group ordering #3338

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/HomotypicGroupTaxonComparator.java
176 176
        }else if (basionym.equals(name2)){
177 177
            return 1;
178 178
        }else{
179
            super.compare(name1, name2);
179
            super.compare(name1, name2, false);
180 180
        }
181 181
        return 0;
182 182
    }
......
191 191
        TaxonNameBase<?,?> basionym1 = getFirstNameInGroup(basionym1Orig);
192 192
        TaxonNameBase<?,?> basionym2 = getFirstNameInGroup(basionym2Orig);
193 193

  
194
        //handle accepted taxon case
194 195
        if (basionym1.equals(firstNameInGroup)){
195 196
            return -1;
196 197
        }else if (basionym2.equals(firstNameInGroup)){
197 198
            return 1;
198 199
        }
199 200

  
201
        //handle replaced synonyms
200 202
        boolean basio2IsReplacedSynForBasio1 = getReplacedSynonymClosure(basionym1).contains(basionym2);
201 203
        boolean basio1IsReplacedSynForBasio2 = getReplacedSynonymClosure(basionym2).contains(basionym1);
202 204

  
......
206 208
            return -1;
207 209
        }
208 210

  
209
        int result = super.compare(basionym1, basionym2);
210
        return result;
211
        //compare by date, nom. illeg., rank and alphabetically
212
        return super.compare(basionym1, basionym2, true);
213

  
211 214
    }
212 215

  
213 216
    /**
......
269 272
            TaxonNameBase<?,?> result = candidates.iterator().next();
270 273
            candidates.remove(result);
271 274
            for (TaxonNameBase<?,?> candidate : candidates){
272
                if (super.compare(result, candidate) > 0){
275
                if (super.compare(result, candidate, false) > 0){
273 276
                    result = candidate;
274 277
                }
275 278
            }

Also available in: Unified diff