add generic config to ExcelImportState
[cdmlib.git] / cdmlib-io / src / main / java / eu / etaxonomy / cdm / io / excel / common / ExcelImportConfiguratorBase.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9
10 package eu.etaxonomy.cdm.io.excel.common;
11
12
13 import java.net.URI;
14
15 import org.apache.log4j.Logger;
16
17 import eu.etaxonomy.cdm.database.ICdmDataSource;
18 import eu.etaxonomy.cdm.io.common.IImportConfigurator;
19 import eu.etaxonomy.cdm.io.common.ImportConfiguratorBase;
20 import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
21 import eu.etaxonomy.cdm.model.reference.Reference;
22 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
23
24 public abstract class ExcelImportConfiguratorBase extends ImportConfiguratorBase<ExcelImportState, URI> implements IImportConfigurator{
25 private static final Logger logger = Logger.getLogger(ExcelImportConfiguratorBase.class);
26
27 //TODO
28 private static IInputTransformer defaultTransformer = null;
29
30
31 /**
32 * @param url
33 * @param destination
34 */
35 protected ExcelImportConfiguratorBase(URI uri, ICdmDataSource destination) {
36 this(uri, destination, defaultTransformer);
37 }
38
39 /**
40 * @param url
41 * @param destination
42 */
43 protected ExcelImportConfiguratorBase(URI uri, ICdmDataSource destination, IInputTransformer transformer) {
44 super(transformer);
45 setSource(uri);
46 setDestination(destination);
47 }
48
49 /* (non-Javadoc)
50 * @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSourceReference()
51 */
52 @Override
53 public Reference getSourceReference() {
54 //TODO
55 if (this.sourceReference == null){
56 logger.warn("getSource Reference not yet fully implemented");
57 sourceReference = ReferenceFactory.newDatabase();
58 sourceReference.setTitleCache("Distribution data import", true);
59 }
60 return sourceReference;
61 }
62
63 public boolean isDoMatchTaxa() {
64 return false;
65 }
66
67
68
69 }