public abstract class SpecimenImportBase<CONFIG extends IImportConfigurator,STATE extends SpecimenImportStateBase> extends CdmImportBase<CONFIG,STATE>
CdmImportBase.TermMatchMode
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,DefinedTerm> |
kindOfUnitsMap |
protected static java.util.UUID |
SPECIMEN_SCAN_TERM |
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 |
---|
SpecimenImportBase() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParentTaxon(Taxon taxon,
STATE state,
boolean preferredFlag,
Classification classification)
Add the hierarchy for a Taxon(add higher taxa)
|
protected void |
addTaxonNode(Taxon taxon,
STATE state,
boolean preferredFlag) |
protected void |
addToSourceMap(java.util.Map<java.lang.String,OriginalSourceBase<?>> sourceMap,
java.util.Set<OriginalSourceBase> osbSet) |
protected abstract void |
doInvoke(STATE state)
invoke method to be implemented by implementing classes
|
protected SpecimenOrObservationBase |
findExistingSpecimen(java.lang.String unitId,
SpecimenImportStateBase state) |
protected TaxonName |
getBestMatchingName(java.lang.String scientificName,
java.util.Collection<TaxonName> names,
STATE state) |
protected Collection |
getCollection(Institution institution,
java.lang.String collectionCode,
STATE state)
Look if the Collection does already exist
|
protected DerivedUnitFacade |
getFacade(STATE state)
getFacade : get the DerivedUnitFacade based on the recordBasis
|
protected IdentifiableSource |
getIdentifiableSource(Reference reference,
java.lang.String citationDetail) |
protected Institution |
getInstitution(java.lang.String institutionCode,
STATE state)
Look if the Institution does already exist
|
protected Taxon |
getOrCreateTaxonForName(TaxonName taxonName,
STATE state) |
protected TaxonName |
getOrCreateTaxonName(java.lang.String scientificName,
Rank rank,
boolean preferredFlag,
STATE state,
int unitIndexInAbcdFile) |
protected void |
handleIdentifications(STATE state,
DerivedUnitFacade derivedUnitFacade)
HandleIdentifications : get the scientific names present in the ABCD
document and store link them with the observation/specimen data
|
protected abstract void |
handleSingleUnit(STATE state,
java.lang.Object item)
Handle a single unit
|
protected abstract void |
importAssociatedUnits(STATE state,
java.lang.Object item,
DerivedUnitFacade derivedUnitFacade) |
protected void |
linkDeterminationEvent(STATE state,
Taxon taxon,
boolean preferredFlag,
DerivedUnitFacade derivedFacade,
java.lang.String identifierStr,
java.lang.String dateStr,
java.lang.String modifier)
join DeterminationEvent to the Taxon Object
|
protected Taxon |
linkParentChildNode(Taxon parent,
Taxon child,
Classification classification,
STATE state)
Link a parent to a child and save it in the current classification
|
protected void |
makeIndividualsAssociation(STATE state,
Taxon taxon,
DeterminationEvent determinationEvent)
create and link each association (specimen, observation..) to the accepted taxon
|
protected TaxonName |
parseScientificName(java.lang.String scientificName,
STATE state,
SpecimenImportReport report,
Rank rank)
Parse automatically the scientific name
|
protected java.util.UUID |
save(CdmBase cdmBase,
SpecimenImportStateBase state)
Very fast and dirty implementation to allow handling of transient objects as described in
https://dev.e-taxonomy.eu/trac/ticket/3726
Not yet complete.
|
protected TaxonName |
setTaxonNameByType(java.util.HashMap<java.lang.String,java.lang.String> atomisedMap,
java.lang.String fullName,
STATE state)
Create the name without automatic parsing, either because it failed, or because the user deactivated it.
|
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, doCheck, 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.util.UUID SPECIMEN_SCAN_TERM
protected java.util.Map<java.lang.String,DefinedTerm> kindOfUnitsMap
protected abstract void doInvoke(STATE state)
CdmIoBase
doInvoke
in class CdmIoBase<STATE extends SpecimenImportStateBase,ImportResult>
protected abstract void handleSingleUnit(STATE state, java.lang.Object item)
state
- item
- protected TaxonName getOrCreateTaxonName(java.lang.String scientificName, Rank rank, boolean preferredFlag, STATE state, int unitIndexInAbcdFile)
protected TaxonName getBestMatchingName(java.lang.String scientificName, java.util.Collection<TaxonName> names, STATE state)
protected TaxonName parseScientificName(java.lang.String scientificName, STATE state, SpecimenImportReport report, Rank rank)
scientificName
- the scientific name to parsestate
- the current import statereport
- the import reportprotected TaxonName setTaxonNameByType(java.util.HashMap<java.lang.String,java.lang.String> atomisedMap, java.lang.String fullName, STATE state)
atomisedMap
- : the ABCD atomised fieldsfullName
- : the full scientific namestate
- protected java.util.UUID save(CdmBase cdmBase, SpecimenImportStateBase state)
cdmBase
- state
- protected SpecimenOrObservationBase findExistingSpecimen(java.lang.String unitId, SpecimenImportStateBase state)
protected abstract void importAssociatedUnits(STATE state, java.lang.Object item, DerivedUnitFacade derivedUnitFacade)
protected DerivedUnitFacade getFacade(STATE state)
state
- protected Institution getInstitution(java.lang.String institutionCode, STATE state)
institutionCode:
- a string with the institutioncodeconfig
- : the configuratorprotected Collection getCollection(Institution institution, java.lang.String collectionCode, STATE state)
collectionCode
- collectionCode:
- a stringconfig
- : the configuratorprotected IdentifiableSource getIdentifiableSource(Reference reference, java.lang.String citationDetail)
reference
- citationDetail
- protected void addParentTaxon(Taxon taxon, STATE state, boolean preferredFlag, Classification classification)
classification
- taxon:
- a taxon to add as a nodestate:
- the ABCD import stateprotected Taxon linkParentChildNode(Taxon parent, Taxon child, Classification classification, STATE state)
parent:
- the higher Taxonchild
- : the lower (or current) Taxon
return the Taxon from the new created Nodeclassification
- state
- protected void handleIdentifications(STATE state, DerivedUnitFacade derivedUnitFacade)
state:
- the current ABCD import statederivedUnitFacade
- : the current derivedunitfacadeprotected void addTaxonNode(Taxon taxon, STATE state, boolean preferredFlag)
taxon
- : a taxon to add as a nodestate
- : the ABCD import stateprotected void linkDeterminationEvent(STATE state, Taxon taxon, boolean preferredFlag, DerivedUnitFacade derivedFacade, java.lang.String identifierStr, java.lang.String dateStr, java.lang.String modifier)
state
- : the ABCD import statetaxon:
- the current TaxonpreferredFlag
- :if the current name is preferredderivedFacade
- : the derived Unit Facadeprotected void makeIndividualsAssociation(STATE state, Taxon taxon, DeterminationEvent determinationEvent)
state
- : the ABCD import statetaxon:
- the current TaxondeterminationEvent:the
- determinationeventprotected void addToSourceMap(java.util.Map<java.lang.String,OriginalSourceBase<?>> sourceMap, java.util.Set<OriginalSourceBase> osbSet)
sourceMap
- osbSet
- Copyright © 2007-2020 EDIT. All Rights Reserved.