further refactoring to make Excel imports more generic (in cdm-app)
[cdmlib-apps.git] / app-import / src / main / java / eu / etaxonomy / cdm / io / cyprus / CyprusImportState.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.cyprus;
12
13 import java.util.HashMap;
14 import java.util.Map;
15
16 import org.apache.log4j.Logger;
17
18 import eu.etaxonomy.cdm.io.excel.common.ExcelImportState;
19 import eu.etaxonomy.cdm.io.excel.common.ExcelRowBase;
20 import eu.etaxonomy.cdm.model.taxon.Taxon;
21
22 /**
23 * @author a.mueller
24 * @created 11.05.2009
25 * @version 1.0
26 */
27 public class CyprusImportState extends ExcelImportState<CyprusImportConfigurator, ExcelRowBase>{
28 @SuppressWarnings("unused")
29 private static final Logger logger = Logger.getLogger(CyprusImportState.class);
30
31 private Map<String, Taxon> higherTaxonTaxonMap = new HashMap<String, Taxon>();
32
33 private CyprusRow cyprusRow;
34 private CyprusDistributionRow cyprusDistributionRow;
35
36
37 public CyprusImportState(CyprusImportConfigurator config) {
38 super(config);
39 }
40
41
42 public boolean containsHigherTaxon(String higherName) {
43 return higherTaxonTaxonMap.containsKey(higherName);
44 }
45
46 public Taxon putHigherTaxon(String higherName, Taxon taxon) {
47 return higherTaxonTaxonMap.put(higherName, taxon);
48 }
49
50 public Taxon removeHigherTaxon(String higherName) {
51 return higherTaxonTaxonMap.remove(higherName);
52 }
53
54 public Taxon getHigherTaxon(String higherName) {
55 return higherTaxonTaxonMap.get(higherName);
56 }
57
58
59
60
61 // public boolean containsHigherTaxonUuid(String higherName) {
62 // return higherTaxonUuidMap.containsKey(higherName);
63 // }
64 //
65 // public UUID putHigherTaxon(String higherName, UUID uuid) {
66 // return higherTaxonUuidMap.put(higherName, uuid);
67 // }
68 //
69 // public UUID removeHigherTaxon(String higherName) {
70 // return higherTaxonUuidMap.remove(higherName);
71 // }
72 //
73 // public UUID getHigherTaxon(String higherName) {
74 // return higherTaxonUuidMap.get(higherName);
75 // }
76
77
78
79 /**
80 * @return the cyprusRow
81 */
82 public CyprusRow getCyprusRow() {
83 return cyprusRow;
84 }
85
86 /**
87 * @param cyprusRow the normalExplicitRow to set
88 */
89 public void setCyprusRow(CyprusRow cyprusRow) {
90 this.cyprusRow = cyprusRow;
91 }
92
93
94 /**
95 * @return the cyprusRow
96 */
97 public CyprusDistributionRow getCyprusDistributionRow() {
98 return cyprusDistributionRow;
99 }
100
101 /**
102 * @param cyprusRow the normalExplicitRow to set
103 */
104 public void setCyprusDistributionRow(CyprusDistributionRow cyprusRow) {
105 this.cyprusDistributionRow = cyprusRow;
106 }
107
108
109
110
111 }