Project

General

Profile

Download (1.64 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
 * @since 20.03.2008
22
 */
23
public abstract class  XmlExportConfiguratorBase<STATE extends XmlExportState<?>>
24
        extends ExportConfiguratorBase<STATE, IExportTransformer, File>
25
        implements IExportConfigurator<STATE, IExportTransformer>{
26

    
27
    private static final long serialVersionUID = 6078292713506530756L;
28
    @SuppressWarnings("unused")
29
	private static Logger logger = Logger.getLogger(XmlExportConfiguratorBase.class);
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
	 * @param berlinModelSource
41
	 * @param sourceReference
42
	 * @param destination
43
	 */
44
	protected XmlExportConfiguratorBase(File destination, ICdmDataSource cdmSource, IExportTransformer transformer) {
45
	   super(transformer);
46
	   setSource(cdmSource);
47
	   setDestination(destination);
48

    
49
	}
50

    
51

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

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

    
66
	@Override
67
    public String getDestinationNameString() {
68
		if (getDestination() != null){
69
			return getDestination().getName();
70
		}else{
71
			return "";
72
		}
73
	}
74

    
75
}
(58-58/63)