eu.etaxonomy.cdm.io.common.mapping
Class DbImportSynonymMapper<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<CdmBase,STATE>
                  extended by eu.etaxonomy.cdm.io.common.mapping.DbImportSynonymMapper<STATE>
Type Parameters:
CDM_BASE -
STATE -
All Implemented Interfaces:
IDbImportMapper<STATE,CdmBase>

public class DbImportSynonymMapper<STATE extends DbImportStateBase<?,?>>
extends DbImportMultiAttributeMapperBase<CdmBase,STATE>

Version:
1.0
Author:
a.mueller

Field Summary
 
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 DbImportSynonymMapper(String fromAttribute, String toAttribute, TaxonRelationshipType relType, String relatedObjectNamespace, String relTypeAttribute)
           
 
Method Summary
protected  CdmBase getRelatedObject(ResultSet rs, String dbAttribute)
          //TODO copied from DbImportObjectMapper.
 CdmBase invoke(ResultSet rs, CdmBase cdmBase)
           
static DbImportSynonymMapper<?> NewInstance(String dbFromAttribute, String dbToAttribute, String relatedObjectNamespace, String relTypeAttribute, TaxonRelationshipType taxonRelationshipType)
          Creates a new instance of SynonymMapper.
 
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

DbImportSynonymMapper

protected DbImportSynonymMapper(String fromAttribute,
                                String toAttribute,
                                TaxonRelationshipType relType,
                                String relatedObjectNamespace,
                                String relTypeAttribute)
Parameters:
relatedObjectNamespace -
mappingImport -
Method Detail

NewInstance

public static DbImportSynonymMapper<?> NewInstance(String dbFromAttribute,
                                                   String dbToAttribute,
                                                   String relatedObjectNamespace,
                                                   String relTypeAttribute,
                                                   TaxonRelationshipType taxonRelationshipType)
Creates a new instance of SynonymMapper.

Parameters:
dbFromAttribute -
dbToAttribute -
relatedObjectNamespace -
relTypeAttribute -
taxonRelationshipType - this relationshiptype is taken for accepted taxa being synonyms (may be the case if data are dirty)
Returns:

invoke

public CdmBase invoke(ResultSet rs,
                      CdmBase cdmBase)
               throws SQLException
Throws:
SQLException

getRelatedObject

protected CdmBase getRelatedObject(ResultSet rs,
                                   String dbAttribute)
                            throws SQLException
//TODO copied from DbImportObjectMapper. Maybe these can be merged again in future

Parameters:
rs -
dbAttribute -
Returns:
Throws:
SQLException


Copyright © 2007-2013 EDIT. All Rights Reserved.