2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.io
.redlist
;
12 import org
.apache
.log4j
.Logger
;
14 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
15 import eu
.etaxonomy
.cdm
.io
.common
.DbImportConfiguratorBase
;
16 import eu
.etaxonomy
.cdm
.io
.common
.IImportConfigurator
;
17 import eu
.etaxonomy
.cdm
.io
.common
.ImportStateBase
;
18 import eu
.etaxonomy
.cdm
.io
.common
.Source
;
19 import eu
.etaxonomy
.cdm
.io
.common
.mapping
.IInputTransformer
;
20 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalCode
;
21 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
22 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceFactory
;
30 public class RoteListeDbImportConfigurator
extends DbImportConfiguratorBase
<RoteListeDbImportState
> implements IImportConfigurator
{
31 @SuppressWarnings("unused")
32 private static Logger logger
= Logger
.getLogger(RoteListeDbImportConfigurator
.class);
34 public static RoteListeDbImportConfigurator
NewInstance(Source ermsSource
, ICdmDataSource destination
){
35 return new RoteListeDbImportConfigurator(ermsSource
, destination
);
38 /* Max number of records to be saved with one service call */
39 private int recordsPerTransaction
= 1000; //defaultValue
41 private DO_REFERENCES doReferences
= DO_REFERENCES
.ALL
;
42 private boolean doTaxa
= true;
45 private static IInputTransformer defaultTransformer
= new RoteListeDbTransformer();
47 protected void makeIoClassList(){
48 ioClassList
= new Class
[]{
49 RoteListeDbTaxonImport
.class,
55 * @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getNewState()
57 public ImportStateBase
getNewState() {
58 return new RoteListeDbImportState(this);
63 private RoteListeDbImportConfigurator(Source source
, ICdmDataSource destination
) {
64 super(source
, destination
, NomenclaturalCode
.ICNAFP
, defaultTransformer
);
69 * @return the limitSave
71 public int getRecordsPerTransaction() {
72 return recordsPerTransaction
;
76 * @param limitSave the limitSave to set
78 public void setRecordsPerTransaction(int recordsPerTransaction
) {
79 this.recordsPerTransaction
= recordsPerTransaction
;
82 public DO_REFERENCES
getDoReferences() {
85 public void setDoReferences(DO_REFERENCES doReferences
) {
86 this.doReferences
= doReferences
;
89 public boolean isDoTaxa() {
92 public void setDoTaxa(boolean doTaxa
) {