Project

General

Profile

Download (1.62 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.logging.log4j.LogManager;import org.apache.logging.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

    
29
    @SuppressWarnings("unused")
30
	private static Logger logger = LogManager.getLogger(XmlExportConfiguratorBase.class);
31

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

    
37
	private IdType idType = IdType.CDM_ID;
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

    
50
	}
51

    
52
	public IdType getIdType() {
53
		return idType;
54
	}
55
	public void setIdType(IdType idType) {
56
		this.idType = idType;
57
	}
58

    
59
	@Override
60
    public String getDestinationNameString() {
61
		if (getDestination() != null){
62
			return getDestination().getName();
63
		}else{
64
			return "";
65
		}
66
	}
67

    
68
}
(60-60/65)