eu.etaxonomy.cdm.io.common
Class XmlImportBase<CONFIG extends XmlImportConfiguratorBase<STATE>,STATE extends XmlImportState<CONFIG,?>>
java.lang.Object
eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration
eu.etaxonomy.cdm.io.common.CdmIoBase<STATE>
eu.etaxonomy.cdm.io.common.CdmImportBase<CONFIG,STATE>
eu.etaxonomy.cdm.io.common.XmlImportBase<CONFIG,STATE>
- All Implemented Interfaces:
- ICdmApplicationConfiguration, IIoObserver, ICdmImport<CONFIG,STATE>, ICdmIO<STATE>, IIoObservable, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
- MarkupDocumentImport, SDDImport
public abstract class XmlImportBase<CONFIG extends XmlImportConfiguratorBase<STATE>,STATE extends XmlImportState<CONFIG,?>>
- extends CdmImportBase<CONFIG,STATE>
- implements IIoObserver
Base class for XML imports
- Author:
- a.mueller
| Fields inherited from class eu.etaxonomy.cdm.io.common.CdmImportBase |
CREATE, IMAGE_GALLERY, READ_MEDIA_DATA, uuidUserDefinedAnnotationTypeVocabulary, uuidUserDefinedExtensionTypeVocabulary, uuidUserDefinedFeatureVocabulary, uuidUserDefinedMarkerTypeVocabulary, uuidUserDefinedMeasurementUnitVocabulary, uuidUserDefinedModifierVocabulary, uuidUserDefinedNamedAreaLevelVocabulary, uuidUserDefinedNamedAreaVocabulary, uuidUserDefinedRankVocabulary, uuidUserDefinedReferenceSystemVocabulary, uuidUserDefinedStateVocabulary, uuidUserDefinedStatisticalMeasureVocabulary, uuidUserDefinedTaxonRelationshipTypeVocabulary |
| Fields inherited from interface eu.etaxonomy.cdm.io.common.ICdmIO |
FEATURE_STORE, NOMREF_DETAIL_STORE, NOMREF_STORE, PERSON_STORE, REF_DETAIL_STORE, REFERENCE_STORE, SPECIMEN_STORE, TAXON_STORE, TAXONNAME_STORE, TEAM_STORE, USER_STORE |
| Methods inherited from class eu.etaxonomy.cdm.io.common.CdmImportBase |
addOriginalSource, addOriginalSource, fillMissingEpithets, fillMissingEpithetsForTaxa, getAcceptedTaxon, getAnnotationType, getExtensionType, getExtensionType, getFeature, getFeature, getFeaturePlaceholder, getImageMedia, getLanguage, getLanguage, getMarkerType, getMarkerType, getMarkerType, getMeasurementUnit, getModifier, getNamedArea, getNamedArea, getNamedAreaLevel, getPresenceTerm, getRank, getReferenceSystem, getSpecimenDescription, getSpecimenDescription, getStateTerm, getStateTerm, getStatisticalMeasure, getTaxonDescription, getTaxonDescription, getTaxonNameDescription, getTaxonNameDescription, getTaxonRelationshipType, getVocabulary, makeTree, makeTreeMemSave, NB, nullSafeDouble, nullSafeFloat, nullSafeInt |
| Methods inherited from class eu.etaxonomy.cdm.io.common.CdmIoBase |
addObserver, addObservers, check, commitTransaction, countObservers, countSteps, doCheck, doInvoke, fire, fireProgressEvent, fireWarningEvent, fireWarningEvent, flush, getInstance, getObservers, getSuccessString, invoke, isBlank, isIgnore, isNotBlank, removeObserver, removeObservers, rollbackTransaction, startTransaction, startTransaction, updateProgress, updateProgress, warnProgress |
| Methods inherited from class eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration |
authenticate, getAgentService, getAuthenticationManager, getBean, getClassificationService, getCollectionService, getCommonService, getDatabaseService, getDescriptionService, getFeatureNodeService, getFeatureTreeService, getGrantedAuthorityService, getGroupService, getIdentificationKeyService, getLocationService, getMainService, getMediaService, getNameService, getOccurrenceService, getPermissionEvaluator, getPolytomousKeyNodeService, getPolytomousKeyService, getReferenceService, getTaxonNodeService, getTaxonService, getTermService, getTransactionManager, getUserService, getVocabularyService, getWorkingSetService, NewConversation, setApplicationContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlImportBase
public XmlImportBase()
fireSchemaConflictEventExpectedStartTag
protected void fireSchemaConflictEventExpectedStartTag(String elName,
XMLEventReader reader)
throws XMLStreamException
- Throws:
XMLStreamException
validateStartOfDocument
protected boolean validateStartOfDocument(XMLEventReader reader)
throws XMLStreamException
- Parameters:
r -
- Returns:
-
- Throws:
XMLStreamException
isStartingElement
protected boolean isStartingElement(XMLEventReader reader,
String elName)
throws XMLStreamException
- TODO namespace
- Parameters:
elName - reader -
- Returns:
-
- Throws:
XMLStreamException
isStartingElement
protected boolean isStartingElement(XMLEvent event,
String elName)
throws XMLStreamException
- Throws:
XMLStreamException
isEndingElement
protected boolean isEndingElement(XMLEventReader reader,
String elName)
throws XMLStreamException
- Throws:
XMLStreamException
isEndingElement
protected boolean isEndingElement(XMLEvent event,
String elName)
throws XMLStreamException
- Throws:
XMLStreamException
getInputStream
protected InputStream getInputStream(CONFIG config)
- Returns an input stream for the given source.
- Parameters:
config -
- Returns:
getStaxReader
protected XMLEventReader getStaxReader(STATE state)
throws FactoryConfigurationError,
XMLStreamException
- Returns the StAX-Reader (XMLEventReader) for the source.
- Parameters:
state -
- Returns:
-
- Throws:
FactoryConfigurationError
XMLStreamException
parseSAX
protected void parseSAX(STATE state,
ImportHandlerBase handler)
throws ParserConfigurationException,
SAXException,
IOException
- Parses the source file with the given handler
- Parameters:
is - handler -
- Throws:
ParserConfigurationException
SAXException
IOException
handleEvent
public void handleEvent(IIoEvent event)
- Specified by:
handleEvent in interface IIoObserver
Copyright © 2007-2013 EDIT. All Rights Reserved.