Project

General

Profile

« Previous | Next » 

Revision b0b44252

Added by Andreas Müller almost 6 years ago

ref #6752 stricter use of verbatimDate in cdmlib-app

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/mexico/MexicoConabioTaxonImport.java
30 30
import eu.etaxonomy.cdm.model.common.Extension;
31 31
import eu.etaxonomy.cdm.model.common.ExtensionType;
32 32
import eu.etaxonomy.cdm.model.common.Language;
33
import eu.etaxonomy.cdm.model.common.TimePeriod;
33
import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
34 34
import eu.etaxonomy.cdm.model.name.IBotanicalName;
35 35
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
36 36
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
......
159 159
        Reference result = state.getReference(secRefStr);
160 160
        if (result == null && secRefStr != null){
161 161
            result = ReferenceFactory.newBook();
162
            TimePeriod tp = TimePeriodParser.parseString(secRefStr.substring(secRefStr.length()-4));
162
            VerbatimTimePeriod tp = TimePeriodParser.parseStringVerbatim(secRefStr.substring(secRefStr.length()-4));
163 163
            String authorStrPart = secRefStr.substring(0, secRefStr.length()-6);
164 164
            if (! (authorStrPart + ", " + tp.getYear()).equals(secRefStr)){
165 165
                logger.warn(line + "Sec ref could not be parsed: " + secRefStr);
......
303 303
     * @param state
304 304
     */
305 305
    private void addSourcesToReferences(IBotanicalName name, SimpleExcelTaxonImportState<CONFIG> state) {
306
        Reference nomRef = (Reference)name.getNomenclaturalReference();
306
        Reference nomRef = name.getNomenclaturalReference();
307 307
        if (nomRef != null){
308 308
            nomRef.addSource(makeOriginalSource(state));
309 309
            if (nomRef.getInReference() != null){

Also available in: Unified diff