@Component @Scope(value="prototype") public class SpeciesImportTask extends ReferenceDataImportTask<ParsingError>
| Constructor and Description |
|---|
SpeciesImportTask() |
addParsingError, addParsingError, addProcessedRow, getErrors, getProcessedRows, getRowsInError, getSkippedRows, hasErrors, isRowInError, isRowProcessedbeforeExecuteInternal, countTotalItems, getProcessedItems, getProgressPercent, getRemainingItems, getSkippedItems, getTotalItems, incrementProcessedItems, incrementSkippedItems, setProcessedItems, setTotalItemsabort, addStatusChangeListener, afterExecute, afterExecuteInternal, beforeExecute, changeStatus, createInternalVariables, destroy, getDuration, getEndTime, getErrorMessage, getErrorMessageArgs, getId, getLastException, getName, getStartTime, getStatus, getWeight, initialize, isAborted, isCompleted, isEnded, isFailed, isPending, isRunning, logDebug, logError, logInfo, logWarning, notifyAllStatusChangeListeners, onAborted, onCompleted, onEnd, onFailed, release, removeStatusChangeListener, run, setErrorMessage, setErrorMessageArgs, setLastException, setWeight, waitForprotected void initializeInternalVariables()
throws Throwable
initializeInternalVariables in class org.openforis.concurrency.WorkerThrowableprotected void validateInput()
throws Throwable
validateInput in class org.openforis.concurrency.WorkerThrowableprotected void execute()
throws Throwable
execute in class org.openforis.concurrency.WorkerThrowableprotected void parseTaxonCSVLines(File file)
protected void processLines()
protected boolean processLine(SpeciesLine line, Taxon.TaxonRank rank) throws ParsingException
ParsingExceptionprotected void processVernacularNames(SpeciesLine line, Taxon taxon)
protected void persistTaxa()
throws SurveyStoreException
SurveyStoreExceptionprotected Taxon createTaxonFamily(SpeciesLine line) throws ParsingException
ParsingExceptionprotected Taxon createTaxonGenus(SpeciesLine line) throws ParsingException
ParsingExceptionprotected Taxon createTaxonSpecies(SpeciesLine line) throws ParsingException
ParsingExceptionprotected Taxon createTaxon(SpeciesLine line, Taxon.TaxonRank rank, Taxon parent) throws ParsingException
ParsingExceptionprotected Taxon createTaxon(SpeciesLine line, Taxon.TaxonRank rank, Taxon parent, String normalizedScientificName) throws ParsingException
ParsingExceptionprotected void checkDuplicates(SpeciesLine line, String code, Integer taxonId) throws ParsingException
ParsingExceptionprotected void checkDuplicateScientificName(SpeciesLine line, Taxon parent, String normalizedScientificName) throws ParsingException
ParsingExceptionprotected void throwDuplicateRowParsingException(SpeciesLine line, SpeciesFileColumn column, TaxonTree.Node foundNode) throws ParsingException
ParsingExceptionpublic void setSpeciesManager(SpeciesManager speciesManager)
public void setSurveyManager(SurveyManager surveyManager)
public void setSurvey(CollectSurvey survey)
public void setTaxonomyId(int taxonomyId)
public void setFile(File file)
public void setCsvFileOptions(CSVFileOptions csvFileOptions)
public void setOverwriteAll(boolean overwriteAll)
Copyright © 2022 Open Foris. All rights reserved.