public abstract class ExcelImportBase<STATE extends ExcelImportState<CONFIG,ROW>,CONFIG extends ExcelImportConfiguratorBase,ROW extends ExcelRowBase> extends CdmImportBase<CONFIG,STATE>
CdmImportBase.TermMatchMode
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
SCIENTIFIC_NAME_COLUMN |
CREATE, IMAGE_GALLERY, READ_MEDIA_DATA, uuidUserDefinedAnnotationTypeVocabulary, uuidUserDefinedExtensionTypeVocabulary, uuidUserDefinedFeatureVocabulary, uuidUserDefinedIdentifierTypeVocabulary, uuidUserDefinedKindOfUnitVocabulary, uuidUserDefinedLanguageVocabulary, uuidUserDefinedMarkerTypeVocabulary, uuidUserDefinedMeasurementUnitVocabulary, uuidUserDefinedModifierVocabulary, uuidUserDefinedNamedAreaLevelVocabulary, uuidUserDefinedNamedAreaVocabulary, uuidUserDefinedNomenclaturalStatusTypeVocabulary, uuidUserDefinedPresenceAbsenceVocabulary, uuidUserDefinedRankVocabulary, uuidUserDefinedReferenceSystemVocabulary, uuidUserDefinedStateVocabulary, uuidUserDefinedStatisticalMeasureVocabulary, uuidUserDefinedTaxonRelationshipTypeVocabulary
INCLUDE_UNPUBLISHED, ioName, NO_UNPUBLISHED
applicationContext
FEATURE_STORE, NOMREF_STORE, REFERENCE_STORE, SPECIMEN_STORE, TAXON_STORE, TAXONNAME_STORE, TEAM_STORE
Constructor and Description |
---|
ExcelImportBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
analyzeRecord(java.util.Map<java.lang.String,java.lang.String> record,
STATE state) |
protected boolean |
doCheck(STATE state) |
protected void |
doInvoke(STATE state)
Reads data from an Excel file and stores them into a CDM DB.
|
protected abstract void |
firstPass(STATE state) |
protected java.lang.String |
floatString2IntStringValue(java.lang.String value) |
protected int |
floatString2IntValue(java.lang.String value) |
ExcelImportConfiguratorBase |
getConfigurator() |
protected Reference |
getSourceReference(STATE state)
Non transaction save method to retrieve the source reference
if either existent or not in the database (uses check for uuid).
|
protected <T extends TaxonBase<?>> |
getTaxonByCdmId(STATE state,
java.lang.String colTaxonUuid,
java.lang.String colNameCache,
java.lang.String colNameTitleCache,
java.lang.String colTaxonTitleCache,
java.lang.Class<T> clazz,
java.lang.String line)
Returns the taxon for the given CDM uuid.
|
protected TimePeriod |
getTimePeriod(java.lang.String start,
java.lang.String end) |
protected static java.lang.String |
getValue(java.util.Map<java.lang.String,java.lang.String> record,
java.lang.String originalKey)
Returns the value of the record map for the given key.
|
protected java.lang.String |
getWorksheetName(CONFIG config)
To define a worksheet name other then the one defined in the configurator
override this method with a non
null return value. |
protected boolean |
needsNomenclaturalCode() |
protected abstract void |
secondPass(STATE state) |
protected void |
verifyName(STATE state,
java.lang.String colNameCache,
java.lang.String colNameTitleCache,
java.lang.String colTaxonTitleCache,
java.lang.String line,
java.util.Map<java.lang.String,java.lang.String> record,
TaxonBase<?> result) |
addOriginalSource, addOriginalSource, doubleFromString, fillMissingEpithets, fillMissingEpithetsForTaxa, getAcceptedTaxon, getAnnotationType, getByteArray, getDefaultResult, getDefaultTaxonDescription, getExtensionType, getExtensionType, getFeature, getFeature, getFeaturePlaceholder, getIdentiferType, getImageMedia, getImageMedia, getImageMedia, getKindOfUnit, getLanguage, getLanguage, getMarkedTaxonDescription, getMarkerType, getMarkerType, getMarkerType, getMarkerType, getMeasurementUnit, getModifier, getNamedArea, getNamedArea, getNamedArea, getNamedAreaLevel, getNoDataResult, getNomenclaturalStatusType, getPresenceTerm, getPresenceTerm, getRank, getReferenceSystem, getSpecimenDescription, getSpecimenDescription, getStateTerm, getStateTerm, getStatisticalMeasure, getTaxonDescription, getTaxonDescription, getTaxonNameDescription, getTaxonNameDescription, getTaxonRelationshipType, getVocabulary, intFromString, makeTree, makeTreeMemSave, NB, nullSafeBoolean, nullSafeDouble, nullSafeFloat, nullSafeInt, parseAuthorString, saveNameRelations
addObserver, addObservers, check, commitTransaction, countObservers, countSteps, fire, fireProgressEvent, fireWarningEvent, fireWarningEvent, getInstance, getObservers, getSuccessString, invoke, isBlank, isIgnore, isNotBlank, removeObserver, removeObservers, rollbackTransaction, startTransaction, startTransaction, updateProgress, updateProgress, warnProgress
authenticate, clearSession, getAgentService, getAmplificationService, getAnnotationService, getAuthenticationManager, getBean, getClassificationService, getCollectionService, getCommonService, getDatabaseService, getDescriptionService, getDescriptiveDataSetService, getEntityConstraintViolationService, getEntityValidationService, getEventBaseService, getFeatureNodeService, getFeatureTreeService, getGrantedAuthorityService, getGroupService, getIdentificationKeyService, getLocationService, getLongRunningTasksService, getMediaService, getMetadataService, getNameService, getOccurrenceService, getPermissionEvaluator, getPolytomousKeyNodeService, getPolytomousKeyService, getPreferenceService, getPrimerService, getProgressMonitorService, getReferenceService, getRegistrationService, getRightsService, getSequenceService, getSession, getSessionFactory, getTaxonNodeService, getTaxonService, getTermNodeService, getTermService, getTermTreeService, getTransactionManager, getUserService, getVocabularyService, NewConversation, setApplicationContext, setDataSource, setSessionFactory, setTransactionManager
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invoke
check, countSteps, fire, updateProgress, updateProgress, warnProgress
addObserver, addObservers, countObservers, getObservers, removeObserver, removeObservers
protected static final java.lang.String SCIENTIFIC_NAME_COLUMN
protected void doInvoke(STATE state)
doInvoke
in class CdmIoBase<STATE extends ExcelImportState<CONFIG,ROW>,ImportResult>
config
- stores
- (not used)protected boolean needsNomenclaturalCode()
protected java.lang.String getWorksheetName(CONFIG config)
null
return value.
If null
is returned the first worksheet is taken.null if no worksheet is defined.
protected boolean doCheck(STATE state)
doCheck
in class CdmIoBase<STATE extends ExcelImportState<CONFIG,ROW>,ImportResult>
protected abstract void analyzeRecord(java.util.Map<java.lang.String,java.lang.String> record, STATE state)
record
- protected abstract void firstPass(STATE state)
protected abstract void secondPass(STATE state)
public ExcelImportConfiguratorBase getConfigurator()
protected int floatString2IntValue(java.lang.String value)
protected java.lang.String floatString2IntStringValue(java.lang.String value)
protected TimePeriod getTimePeriod(java.lang.String start, java.lang.String end)
start
- end
- protected static java.lang.String getValue(java.util.Map<java.lang.String,java.lang.String> record, java.lang.String originalKey)
null
.record
- originalKey
- protected <T extends TaxonBase<?>> T getTaxonByCdmId(STATE state, java.lang.String colTaxonUuid, java.lang.String colNameCache, java.lang.String colNameTitleCache, java.lang.String colTaxonTitleCache, java.lang.Class<T> clazz, java.lang.String line)
state
- colTaxonUuid
- taxon uuid columncolNameCache
- name cache column (if exists)colNameTitleCache
- name title cache column (if exists)colTaxonTitleCache
- taxon title cache column (if exists)clazz
- the clazz nullline
- the row, for debug informationprotected void verifyName(STATE state, java.lang.String colNameCache, java.lang.String colNameTitleCache, java.lang.String colTaxonTitleCache, java.lang.String line, java.util.Map<java.lang.String,java.lang.String> record, TaxonBase<?> result)
Copyright © 2007-2020 EDIT. All Rights Reserved.