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