Project

General

Profile

Download (2.75 KB) Statistics
| Branch: | Revision:
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.eflora.centralAfrica.checklist;
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.common.DbImportStateBase;
20
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
21
import eu.etaxonomy.cdm.model.common.MarkerType;
22
import eu.etaxonomy.cdm.model.common.User;
23
import eu.etaxonomy.cdm.model.reference.Reference;
24

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

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

    
40
	private Reference genevaReference;
41

    
42

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

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

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

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

    
59

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

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

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

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

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

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

    
92

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