some small improvements for PESI export
[cdmlib.git] / cdmlib-io / src / main / java / eu / etaxonomy / cdm / io / common / IoStateBase.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.cdm.io.common;
12
13 import org.apache.log4j.Logger;
14
15
16 /**
17 * @author a.mueller
18 * @created 11.05.2009
19 * @version 1.0
20 */
21 public abstract class IoStateBase<CONFIG extends IIoConfigurator, IO extends ICdmIO> {
22 // public abstract class IoStateBase<CONFIG extends IIoConfigurator, IO extends ICdmIO<IoStateBase<CONFIG, IO>>> {
23
24 @SuppressWarnings("unused")
25 private static final Logger logger = Logger.getLogger(IoStateBase.class);
26
27 private IO currentIO;
28
29 private boolean success = true;
30
31 CONFIG config;
32
33 /**
34 * @return the config
35 */
36 public CONFIG getConfig() {
37 return config;
38 }
39
40 /**
41 * @param config the config to set
42 */
43 public void setConfig(CONFIG config) {
44 this.config = config;
45 }
46
47 /**
48 * @param config
49 */
50 //TODO config not necessary ones it it implemented in constructor for Imports too.
51 public void initialize(CONFIG config){
52 this.config = config;
53 }
54
55 /**
56 * @param currentImport the currentImport to set
57 */
58 public void setCurrentIO(IO currentIO) {
59 this.currentIO = currentIO;
60 }
61
62 /**
63 * @return the currentImport
64 */
65 public IO getCurrentIO() {
66 return currentIO;
67 }
68
69 public void setSuccess(boolean success) {
70 this.success = success;
71 }
72
73 public void setUnsuccessfull(){
74 this.success = false;
75 }
76
77 public boolean isSuccess() {
78 return success;
79 }
80
81
82 }