some generics
[cdmlib.git] / cdmlib-io / src / main / java / eu / etaxonomy / cdm / io / common / XmlExportConfiguratorBase.java
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 @SuppressWarnings("unused")
26 private static Logger logger = Logger.getLogger(XmlExportConfiguratorBase.class);
27
28 // private XmlExportState<XmlExportConfigurator> state;
29
30 public enum IdType{
31 CDM_ID,
32 ORIGINAL_SOURCE_ID
33 }
34
35 private IdType idType = IdType.CDM_ID;
36
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 // setState(new XmlExportState<XmlExportConfigurator>());
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
67 /* (non-Javadoc)
68 * @see eu.etaxonomy.cdm.io.common.IIoConfigurator#getDestinationNameString()
69 */
70 public String getDestinationNameString() {
71 if (getDestination() != null){
72 return getDestination().getName();
73 }else{
74 return "";
75 }
76 }
77
78
79 // /**
80 // * @return the state
81 // */
82 // public XmlExportState<XmlExportConfigurator> getState() {
83 // return state;
84 // }
85 //
86 // /**
87 // * @param state the state to set
88 // */
89 // public void setState(BerlinModelExportState<XmlExportConfigurator> state) {
90 // this.state = state;
91 // }
92 //
93
94
95
96 }