eu.etaxonomy.cdm.io.common.mapping
Class DbImportFeatureCreationMapper<STATE extends DbImportStateBase<?,?>>

java.lang.Object
  extended by eu.etaxonomy.cdm.io.common.mapping.CdmMapperBase
      extended by eu.etaxonomy.cdm.io.common.mapping.CdmAttributeMapperBase
          extended by eu.etaxonomy.cdm.io.common.mapping.MultipleAttributeMapperBase<CdmSingleAttributeMapperBase>
              extended by eu.etaxonomy.cdm.io.common.mapping.DbImportMultiAttributeMapperBase<CREATE,STATE>
                  extended by eu.etaxonomy.cdm.io.common.mapping.DbImportObjectCreationMapperBase<TERMED,STATE>
                      extended by eu.etaxonomy.cdm.io.common.mapping.DbImportDefinedTermCreationMapperBase<Feature,DescriptionElementBase,DbImportStateBase<?,?>>
                          extended by eu.etaxonomy.cdm.io.common.mapping.DbImportFeatureCreationMapper<STATE>
All Implemented Interfaces:
IDbImportMapper<DbImportStateBase<?,?>,DescriptionElementBase>

public class DbImportFeatureCreationMapper<STATE extends DbImportStateBase<?,?>>
extends DbImportDefinedTermCreationMapperBase<Feature,DescriptionElementBase,DbImportStateBase<?,?>>

This class retrives or creates an existing or a new feature.

Version:
1.0
Author:
a.mueller
See Also:
DbImportDefinedTermCreationMapperBase

Field Summary
 
Fields inherited from class eu.etaxonomy.cdm.io.common.mapping.DbImportDefinedTermCreationMapperBase
dbLabelAbbrevAttribute, dbLabelAttribute, dbTermAttribute
 
Fields inherited from class eu.etaxonomy.cdm.io.common.mapping.DbImportObjectCreationMapperBase
dbIdAttribute, objectToCreateNamespace
 
Fields inherited from class eu.etaxonomy.cdm.io.common.mapping.DbImportMultiAttributeMapperBase
importMapperHelper
 
Fields inherited from class eu.etaxonomy.cdm.io.common.mapping.MultipleAttributeMapperBase
singleMappers
 
Constructor Summary
protected DbImportFeatureCreationMapper(String dbIdAttribute, String featureNamespace, String dbTermAttribute, String dbLabelAttribute, String dbLabelAbbrevAttribute)
           
 
Method Summary
protected  Feature createDefinedTerm(ResultSet rs)
           
protected  Feature getTermFromState(UUID uuid)
           
protected  Feature getTermFromTransformer(String key, IInputTransformer transformer)
           
protected  UUID getUuidFromTransformer(String key, IInputTransformer transformer)
           
static DbImportFeatureCreationMapper<?> NewInstance(String dbIdAttribute, String featureNamespace, String dbTermAttribute, String dbLabelAttribute, String dbLabelAbbrevAttribute)
           
protected  void saveTermToState(Feature feature)
          Saves the defined term to the state
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.DbImportDefinedTermCreationMapperBase
createObject, doInvoke, getKeyString, getTermByIdentifier, getTermByUuid, getTermFromTransformer, getUuidFromTransformer, invoke
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.DbImportObjectCreationMapperBase
addOriginalSource, getTransformer
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.DbImportMultiAttributeMapperBase
getForeignKey, getRelatedObject, getRelatedObject, getState, initialize
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.MultipleAttributeMapperBase
getDestinationAttributeList, getDestinationAttributes, getSourceAttributeList, getSourceAttributes, getStringDbValue
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.CdmAttributeMapperBase
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DbImportFeatureCreationMapper

protected DbImportFeatureCreationMapper(String dbIdAttribute,
                                        String featureNamespace,
                                        String dbTermAttribute,
                                        String dbLabelAttribute,
                                        String dbLabelAbbrevAttribute)
Parameters:
dbIdAttribute -
objectToCreateNamespace -
dbTaxonFkAttribute -
taxonNamespace -
Method Detail

NewInstance

public static DbImportFeatureCreationMapper<?> NewInstance(String dbIdAttribute,
                                                           String featureNamespace,
                                                           String dbTermAttribute,
                                                           String dbLabelAttribute,
                                                           String dbLabelAbbrevAttribute)
Parameters:
dbIdAttribute -
dbTermAttribute -
dbLabelAttribute -
dbLabelAbbrevAttribute -
Returns:

getTermFromState

protected Feature getTermFromState(UUID uuid)
Specified by:
getTermFromState in class DbImportDefinedTermCreationMapperBase<Feature,DescriptionElementBase,DbImportStateBase<?,?>>
Returns:

getTermFromTransformer

protected Feature getTermFromTransformer(String key,
                                         IInputTransformer transformer)
                                  throws UndefinedTransformerMethodException
Specified by:
getTermFromTransformer in class DbImportDefinedTermCreationMapperBase<Feature,DescriptionElementBase,DbImportStateBase<?,?>>
Returns:
Throws:
UndefinedTransformerMethodException

getUuidFromTransformer

protected UUID getUuidFromTransformer(String key,
                                      IInputTransformer transformer)
                               throws UndefinedTransformerMethodException
Specified by:
getUuidFromTransformer in class DbImportDefinedTermCreationMapperBase<Feature,DescriptionElementBase,DbImportStateBase<?,?>>
Returns:
Throws:
UndefinedTransformerMethodException

saveTermToState

protected void saveTermToState(Feature feature)
Description copied from class: DbImportDefinedTermCreationMapperBase
Saves the defined term to the state

Specified by:
saveTermToState in class DbImportDefinedTermCreationMapperBase<Feature,DescriptionElementBase,DbImportStateBase<?,?>>

createDefinedTerm

protected Feature createDefinedTerm(ResultSet rs)
                             throws SQLException
Specified by:
createDefinedTerm in class DbImportDefinedTermCreationMapperBase<Feature,DescriptionElementBase,DbImportStateBase<?,?>>
Returns:
Throws:
SQLException


Copyright © 2007-2013 EDIT. All Rights Reserved.