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
.excel
.common
;
15 import org
.apache
.log4j
.Logger
;
17 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
18 import eu
.etaxonomy
.cdm
.io
.common
.ImportConfiguratorBase
;
19 import eu
.etaxonomy
.cdm
.io
.common
.mapping
.IInputTransformer
;
20 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
21 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceFactory
;
23 public abstract class ExcelImportConfiguratorBase
24 extends ImportConfiguratorBase
<ExcelImportState
, URI
>{
26 private static final long serialVersionUID
= 9031559773350645304L;
27 private static final Logger logger
= Logger
.getLogger(ExcelImportConfiguratorBase
.class);
30 private static IInputTransformer defaultTransformer
= null;
31 private byte[] stream
;
32 private boolean deduplicateReferences
= true;
33 private boolean deduplicateAuthors
= false;
38 protected ExcelImportConfiguratorBase(URI uri
, ICdmDataSource destination
) {
39 this(uri
, destination
, defaultTransformer
);
46 protected ExcelImportConfiguratorBase(URI uri
, ICdmDataSource destination
, IInputTransformer transformer
) {
49 setDestination(destination
);
53 public Reference
getSourceReference() {
55 if (this.sourceReference
== null){
56 logger
.warn("getSource Reference not yet fully implemented");
57 sourceReference
= ReferenceFactory
.newDatabase();
58 sourceReference
.setTitleCache("Excel import " + getDateString(), true);
60 return sourceReference
;
63 public boolean isReuseExistingTaxaWhenPossible() {
66 public byte[] getStream(){
71 public void setStream(byte[] stream
) {
76 * @return the deduplicateReferences
78 public boolean isDeduplicateReferences() {
79 return deduplicateReferences
;
83 * @param deduplicateReferences the deduplicateReferences to set
85 public void setDeduplicateReferences(boolean deduplicateReferences
) {
86 this.deduplicateReferences
= deduplicateReferences
;
89 public boolean isDeduplicateAuthors() {
90 return deduplicateAuthors
;
93 public void setDeduplicateAuthors(boolean deduplicateAuthors
) {
94 this.deduplicateAuthors
= deduplicateAuthors
;