2 * Copyright (C) 2008 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.
9 package eu
.etaxonomy
.cdm
.io
.faunaEuropaea
;
11 import org
.apache
.log4j
.Logger
;
12 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
13 import eu
.etaxonomy
.cdm
.io
.berlinModel
.in
.BerlinModelImportConfigurator
;
14 import eu
.etaxonomy
.cdm
.io
.common
.IImportConfigurator
;
15 import eu
.etaxonomy
.cdm
.io
.common
.ImportConfiguratorBase
;
16 import eu
.etaxonomy
.cdm
.io
.common
.ImportStateBase
;
17 import eu
.etaxonomy
.cdm
.io
.common
.Source
;
18 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalCode
;
19 import eu
.etaxonomy
.cdm
.model
.reference
.Database
;
20 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
23 * @author a.babadshanjan
27 public class FaunaEuropaeaImportConfigurator
extends ImportConfiguratorBase
<FaunaEuropaeaImportState
> implements IImportConfigurator
{
29 private static final Logger logger
= Logger
.getLogger(FaunaEuropaeaImportConfigurator
.class);
31 @SuppressWarnings("unchecked")
32 protected void makeIoClassList() {
33 ioClassList
= new Class
[] {
34 FaunaEuropaeaAuthorImport
.class,
35 // FaunaEuropaeaReferenceImport.class,
36 // FaunaEuropaeaTaxonNameImport.class
37 FaunaEuropaeaTaxonImport
.class,
38 FaunaEuropaeaRefImport
.class
39 // FaunaEuropaeaDistributionImport.class
43 public static FaunaEuropaeaImportConfigurator
NewInstance(Source source
, ICdmDataSource destination
){
44 return new FaunaEuropaeaImportConfigurator(source
, destination
);
47 private FaunaEuropaeaImportConfigurator(Source source
, ICdmDataSource destination
) {
49 setDestination(destination
);
50 setNomenclaturalCode(NomenclaturalCode
.ICBN
);
54 * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSource()
56 public Source
getSource() {
57 return (Source
)super.getSource();
63 public void setSource(Source dbSource
) {
64 super.setSource(dbSource
);
69 * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSourceReference()
72 public ReferenceBase
getSourceReference() {
74 if (this.sourceReference
== null){
75 logger
.warn("getSource Reference not yet fully implemented");
76 sourceReference
= Database
.NewInstance();
77 sourceReference
.setTitleCache("Fauna Europaea database");
79 return sourceReference
;
84 * @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getSourceNameString()
86 public String
getSourceNameString() {
87 if (this.getSource() == null) {
90 return this.getSource().toString();
95 * @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getNewState()
97 public FaunaEuropaeaImportState
getNewState() {
98 return new FaunaEuropaeaImportState(this);