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.ReferenceBase;
|
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
|
* @param url
|
32
|
* @param destination
|
33
|
*/
|
34
|
protected ExcelImportConfiguratorBase(URI uri, ICdmDataSource destination) {
|
35
|
super(defaultTransformer);
|
36
|
setSource(uri);
|
37
|
setDestination(destination);
|
38
|
}
|
39
|
|
40
|
/* (non-Javadoc)
|
41
|
* @see eu.etaxonomy.cdm.io.common.ImportConfiguratorBase#getSourceReference()
|
42
|
*/
|
43
|
@Override
|
44
|
public ReferenceBase getSourceReference() {
|
45
|
//TODO
|
46
|
if (this.sourceReference == null){
|
47
|
logger.warn("getSource Reference not yet fully implemented");
|
48
|
sourceReference = ReferenceFactory.newDatabase();
|
49
|
sourceReference.setTitleCache("Distribution data import", true);
|
50
|
}
|
51
|
return sourceReference;
|
52
|
}
|
53
|
|
54
|
public boolean isDoMatchTaxa() {
|
55
|
return false;
|
56
|
}
|
57
|
|
58
|
}
|