Project

General

Profile

Download (2.74 KB) Statistics
| Branch: | 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.eflora.centralAfrica.checklist;
11

    
12
import java.util.HashMap;
13
import java.util.Map;
14
import java.util.UUID;
15

    
16
import org.apache.log4j.Logger;
17

    
18
import eu.etaxonomy.cdm.io.common.DbImportStateBase;
19
import eu.etaxonomy.cdm.model.common.MarkerType;
20
import eu.etaxonomy.cdm.model.common.User;
21
import eu.etaxonomy.cdm.model.reference.Reference;
22
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
23

    
24
/**
25
 * @author a.mueller
26
 * @since 11.05.2009
27
 * @version 1.0
28
 */
29
public class CentralAfricaChecklistImportState extends DbImportStateBase<CentralAfricaChecklistImportConfigurator, CentralAfricaChecklistImportState>{
30
	@SuppressWarnings("unused")
31
	private static final Logger logger = Logger.getLogger(CentralAfricaChecklistImportState.class);
32

    
33
	private Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<String, DefinedTermBase>();
34
	
35
	private String lastFamily;
36
	private String lastGenus;
37
	private Map<String, UUID> higherTaxonUuidMap = new HashMap<String, UUID>();
38

    
39
	private Reference genevaReference;
40

    
41

    
42
	public boolean containsHigherTaxon(String higherName) {
43
		return higherTaxonUuidMap.containsKey(higherName);
44
	}
45

    
46
	public UUID putHigherTaxon(String higherName, UUID uuid) {
47
		return higherTaxonUuidMap.put(higherName, uuid);
48
	}
49

    
50
	public UUID removeHigherTaxon(String higherName) {
51
		return higherTaxonUuidMap.remove(higherName);
52
	}
53

    
54
	public UUID getHigherTaxon(String higherName) {
55
		return higherTaxonUuidMap.get(higherName);
56
	}
57

    
58

    
59
	public CentralAfricaChecklistImportState(CentralAfricaChecklistImportConfigurator config) {
60
		super(config);
61
	}
62

    
63
	public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){
64
		return this.dbCdmDefTermMap;
65
	}
66
	
67
	public void putDefinedTermToMap(String tableName, String id, DefinedTermBase term){
68
		 this.dbCdmDefTermMap.put(tableName + "_" + id, term);
69
	}
70
	
71
	public void putDefinedTermToMap(String tableName, int id, DefinedTermBase term){
72
		putDefinedTermToMap(tableName, String.valueOf(id), term);
73
	}
74

    
75
	public void setLastFamily(String lastFamily) {
76
		this.lastFamily = lastFamily;
77
	}
78

    
79
	public String getLastFamily() {
80
		return lastFamily;
81
	}
82

    
83
	public void setLastGenus(String lastGenus) {
84
		this.lastGenus = lastGenus;
85
	}
86

    
87
	public String getLastGenus() {
88
		return lastGenus;
89
	}
90

    
91

    
92
	
93
	
94
	public Reference getGenevaReference() {
95
		return genevaReference;
96
	}
97
	public void setGenevaReference(Reference genevaReference) {
98
		this.genevaReference = genevaReference;
99
	}
100
	
101
    
102
}
(3-3/7)