Revision 401fe405
Added by Andreas Müller over 13 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/eflora/centralAfrica/ferns/CentralAfricaFernsReferenceImport.java | ||
---|---|---|
26 | 26 |
import eu.etaxonomy.cdm.io.common.mapping.IMappingImport; |
27 | 27 |
import eu.etaxonomy.cdm.io.eflora.centralAfrica.ferns.validation.CentralAfricaFernsReferenceImportValidator; |
28 | 28 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
29 |
import eu.etaxonomy.cdm.model.reference.ReferenceBase;
|
|
29 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
30 | 30 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
31 | 31 |
|
32 | 32 |
|
... | ... | |
36 | 36 |
* @version 1.0 |
37 | 37 |
*/ |
38 | 38 |
@Component |
39 |
public class CentralAfricaFernsReferenceImport extends CentralAfricaFernsImportBase<ReferenceBase> implements IMappingImport<ReferenceBase, CentralAfricaFernsImportState>{
|
|
39 |
public class CentralAfricaFernsReferenceImport extends CentralAfricaFernsImportBase<Reference> implements IMappingImport<Reference, CentralAfricaFernsImportState>{
|
|
40 | 40 |
private static final Logger logger = Logger.getLogger(CentralAfricaFernsReferenceImport.class); |
41 | 41 |
|
42 | 42 |
private DbImportMapping mapping; |
... | ... | |
45 | 45 |
private int modCount = 10000; |
46 | 46 |
private static final String pluralString = "references"; |
47 | 47 |
private static final String dbTableName = "literature"; |
48 |
private static final Class cdmTargetClass = ReferenceBase.class;
|
|
48 |
private static final Class cdmTargetClass = Reference.class; |
|
49 | 49 |
|
50 | 50 |
public CentralAfricaFernsReferenceImport(){ |
51 | 51 |
super(pluralString, dbTableName, cdmTargetClass); |
... | ... | |
105 | 105 |
|
106 | 106 |
|
107 | 107 |
|
108 |
ReferenceBase ref = null;
|
|
108 |
Reference ref = null; |
|
109 | 109 |
// ref.setP |
110 | 110 |
|
111 | 111 |
|
... | ... | |
129 | 129 |
/* (non-Javadoc) |
130 | 130 |
* @see eu.etaxonomy.cdm.io.common.mapping.IMappingImport#createObject(java.sql.ResultSet, eu.etaxonomy.cdm.io.common.ImportStateBase) |
131 | 131 |
*/ |
132 |
public ReferenceBase createObject(ResultSet rs, CentralAfricaFernsImportState state)
|
|
132 |
public Reference createObject(ResultSet rs, CentralAfricaFernsImportState state) |
|
133 | 133 |
throws SQLException { |
134 |
ReferenceBase ref;
|
|
134 |
Reference ref; |
|
135 | 135 |
String refType = rs.getString("RefType"); |
136 | 136 |
if (refType == null){ |
137 | 137 |
ref = ReferenceFactory.newGeneric(); |
Also available in: Unified diff
merge cdmlib-app-3.0.2 to trunk (app-import)