Project

General

Profile

« Previous | Next » 

Revision 61970fc0

Added by Patrick Plitzner about 8 years ago

Handle misapplied names

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportClassification.java
100 100
        TaxonBase taxonBase = state.getRelatedObject(Namespace.TAXON_NAMESPACE, id, TaxonBase.class);
101 101
        Taxon parent = (Taxon) state.getRelatedObject(Namespace.TAXON_NAMESPACE, parentId, TaxonBase.class);
102 102

  
103
        //misapplied name
104
        String appendedPhrase = taxonBase.getName().getAppendedPhrase();
105
        if(appendedPhrase!=null && appendedPhrase.contains("auct.")){
106
            //TODO why can't I add synonymy as misapplications
107
//            parent.addMisappliedName(misappliedNameTaxon, citation, microcitation)
108
        }
109 103
        //taxon
110
        else if(taxonBase.isInstanceOf(Taxon.class)){
111
            classification.addParentChild(parent, (Taxon)taxonBase, null, null);
104
        if(taxonBase.isInstanceOf(Taxon.class)){
105
            //misapplied name
106
            String appendedPhrase = taxonBase.getName().getAppendedPhrase();
107
            if(appendedPhrase!=null && appendedPhrase.contains("auct.")){
108
                parent.addMisappliedName((Taxon) taxonBase, null, null);
109
            }
110
            else{
111
                classification.addParentChild(parent, (Taxon)taxonBase, null, null);
112
            }
112 113
        }
113 114
        else if(taxonBase.isInstanceOf(Synonym.class)){
114 115
            //basionym
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportNames.java
231 231

  
232 232
        //---TAXON---
233 233
        TaxonBase taxonBase = null;
234
        if(gueltString.equals("1")){
234
        if(gueltString.equals("1") || (name.getAppendedPhrase()!=null && name.getAppendedPhrase().equals("auct."))){
235 235
            taxonBase = Taxon.NewInstance(name, null);
236 236
        }
237 237
        else if(gueltString.equals("x") || gueltString.equals("b")){

Also available in: Unified diff