public abstract class CsvDemoBase extends CdmExportBase<CsvDemoExportConfigurator,CsvDemoExportState,IExportTransformer,java.io.File> implements ICdmExport<CsvDemoExportConfigurator,CsvDemoExportState>
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.Integer> |
existingRecordIds |
protected java.util.Set<java.util.UUID> |
existingRecordUuids |
protected static boolean |
IS_CORE |
exportStream
INCLUDE_UNPUBLISHED, ioName, NO_UNPUBLISHED
applicationContext
FEATURE_STORE, NOMREF_STORE, REFERENCE_STORE, SPECIMEN_STORE, TAXON_STORE, TAXONNAME_STORE, TEAM_STORE
Constructor and Description |
---|
CsvDemoBase() |
Modifier and Type | Method and Description |
---|---|
protected void |
addExistingRecord(CdmBase cdmBase) |
protected void |
addExistingRecordUuid(CdmBase cdmBase) |
protected void |
clearExistingRecordIds() |
protected void |
closeWriter(java.io.PrintWriter writer,
CsvTaxExportStateRedlist state)
Closes the writer
|
protected void |
closeWriter(javax.xml.stream.XMLStreamWriter writer,
CsvTaxExportStateRedlist state)
Closes the writer.
|
long |
countSteps(CsvDemoExportState state) |
protected java.io.FileOutputStream |
createFileOutputStream(CsvTaxExportConfiguratorRedlist config,
java.lang.String thisFileName) |
protected java.io.PrintWriter |
createPrintWriter(java.lang.String fileName,
CsvTaxExportStateRedlist state) |
protected javax.xml.stream.XMLStreamWriter |
createXmlStreamWriter(CsvTaxExportStateRedlist state,
java.lang.String fileName) |
protected java.util.List<TaxonNode> |
getAllNodes(java.util.Set<Classification> classificationList)
Returns the list of
taxon nodes that are part in one of the given classifications
and do have a Taxon attached (empty taxon nodes should not but do exist in CDM databases). |
protected java.lang.String |
getSources(ISourceable<?> sourceable,
CsvTaxExportConfiguratorRedlist config) |
protected java.lang.String |
getTaxonLogString(TaxonBase<?> taxon) |
protected void |
handleArea(ICsvAreaRecord record,
NamedArea area,
TaxonBase<?> taxon,
boolean required)
Creates the locationId, locality, countryCode triple
|
protected boolean |
recordExists(CdmBase el) |
protected boolean |
recordExistsUuid(CdmBase el) |
createExportData, getByteArray, getDbId, getDefaultResult, getExtension, getNoDataResult, isUnpublished, isUnpublished
addObserver, addObservers, check, commitTransaction, countObservers, 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
createExportData, getByteArray, invoke
check, fire, updateProgress, updateProgress, warnProgress
addObserver, addObservers, countObservers, getObservers, removeObserver, removeObservers
protected static final boolean IS_CORE
protected java.util.Set<java.lang.Integer> existingRecordIds
protected java.util.Set<java.util.UUID> existingRecordUuids
public long countSteps(CsvDemoExportState state)
countSteps
in interface ICdmIO<CsvDemoExportState>
countSteps
in class CdmIoBase<CsvDemoExportState,ExportResult>
protected java.util.List<TaxonNode> getAllNodes(java.util.Set<Classification> classificationList)
taxon nodes
that are part in one of the given classifications
and do have a Taxon
attached (empty taxon nodes should not but do exist in CDM databases).
If classificationList
is null
or empty then all taxon nodes
of all
classifications
are returned.protected void handleArea(ICsvAreaRecord record, NamedArea area, TaxonBase<?> taxon, boolean required)
record
- area
- protected java.lang.String getTaxonLogString(TaxonBase<?> taxon)
protected boolean recordExists(CdmBase el)
el
- protected void addExistingRecord(CdmBase cdmBase)
sec
- protected boolean recordExistsUuid(CdmBase el)
el
- protected void addExistingRecordUuid(CdmBase cdmBase)
sec
- protected java.lang.String getSources(ISourceable<?> sourceable, CsvTaxExportConfiguratorRedlist config)
protected java.io.FileOutputStream createFileOutputStream(CsvTaxExportConfiguratorRedlist config, java.lang.String thisFileName) throws java.io.IOException, java.io.FileNotFoundException
config
- java.io.IOException
java.io.FileNotFoundException
protected javax.xml.stream.XMLStreamWriter createXmlStreamWriter(CsvTaxExportStateRedlist state, java.lang.String fileName) throws java.io.IOException, java.io.FileNotFoundException, javax.xml.stream.XMLStreamException
config
- factory
- java.io.IOException
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException
protected java.io.PrintWriter createPrintWriter(java.lang.String fileName, CsvTaxExportStateRedlist state) throws java.io.IOException, java.io.FileNotFoundException, java.io.UnsupportedEncodingException
coreTaxFileName
- config
- java.io.IOException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
protected void closeWriter(java.io.PrintWriter writer, CsvTaxExportStateRedlist state)
writer
- state
- protected void closeWriter(javax.xml.stream.XMLStreamWriter writer, CsvTaxExportStateRedlist state)
writer
- state
- protected void clearExistingRecordIds()
Copyright © 2007-2020 EDIT. All Rights Reserved.