Project

General

Profile

Download (2.14 KB) Statistics
| Branch: | Tag: | Revision:
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
import eu.etaxonomy.cdm.io.common.mapping.out.IExportTransformer;
18

    
19
/**
20
 * @author a.mueller
21
 * @created 20.03.2008
22
 * @version 1.0
23
 */
24
public abstract class XmlExportConfiguratorBase<STATE extends XmlExportState> extends ExportConfiguratorBase<File, STATE, IExportTransformer> implements IExportConfigurator<STATE, IExportTransformer>{
25
    private static final long serialVersionUID = 6078292713506530756L;
26
    @SuppressWarnings("unused")
27
	private static Logger logger = Logger.getLogger(XmlExportConfiguratorBase.class);
28

    
29
	//	private XmlExportState<XmlExportConfigurator> state;
30

    
31
	public enum IdType{
32
		CDM_ID,
33
		ORIGINAL_SOURCE_ID
34
	}
35

    
36
	private IdType idType = IdType.CDM_ID;
37

    
38

    
39

    
40
	/**
41
	 * @param berlinModelSource
42
	 * @param sourceReference
43
	 * @param destination
44
	 */
45
	protected XmlExportConfiguratorBase(File destination, ICdmDataSource cdmSource, IExportTransformer transformer) {
46
	   super(transformer);
47
	   setSource(cdmSource);
48
	   setDestination(destination);
49
//	   setState(new XmlExportState<XmlExportConfigurator>());
50
	}
51

    
52

    
53
	/**
54
	 * @return the idType
55
	 */
56
	public IdType getIdType() {
57
		return idType;
58
	}
59

    
60
	/**
61
	 * @param idType the idType to set
62
	 */
63
	public void setIdType(IdType idType) {
64
		this.idType = idType;
65
	}
66

    
67

    
68
	/* (non-Javadoc)
69
	 * @see eu.etaxonomy.cdm.io.common.IIoConfigurator#getDestinationNameString()
70
	 */
71
	@Override
72
    public String getDestinationNameString() {
73
		if (getDestination() != null){
74
			return getDestination().getName();
75
		}else{
76
			return "";
77
		}
78
	}
79

    
80

    
81
//	/**
82
//	 * @return the state
83
//	 */
84
//	public XmlExportState<XmlExportConfigurator> getState() {
85
//		return state;
86
//	}
87
//
88
//	/**
89
//	 * @param state the state to set
90
//	 */
91
//	public void setState(BerlinModelExportState<XmlExportConfigurator> state) {
92
//		this.state = state;
93
//	}
94
//
95

    
96

    
97

    
98
}
(58-58/62)