public abstract class CdmImportBase<CONFIG extends IImportConfigurator,STATE extends ImportStateBase> extends CdmIoBase<STATE,ImportResult> implements ICdmImport<CONFIG,STATE>
Modifier and Type | Class and Description |
---|---|
static class |
CdmImportBase.TermMatchMode |
INCLUDE_UNPUBLISHED, ioName, NO_UNPUBLISHED
applicationContext
FEATURE_STORE, NOMREF_STORE, REFERENCE_STORE, SPECIMEN_STORE, TAXON_STORE, TAXONNAME_STORE, TEAM_STORE
Constructor and Description |
---|
CdmImportBase() |
Modifier and Type | Method and Description |
---|---|
void |
addOriginalSource(ICdmBase cdmBase,
java.lang.Object idAttributeValue,
java.lang.String namespace,
Reference citation)
Adds an orginal source to a sourceable objects (implemented for Identifiable entity and description element.
|
void |
addOriginalSource(java.sql.ResultSet rs,
CdmBase cdmBase,
java.lang.String dbIdAttribute,
java.lang.String namespace,
Reference citation) |
protected java.lang.Double |
doubleFromString(STATE state,
java.lang.String strToConvert,
java.lang.String recordLocation,
java.lang.String attributeName)
Converts a given string into a
Double . |
protected void |
fillMissingEpithets(INonViralName parentName,
INonViralName childName)
If the child name is missing genus or species epithet information and the rank is below genus
or species respectively the according epithets are taken from the parent name.
|
protected void |
fillMissingEpithetsForTaxa(Taxon parentTaxon,
Taxon childTaxon)
If the child taxon is missing genus or species epithet information and the rank is below genus
or species respectively the according epithets are taken from the parent taxon.
|
protected Taxon |
getAcceptedTaxon(TaxonBase<?> taxonBase)
Returns the accepted taxon of a
taxon base . |
protected AnnotationType |
getAnnotationType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
TermVocabulary<AnnotationType> voc) |
byte[] |
getByteArray() |
protected ImportResult |
getDefaultResult(STATE state) |
TaxonDescription |
getDefaultTaxonDescription(Taxon taxon,
boolean isImageGallery,
boolean createNewIfNotExists,
Reference source)
Returns the default taxon description.
|
protected ExtensionType |
getExtensionType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev) |
protected ExtensionType |
getExtensionType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
TermVocabulary<ExtensionType> voc) |
protected Feature |
getFeature(STATE state,
java.util.UUID uuid)
Returns a feature if it exists, null otherwise.
|
protected Feature |
getFeature(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
TermVocabulary<Feature> voc)
Returns a feature for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the feature exists in the database, if not creating it anew (with vocabulary etc.).
|
protected TextData |
getFeaturePlaceholder(STATE state,
DescriptionBase<?> description,
Feature feature,
boolean createIfNotExists)
Returns the textdata that holds general information about a feature for a taxon description.
|
protected DefinedTerm |
getIdentiferType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
TermVocabulary<DefinedTerm> voc) |
protected Media |
getImageMedia(java.lang.String uriString,
boolean readMediaData) |
protected Media |
getImageMedia(java.lang.String uriString,
java.lang.String uriStrThumb,
boolean readMediaData)
Creates
|
protected Media |
getImageMedia(java.lang.String uriString,
java.lang.String mediumUriString,
java.lang.String uriStrThumb,
boolean readMediaData) |
protected DefinedTerm |
getKindOfUnit(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
TermVocabulary<DefinedTerm> voc) |
protected Language |
getLanguage(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev)
Returns a language for a given uuid by first ...
|
protected Language |
getLanguage(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
TermVocabulary voc) |
TaxonDescription |
getMarkedTaxonDescription(Taxon taxon,
MarkerType markerType,
boolean isImageGallery,
boolean createNewIfNotExists,
Reference source,
java.lang.String title)
Returns the taxon description with marked as
true with the given marker type. |
protected MarkerType |
getMarkerType(STATE state,
java.lang.String keyString) |
protected MarkerType |
getMarkerType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev) |
protected MarkerType |
getMarkerType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
TermVocabulary<MarkerType> voc) |
protected MarkerType |
getMarkerType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
TermVocabulary<MarkerType> voc,
Language language) |
protected MeasurementUnit |
getMeasurementUnit(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
TermVocabulary<MeasurementUnit> voc)
Returns a
MeasurementUnit for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the MeasurementUnit exists in the database, if not creating it anew (with vocabulary etc.). |
protected DefinedTerm |
getModifier(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
TermVocabulary<DefinedTerm> voc)
Returns a
Modifier for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the Modifier exists in the database, if not creating it anew (with vocabulary etc.). |
protected NamedArea |
getNamedArea(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
NamedAreaType areaType,
NamedAreaLevel level)
Returns a named area for a given uuid by first .
|
protected NamedArea |
getNamedArea(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
NamedAreaType areaType,
NamedAreaLevel level,
TermVocabulary<?> voc,
CdmImportBase.TermMatchMode matchMode) |
protected NamedArea |
getNamedArea(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
NamedAreaType areaType,
NamedAreaLevel level,
TermVocabulary voc,
CdmImportBase.TermMatchMode matchMode,
java.util.List<TermVocabulary<NamedArea>> vocabularyPreference) |
protected NamedAreaLevel |
getNamedAreaLevel(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
TermVocabulary<NamedAreaLevel> voc) |
protected ImportResult |
getNoDataResult(STATE state) |
protected NomenclaturalStatusType |
getNomenclaturalStatusType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
Language language,
TermVocabulary<NomenclaturalStatusType> voc)
Returns a
nomenclatural status type for a given uuid by first
checking if the uuid has already been used in this import, if not
checking if the status type exists in the database, if not creating it anew (with vocabulary etc.). |
protected PresenceAbsenceTerm |
getPresenceTerm(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
boolean isAbsenceTerm) |
protected PresenceAbsenceTerm |
getPresenceTerm(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
boolean isAbsenceTerm,
TermVocabulary<PresenceAbsenceTerm> voc)
Returns a presence term for a given uuid by first ...
|
protected Rank |
getRank(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
OrderedTermVocabulary<Rank> voc,
Rank lowerRank,
RankClass rankClass) |
protected ReferenceSystem |
getReferenceSystem(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
TermVocabulary voc) |
SpecimenDescription |
getSpecimenDescription(SpecimenOrObservationBase specimen,
boolean isImageGallery,
boolean createNewIfNotExists)
Returns the
specimen description for a specimen or observation . |
SpecimenDescription |
getSpecimenDescription(SpecimenOrObservationBase specimen,
Reference ref,
boolean isImageGallery,
boolean createNewIfNotExists)
Like
getSpecimenDescription(SpecimenOrObservationBase, boolean, boolean)
Only matches a description if the given reference is a source of the description.If a new description is created the given reference will be added as a source. |
protected State |
getStateTerm(STATE state,
java.util.UUID uuid)
Returns a
State if it exists. |
protected State |
getStateTerm(STATE importState,
java.util.UUID uuid,
java.lang.String label,
java.lang.String text,
java.lang.String labelAbbrev,
OrderedTermVocabulary<State> voc)
Returns a
State for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the state exists in the database, if not creating it anew (with vocabulary etc.). |
protected StatisticalMeasure |
getStatisticalMeasure(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
TermVocabulary<StatisticalMeasure> voc)
Returns a
StatisticalMeasure for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the StatisticalMeasure exists in the database, if not creating it anew (with vocabulary etc.). |
TaxonDescription |
getTaxonDescription(Taxon taxon,
boolean isImageGallery,
boolean createNewIfNotExists)
Returns the taxon description for a taxon.
|
TaxonDescription |
getTaxonDescription(Taxon taxon,
Reference ref,
boolean isImageGallery,
boolean createNewIfNotExists)
Like
getTaxonDescription(Taxon, boolean, boolean)
Only matches a description if the given reference is a source of the description.If a new description is created the given reference will be added as a source. |
TaxonNameDescription |
getTaxonNameDescription(TaxonName name,
boolean isImageGallery,
boolean createNewIfNotExists)
Returns the taxon description for a taxon.
|
TaxonNameDescription |
getTaxonNameDescription(TaxonName name,
Reference ref,
boolean isImageGallery,
boolean createNewIfNotExists)
Like
getTaxonDescription(Taxon, boolean, boolean)
Only matches a description if the given reference is a source of the description.If a new description is created the given reference will be added as a source. |
TaxonRelationshipType |
getTaxonRelationshipType(STATE state,
java.util.UUID uuid,
java.lang.String label,
java.lang.String description,
java.lang.String labelAbbrev,
java.lang.String reverseLabel,
java.lang.String reverseDescription,
java.lang.String reverseAbbrev,
TermVocabulary<TaxonRelationshipType> voc)
Returns a taxon relationship type for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the taxon relationship type exists in the database, if not creating it anew (with vocabulary etc.).
|
protected <T extends DefinedTermBase> |
getVocabulary(STATE state,
TermType termType,
java.util.UUID uuid,
java.lang.String description,
java.lang.String label,
java.lang.String abbrev,
java.net.URI termSourceUri,
boolean isOrdered,
T type) |
protected java.lang.Integer |
intFromString(STATE state,
java.lang.String strToConvert,
java.lang.String recordLocation,
java.lang.String attributeName)
Converts a given string into an integer.
|
protected Classification |
makeTree(STATE state,
Reference reference) |
protected Classification |
makeTreeMemSave(STATE state,
Reference ref)
Alternative memory saving method variant of
#makeTree(STATE state, Reference ref) which stores only the
UUID instead of the full tree in the ImportStateBase by
using state.putTreeUuid(ref, tree); |
protected java.lang.String |
NB(java.lang.String str)
Returns
null for all blank strings. |
protected java.lang.Boolean |
nullSafeBoolean(java.sql.ResultSet rs,
java.lang.String columnName) |
protected java.lang.Double |
nullSafeDouble(java.sql.ResultSet rs,
java.lang.String columnName) |
protected java.lang.Float |
nullSafeFloat(java.sql.ResultSet rs,
java.lang.String columnName) |
protected java.lang.Integer |
nullSafeInt(java.sql.ResultSet rs,
java.lang.String columnName)
Retrieves an Integer value from a result set.
|
static TeamOrPersonBase<?> |
parseAuthorString(java.lang.String authorName) |
protected void |
saveNameRelations(TaxonName name)
Saves name relations.
|
addObserver, addObservers, check, commitTransaction, countObservers, countSteps, doCheck, doInvoke, 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 boolean CREATE
protected static final boolean IMAGE_GALLERY
protected static final boolean READ_MEDIA_DATA
public static final java.util.UUID uuidUserDefinedNamedAreaLevelVocabulary
public static final java.util.UUID uuidUserDefinedNamedAreaVocabulary
public static final java.util.UUID uuidUserDefinedExtensionTypeVocabulary
public static final java.util.UUID uuidUserDefinedIdentifierTypeVocabulary
public static final java.util.UUID uuidUserDefinedReferenceSystemVocabulary
public static final java.util.UUID uuidUserDefinedFeatureVocabulary
public static final java.util.UUID uuidUserDefinedMeasurementUnitVocabulary
public static final java.util.UUID uuidUserDefinedStatisticalMeasureVocabulary
public static final java.util.UUID uuidUserDefinedStateVocabulary
public static final java.util.UUID uuidUserDefinedTaxonRelationshipTypeVocabulary
public static final java.util.UUID uuidUserDefinedAnnotationTypeVocabulary
public static final java.util.UUID uuidUserDefinedMarkerTypeVocabulary
public static final java.util.UUID uuidUserDefinedRankVocabulary
public static final java.util.UUID uuidUserDefinedPresenceAbsenceVocabulary
public static final java.util.UUID uuidUserDefinedModifierVocabulary
public static final java.util.UUID uuidUserDefinedKindOfUnitVocabulary
public static final java.util.UUID uuidUserDefinedLanguageVocabulary
public static final java.util.UUID uuidUserDefinedNomenclaturalStatusTypeVocabulary
protected ImportResult getNoDataResult(STATE state)
getNoDataResult
in class CdmIoBase<STATE extends ImportStateBase,ImportResult>
protected ImportResult getDefaultResult(STATE state)
getDefaultResult
in class CdmIoBase<STATE extends ImportStateBase,ImportResult>
protected Classification makeTree(STATE state, Reference reference)
protected Classification makeTreeMemSave(STATE state, Reference ref)
#makeTree(STATE state, Reference ref)
which stores only the
UUID instead of the full tree in the ImportStateBase
by
using state.putTreeUuid(ref, tree);
state
- ref
- protected ExtensionType getExtensionType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev)
protected ExtensionType getExtensionType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, TermVocabulary<ExtensionType> voc)
protected DefinedTerm getIdentiferType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, TermVocabulary<DefinedTerm> voc)
protected MarkerType getMarkerType(STATE state, java.lang.String keyString)
protected MarkerType getMarkerType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev)
protected MarkerType getMarkerType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, TermVocabulary<MarkerType> voc)
protected MarkerType getMarkerType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, TermVocabulary<MarkerType> voc, Language language)
protected AnnotationType getAnnotationType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, TermVocabulary<AnnotationType> voc)
protected ReferenceSystem getReferenceSystem(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, TermVocabulary voc)
protected Rank getRank(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, OrderedTermVocabulary<Rank> voc, Rank lowerRank, RankClass rankClass)
protected NamedArea getNamedArea(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, NamedAreaType areaType, NamedAreaLevel level)
protected NamedArea getNamedArea(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, NamedAreaType areaType, NamedAreaLevel level, TermVocabulary<?> voc, CdmImportBase.TermMatchMode matchMode)
protected NamedArea getNamedArea(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, NamedAreaType areaType, NamedAreaLevel level, TermVocabulary voc, CdmImportBase.TermMatchMode matchMode, java.util.List<TermVocabulary<NamedArea>> vocabularyPreference)
protected NamedAreaLevel getNamedAreaLevel(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, TermVocabulary<NamedAreaLevel> voc)
protected State getStateTerm(STATE state, java.util.UUID uuid)
State
if it exists. null
otherwise.state
- uuid
- State
protected State getStateTerm(STATE importState, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, OrderedTermVocabulary<State> voc)
State
for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the state exists in the database, if not creating it anew (with vocabulary etc.).
If label, text and labelAbbrev are all null
no state is created.importState
- uuid
- label
- text
- labelAbbrev
- voc
- protected Feature getFeature(STATE state, java.util.UUID uuid)
state
- uuid
- getFeature(ImportStateBase, UUID, String, String, String, TermVocabulary)
protected Feature getFeature(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, TermVocabulary<Feature> voc)
null
no feature is created.state
- uuid
- label
- text
- labelAbbrev
- protected NomenclaturalStatusType getNomenclaturalStatusType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, Language language, TermVocabulary<NomenclaturalStatusType> voc)
nomenclatural status type
for a given uuid by first
checking if the uuid has already been used in this import, if not
checking if the status type exists in the database, if not creating it anew (with vocabulary etc.).
If label, text and labelAbbrev are all null
no status type is created.state
- uuid
- label
- text
- language
- labelAbbrev
- protected DefinedTerm getKindOfUnit(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, TermVocabulary<DefinedTerm> voc)
protected MeasurementUnit getMeasurementUnit(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, TermVocabulary<MeasurementUnit> voc)
MeasurementUnit
for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the MeasurementUnit
exists in the database, if not creating it anew (with vocabulary etc.).
If label, text and labelAbbrev are all null
no MeasurementUnit
is created.state
- uuid
- label
- text
- labelAbbrev
- protected StatisticalMeasure getStatisticalMeasure(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, TermVocabulary<StatisticalMeasure> voc)
StatisticalMeasure
for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the StatisticalMeasure
exists in the database, if not creating it anew (with vocabulary etc.).
If label, text and labelAbbrev are all null
no StatisticalMeasure
is created.state
- uuid
- label
- text
- labelAbbrev
- protected DefinedTerm getModifier(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, TermVocabulary<DefinedTerm> voc)
Modifier
for a given uuid by first checking if the uuid has already been used in this import, if not
checking if the Modifier
exists in the database, if not creating it anew (with vocabulary etc.).
If label, text and labelAbbrev are all null
no Modifier
is created.state
- uuid
- label
- text
- labelAbbrev
- public TaxonRelationshipType getTaxonRelationshipType(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String description, java.lang.String labelAbbrev, java.lang.String reverseLabel, java.lang.String reverseDescription, java.lang.String reverseAbbrev, TermVocabulary<TaxonRelationshipType> voc)
null
no taxon relationship type is created.protected PresenceAbsenceTerm getPresenceTerm(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, boolean isAbsenceTerm)
protected PresenceAbsenceTerm getPresenceTerm(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, boolean isAbsenceTerm, TermVocabulary<PresenceAbsenceTerm> voc)
state
- uuid
- label
- text
- labelAbbrev
- protected Language getLanguage(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev)
state
- uuid
- label
- text
- labelAbbrev
- protected Language getLanguage(STATE state, java.util.UUID uuid, java.lang.String label, java.lang.String text, java.lang.String labelAbbrev, TermVocabulary voc)
protected <T extends DefinedTermBase> TermVocabulary<T> getVocabulary(STATE state, TermType termType, java.util.UUID uuid, java.lang.String description, java.lang.String label, java.lang.String abbrev, java.net.URI termSourceUri, boolean isOrdered, T type)
public void addOriginalSource(ICdmBase cdmBase, java.lang.Object idAttributeValue, java.lang.String namespace, Reference citation)
rs
- cdmBase
- dbIdAttribute
- namespace
- citation
- java.sql.SQLException
public void addOriginalSource(java.sql.ResultSet rs, CdmBase cdmBase, java.lang.String dbIdAttribute, java.lang.String namespace, Reference citation) throws java.sql.SQLException
rs
- cdmBase
- dbIdAttribute
- namespace
- citation
- java.sql.SQLException
#addOriginalSource(CdmBase, Object, String, Reference)
protected void fillMissingEpithetsForTaxa(Taxon parentTaxon, Taxon childTaxon)
parentTaxon
- childTaxon
- protected void fillMissingEpithets(INonViralName parentName, INonViralName childName)
parentTaxon
- childTaxon
- public TaxonNameDescription getTaxonNameDescription(TaxonName name, boolean isImageGallery, boolean createNewIfNotExists)
createNewIfNotExists
is true
.createNewIfNotExists
- isImageGallery
- if true only taxon description being image galleries are considered.
If false only taxon description being no image galleries are considered.public TaxonNameDescription getTaxonNameDescription(TaxonName name, Reference ref, boolean isImageGallery, boolean createNewIfNotExists)
getTaxonDescription(Taxon, boolean, boolean)
Only matches a description if the given reference is a source of the description.public TaxonDescription getTaxonDescription(Taxon taxon, boolean isImageGallery, boolean createNewIfNotExists)
createNewIfNotExists
is true
.createNewIfNotExists
- isImageGallery
- if true only taxon description being image galleries are considered.
If false only taxon description being no image galleries are considered.public TaxonDescription getTaxonDescription(Taxon taxon, Reference ref, boolean isImageGallery, boolean createNewIfNotExists)
getTaxonDescription(Taxon, boolean, boolean)
Only matches a description if the given reference is a source of the description.public TaxonDescription getDefaultTaxonDescription(Taxon taxon, boolean isImageGallery, boolean createNewIfNotExists, Reference source)
taxon
- isImageGallery
- createNewIfNotExists
- source
- getTaxonDescription(Taxon, Reference, boolean, boolean)
public TaxonDescription getMarkedTaxonDescription(Taxon taxon, MarkerType markerType, boolean isImageGallery, boolean createNewIfNotExists, Reference source, java.lang.String title)
true
with the given marker type.
If createNewIfNotExists a new description is created if it does not yet exist.
For the new description the source and the title are set if not null
.taxon
- markerType
- isImageGallery
- createNewIfNotExists
- source
- title
- public SpecimenDescription getSpecimenDescription(SpecimenOrObservationBase specimen, boolean isImageGallery, boolean createNewIfNotExists)
specimen description
for a specimen or observation
.
If there are multiple specimen descriptions an arbitrary one is chosen.
If no specimen description exists, a new one is created if createNewIfNotExists
is true
.createNewIfNotExists
- isImageGallery
- if true only specimen description being image galleries are considered.
If false only specimen description being no image galleries are considered.public SpecimenDescription getSpecimenDescription(SpecimenOrObservationBase specimen, Reference ref, boolean isImageGallery, boolean createNewIfNotExists)
getSpecimenDescription(SpecimenOrObservationBase, boolean, boolean)
Only matches a description if the given reference is a source of the description.protected TextData getFeaturePlaceholder(STATE state, DescriptionBase<?> description, Feature feature, boolean createIfNotExists)
state
- feature
- taxon
- ref
- createIfNotExists
- protected Taxon getAcceptedTaxon(TaxonBase<?> taxonBase)
taxon base
. null
is returned. If multiple accepted taxa exist the one taxon with the
same secundum reference is returned. If no such single taxon exists an
illegal state exception
is thrown.taxonBase
- protected Media getImageMedia(java.lang.String uriString, boolean readMediaData) throws java.net.MalformedURLException
java.net.MalformedURLException
protected Media getImageMedia(java.lang.String uriString, java.lang.String uriStrThumb, boolean readMediaData) throws java.net.MalformedURLException
uriString
- readDataFromUrl
- java.net.MalformedURLException
READ_MEDIA_DATA
protected Media getImageMedia(java.lang.String uriString, java.lang.String mediumUriString, java.lang.String uriStrThumb, boolean readMediaData) throws java.net.MalformedURLException
java.net.MalformedURLException
protected java.lang.Integer nullSafeInt(java.sql.ResultSet rs, java.lang.String columnName) throws java.sql.SQLException
rs
- columnName
- java.sql.SQLException
protected java.lang.Boolean nullSafeBoolean(java.sql.ResultSet rs, java.lang.String columnName) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Double nullSafeDouble(java.sql.ResultSet rs, java.lang.String columnName) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Float nullSafeFloat(java.sql.ResultSet rs, java.lang.String columnName) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Integer intFromString(STATE state, java.lang.String strToConvert, java.lang.String recordLocation, java.lang.String attributeName)
state
- strToConvert
- recordLocation
- attributeName
- protected java.lang.Double doubleFromString(STATE state, java.lang.String strToConvert, java.lang.String recordLocation, java.lang.String attributeName)
Double
. If this is not possible
an error is logged in the import result with record location and attribute name.state
- strToConvert
- recordLocation
- attributeName
- protected java.lang.String NB(java.lang.String str)
null
for all blank strings. Identity function otherwise.str
- public byte[] getByteArray()
getByteArray
in interface ICdmImport<CONFIG extends IImportConfigurator,STATE extends ImportStateBase>
public static TeamOrPersonBase<?> parseAuthorString(java.lang.String authorName)
protected void saveNameRelations(TaxonName name)
Copyright © 2007-2020 EDIT. All Rights Reserved.