1 package eu
.etaxonomy
.cdm
.io
.abcd206
;
4 import org
.apache
.log4j
.Logger
;
5 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
6 import eu
.etaxonomy
.cdm
.io
.common
.IImportConfigurator
;
7 import eu
.etaxonomy
.cdm
.io
.common
.ImportConfiguratorBase
;
8 import eu
.etaxonomy
.cdm
.model
.reference
.Database
;
9 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
11 public class SpecimenImportConfigurator
extends ImportConfiguratorBase
implements IImportConfigurator
{
12 private static final Logger logger
= Logger
.getLogger(SpecimenImportConfigurator
.class);
13 private boolean doParsing
= false;
14 private boolean reuseMetadata
= false;
15 private boolean reuseTaxon
= false;
16 private String taxonReference
= null;
20 @SuppressWarnings("unchecked")
21 protected void makeIoClassList(){
22 System
.out
.println("makeIOClassList");
23 ioClassList
= new Class
[]{
28 public static SpecimenImportConfigurator
NewInstance(String url
,
29 ICdmDataSource destination
){
30 return new SpecimenImportConfigurator(url
, destination
);
35 * @param berlinModelSource
36 * @param sourceReference
39 private SpecimenImportConfigurator(String url
, ICdmDataSource destination
) {
42 setDestination(destination
);
47 // * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSource()
49 // public String getSource() {
50 // return (String)super.getSource();
53 public String
getSource(){
54 return (String
)super.getSource();
60 public void setSource(String file
) {
61 super.setSource(file
);
67 * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSourceReference()
70 public ReferenceBase
getSourceReference() {
72 if (this.sourceReference
== null){
73 logger
.warn("getSource Reference not yet fully implemented");
74 sourceReference
= Database
.NewInstance();
75 sourceReference
.setTitleCache("ABCD specimen import");
77 return sourceReference
;
80 public void setTaxonReference(String taxonReference
) {
81 this.taxonReference
= taxonReference
;
84 public ReferenceBase
getTaxonReference() {
86 if (this.taxonReference
== null){
87 logger
.info("getTaxonReference not yet fully implemented");
89 return sourceReference
;
94 * @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getSourceNameString()
96 public String
getSourceNameString() {
97 if (this.getSource() == null){
100 return (String
)this.getSource();
104 public void setDoAutomaticParsing(boolean doParsing
){
105 this.doParsing
=doParsing
;
108 public boolean getDoAutomaticParsing(){
109 return this.doParsing
;
112 public void setReUseExistingMetadata(boolean reuseMetadata
){
113 this.reuseMetadata
= reuseMetadata
;
116 public boolean getReUseExistingMetadata(){
117 return this.reuseMetadata
;
120 public void setReUseTaxon(boolean reuseTaxon
){
121 this.reuseTaxon
= reuseTaxon
;
124 public boolean getDoReUseTaxon(){
125 return this.reuseTaxon
;