Project

General

Profile

« Previous | Next » 

Revision 86536e03

Added by Andreas Müller almost 7 years ago

fix #6368 rename table and class TaxonNameBase in app-import

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/bogota/BogotaChecklistTaxonImport.java
22 22
import eu.etaxonomy.cdm.io.mexico.SimpleExcelTaxonImportState;
23 23
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
24 24
import eu.etaxonomy.cdm.model.common.Language;
25
import eu.etaxonomy.cdm.model.name.BotanicalName;
25
import eu.etaxonomy.cdm.model.name.IBotanicalName;
26 26
import eu.etaxonomy.cdm.model.name.Rank;
27 27
import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
28 28
import eu.etaxonomy.cdm.model.reference.Reference;
......
175 175
        }else{
176 176
            nameStr = nameStr.replace(auctStr, "").trim();
177 177
        }
178
        BotanicalName name = (BotanicalName)parser.parseFullName(nameStr, state.getConfig().getNomenclaturalCode(), rank);
178
        IBotanicalName name = (IBotanicalName)parser.parseFullName(nameStr, state.getConfig().getNomenclaturalCode(), rank);
179 179
        name.addImportSource(noStr, getNamespace(), getSourceCitation(state), null);
180 180
        name = deduplicationHelper.getExistingName(state, name);
181 181
        if (name.isProtectedTitleCache()){
......
211 211
    private void handleSingleSynonym(SimpleExcelTaxonImportState<CONFIG> state, String nameStr,
212 212
            String line, Taxon taxon, String noStr) {
213 213
        Rank rank = Rank.SPECIES();
214
        BotanicalName name = (BotanicalName)parser.parseFullName(nameStr, state.getConfig().getNomenclaturalCode(), rank);
214
        IBotanicalName name = (IBotanicalName)parser.parseFullName(nameStr, state.getConfig().getNomenclaturalCode(), rank);
215 215
        name.addImportSource(noStr, getNamespace(), getSourceCitation(state), null);
216 216
        name = deduplicationHelper.getExistingName(state, name);
217 217
        if (name.isProtectedTitleCache()){
......
242 242
                    split = split.replace(" None", "").trim();
243 243
                }
244 244
                Rank rank = Rank.SUBSPECIES();
245
                BotanicalName name = (BotanicalName)parser.parseFullName(split.trim(), state.getConfig().getNomenclaturalCode(), rank);
245
                IBotanicalName name = (IBotanicalName)parser.parseFullName(split.trim(), state.getConfig().getNomenclaturalCode(), rank);
246 246
                name.addImportSource(noStr, getNamespace(), getSourceCitation(state), null);
247 247
                name = deduplicationHelper.getExistingName(state, name);
248 248
                if (name.isProtectedTitleCache()){
......
279 279

  
280 280
        nameStr = CdmUtils.concat(" ", nameStr, speciesAuthorStr);
281 281
        Rank rank = Rank.SPECIES();
282
        BotanicalName name = (BotanicalName)parser.parseFullName(nameStr, state.getConfig().getNomenclaturalCode(), rank);
282
        IBotanicalName name = (IBotanicalName)parser.parseFullName(nameStr, state.getConfig().getNomenclaturalCode(), rank);
283 283
        name.addImportSource(noStr, getNamespace(), getSourceCitation(state), null);
284 284
        name = deduplicationHelper.getExistingName(state, name);
285 285
        if (name.isProtectedTitleCache()){
......
336 336
        if (family != null){
337 337
            familyNode = family.getTaxonNodes().iterator().next();
338 338
        }else{
339
            BotanicalName name = makeFamilyName(state, familyStr);
339
            IBotanicalName name = makeFamilyName(state, familyStr);
340 340
            Reference sec = getSecReference(state);
341 341
            family = Taxon.NewInstance(name, sec);
342 342

  
......
360 360
            classification.setUuid(state.getConfig().getClassificationUuid());
361 361
            classification.getRootNode().setUuid(rootUuid);
362 362

  
363
            BotanicalName plantaeName = TaxonNameFactory.NewBotanicalInstance(Rank.KINGDOM());
363
            IBotanicalName plantaeName = TaxonNameFactory.NewBotanicalInstance(Rank.KINGDOM());
364 364
            plantaeName.setGenusOrUninomial("Plantae");
365 365
            Taxon plantae = Taxon.NewInstance(plantaeName, sec);
366 366
            TaxonNode plantaeNode = classification.addChildTaxon(plantae, null, null);
......
373 373
    }
374 374

  
375 375

  
376
    protected BotanicalName makeFamilyName(SimpleExcelTaxonImportState<CONFIG> state, String famStr) {
377
        BotanicalName name = TaxonNameFactory.NewBotanicalInstance(Rank.FAMILY());
376
    protected IBotanicalName makeFamilyName(SimpleExcelTaxonImportState<CONFIG> state, String famStr) {
377
        IBotanicalName name = TaxonNameFactory.NewBotanicalInstance(Rank.FAMILY());
378 378
        famStr = decapitalize(famStr);
379 379
        name.setGenusOrUninomial(famStr);
380 380
        name.addSource(makeOriginalSource(state));
......
431 431
     */
432 432
    private TaxonNode makeGenusNode(SimpleExcelTaxonImportState<CONFIG> state,
433 433
            HashMap<String, String> record, String genusStr) {
434
        BotanicalName name = TaxonNameFactory.NewBotanicalInstance(Rank.GENUS());
434
        IBotanicalName name = TaxonNameFactory.NewBotanicalInstance(Rank.GENUS());
435 435
        name.setGenusOrUninomial(genusStr);
436 436
        Taxon genus = Taxon.NewInstance(name, getSecReference(state));
437 437
        TaxonNode family = getFamilyTaxon(record, state);

Also available in: Unified diff