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
.BerlinModelImportConfigurator
;
14 import eu
.etaxonomy
.cdm
.io
.common
.IImportConfigurator
;
15 import eu
.etaxonomy
.cdm
.io
.common
.ImportConfiguratorBase
;
16 import eu
.etaxonomy
.cdm
.io
.common
.Source
;
17 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalCode
;
18 import eu
.etaxonomy
.cdm
.model
.reference
.Database
;
19 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
22 * @author a.babadshanjan
26 public class FaunaEuropaeaImportConfigurator
extends ImportConfiguratorBase
implements IImportConfigurator
{
28 private static final Logger logger
= Logger
.getLogger(FaunaEuropaeaImportConfigurator
.class);
30 @SuppressWarnings("unchecked")
31 protected void makeIoClassList() {
32 ioClassList
= new Class
[] {
33 // FaunaEuropaeaAuthorImport.class,
34 // FaunaEuropaeaReferenceImport.class,
35 FaunaEuropaeaTaxonImport
.class
36 // FaunaEuropaeaDistributionImport.class
40 public static FaunaEuropaeaImportConfigurator
NewInstance(Source source
, ICdmDataSource destination
){
41 return new FaunaEuropaeaImportConfigurator(source
, destination
);
44 private FaunaEuropaeaImportConfigurator(Source source
, ICdmDataSource destination
) {
46 setDestination(destination
);
47 setNomenclaturalCode(NomenclaturalCode
.ICBN
);
51 * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSource()
53 public Source
getSource() {
54 return (Source
)super.getSource();
60 public void setSource(Source dbSource
) {
61 super.setSource(dbSource
);
66 * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSourceReference()
69 public ReferenceBase
getSourceReference() {
71 if (this.sourceReference
== null){
72 logger
.warn("getSource Reference not yet fully implemented");
73 sourceReference
= Database
.NewInstance();
74 sourceReference
.setTitleCache("Fauna Europaea data import");
76 return sourceReference
;
81 * @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getSourceNameString()
83 public String
getSourceNameString() {
84 if (this.getSource() == null) {
87 return this.getSource().toString();