1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2012 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.cdm.io.sdd.ikeyplus;
|
11
|
|
12
|
import java.net.URI;
|
13
|
import org.apache.log4j.Logger;
|
14
|
|
15
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
16
|
import eu.etaxonomy.cdm.io.common.ImportConfiguratorBase;
|
17
|
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
|
18
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
19
|
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
|
20
|
|
21
|
/**
|
22
|
* @author andreas
|
23
|
* @date Sep 18, 2012
|
24
|
*
|
25
|
*/
|
26
|
public class IkeyPlusImportConfigurator extends ImportConfiguratorBase<IkeyPlusImportState, URI> {
|
27
|
public static final Logger logger = Logger.getLogger(IkeyPlusImportConfigurator.class);
|
28
|
|
29
|
private static IInputTransformer defaultTransformer = null;
|
30
|
|
31
|
|
32
|
public static IkeyPlusImportConfigurator NewInstance(URI uri,
|
33
|
ICdmDataSource destination){
|
34
|
return new IkeyPlusImportConfigurator(uri, destination);
|
35
|
}
|
36
|
|
37
|
|
38
|
/**
|
39
|
* @param berlinModelSource
|
40
|
* @param sourceReference
|
41
|
* @param destination
|
42
|
*/
|
43
|
private IkeyPlusImportConfigurator(URI uri, ICdmDataSource destination) {
|
44
|
super(defaultTransformer);
|
45
|
setSource(uri);
|
46
|
setDestination(destination);
|
47
|
}
|
48
|
|
49
|
@Override
|
50
|
public IkeyPlusImportState getNewState() {
|
51
|
return new IkeyPlusImportState(this);
|
52
|
}
|
53
|
|
54
|
|
55
|
@Override
|
56
|
protected void makeIoClassList() {
|
57
|
ioClassList = new Class[]{
|
58
|
IkeyPlusImport.class
|
59
|
};
|
60
|
}
|
61
|
|
62
|
@Override
|
63
|
public Reference getSourceReference() {
|
64
|
//TODO
|
65
|
if (this.sourceReference == null){
|
66
|
logger.warn("getSource Reference not yet fully implemented");
|
67
|
sourceReference = ReferenceFactory.newDatabase();
|
68
|
sourceReference.setTitleCache("KeyImport", true);
|
69
|
}
|
70
|
return sourceReference;
|
71
|
}
|
72
|
|
73
|
}
|