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.common;
|
11
|
|
12
|
import java.io.File;
|
13
|
|
14
|
import org.apache.log4j.Logger;
|
15
|
|
16
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
17
|
|
18
|
/**
|
19
|
* @author a.mueller
|
20
|
* @created 20.03.2008
|
21
|
* @version 1.0
|
22
|
*/
|
23
|
public abstract class XmlExportConfiguratorBase<STATE extends XmlExportState> extends ExportConfiguratorBase<File> implements IExportConfigurator<STATE>{
|
24
|
@SuppressWarnings("unused")
|
25
|
private static Logger logger = Logger.getLogger(XmlExportConfiguratorBase.class);
|
26
|
|
27
|
// private XmlExportState<XmlExportConfigurator> state;
|
28
|
|
29
|
public enum IdType{
|
30
|
CDM_ID,
|
31
|
ORIGINAL_SOURCE_ID
|
32
|
}
|
33
|
|
34
|
private IdType idType = IdType.CDM_ID;
|
35
|
|
36
|
|
37
|
|
38
|
/**
|
39
|
* @param berlinModelSource
|
40
|
* @param sourceReference
|
41
|
* @param destination
|
42
|
*/
|
43
|
protected XmlExportConfiguratorBase(File destination, ICdmDataSource cdmSource) {
|
44
|
super();
|
45
|
setSource(cdmSource);
|
46
|
setDestination(destination);
|
47
|
// setState(new XmlExportState<XmlExportConfigurator>());
|
48
|
}
|
49
|
|
50
|
|
51
|
/**
|
52
|
* @return the idType
|
53
|
*/
|
54
|
public IdType getIdType() {
|
55
|
return idType;
|
56
|
}
|
57
|
|
58
|
/**
|
59
|
* @param idType the idType to set
|
60
|
*/
|
61
|
public void setIdType(IdType idType) {
|
62
|
this.idType = idType;
|
63
|
}
|
64
|
|
65
|
|
66
|
/* (non-Javadoc)
|
67
|
* @see eu.etaxonomy.cdm.io.common.IIoConfigurator#getDestinationNameString()
|
68
|
*/
|
69
|
public String getDestinationNameString() {
|
70
|
if (getDestination() != null){
|
71
|
return getDestination().getName();
|
72
|
}else{
|
73
|
return "";
|
74
|
}
|
75
|
}
|
76
|
|
77
|
|
78
|
// /**
|
79
|
// * @return the state
|
80
|
// */
|
81
|
// public XmlExportState<XmlExportConfigurator> getState() {
|
82
|
// return state;
|
83
|
// }
|
84
|
//
|
85
|
// /**
|
86
|
// * @param state the state to set
|
87
|
// */
|
88
|
// public void setState(BerlinModelExportState<XmlExportConfigurator> state) {
|
89
|
// this.state = state;
|
90
|
// }
|
91
|
//
|
92
|
|
93
|
|
94
|
|
95
|
}
|