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.ferns;
|
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.common.DbImportStateBase;
|
19
|
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
20
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
21
|
import eu.etaxonomy.cdm.model.common.User;
|
22
|
import eu.etaxonomy.cdm.model.name.Rank;
|
23
|
|
24
|
/**
|
25
|
* @author a.mueller
|
26
|
* @created 11.05.2009
|
27
|
* @version 1.0
|
28
|
*/
|
29
|
public class CentralAfricaFernsImportState extends DbImportStateBase<CentralAfricaFernsImportConfigurator, CentralAfricaFernsImportState>{
|
30
|
@SuppressWarnings("unused")
|
31
|
private static final Logger logger = Logger.getLogger(CentralAfricaFernsImportState.class);
|
32
|
|
33
|
Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<String, DefinedTermBase>();
|
34
|
|
35
|
Map<String, User> usernameMap = new HashMap<String, User>();
|
36
|
|
37
|
private String taxonNumber;
|
38
|
private Rank currentRank;
|
39
|
|
40
|
|
41
|
/* (non-Javadoc)
|
42
|
* @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase)
|
43
|
*/
|
44
|
@Override
|
45
|
public void initialize(CentralAfricaFernsImportConfigurator config) {
|
46
|
// super(config);
|
47
|
String tableName = "WebMarkerCategory_";
|
48
|
//webMarkerCategory
|
49
|
dbCdmDefTermMap.put(tableName + 1, MarkerType.COMPLETE());
|
50
|
}
|
51
|
|
52
|
public CentralAfricaFernsImportState(CentralAfricaFernsImportConfigurator config) {
|
53
|
super(config);
|
54
|
}
|
55
|
|
56
|
public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){
|
57
|
return this.dbCdmDefTermMap;
|
58
|
}
|
59
|
|
60
|
public void putDefinedTermToMap(String tableName, String id, DefinedTermBase term){
|
61
|
this.dbCdmDefTermMap.put(tableName + "_" + id, term);
|
62
|
}
|
63
|
|
64
|
public void putDefinedTermToMap(String tableName, int id, DefinedTermBase term){
|
65
|
putDefinedTermToMap(tableName, String.valueOf(id), term);
|
66
|
}
|
67
|
|
68
|
public User getUser(String username){
|
69
|
return usernameMap.get(username);
|
70
|
}
|
71
|
|
72
|
public void putUser(String username, User user){
|
73
|
usernameMap.put(username, user);
|
74
|
}
|
75
|
|
76
|
public void setTaxonNumber(String taxonNumber) {
|
77
|
this.taxonNumber = taxonNumber;
|
78
|
}
|
79
|
|
80
|
public String getTaxonNumber() {
|
81
|
return taxonNumber;
|
82
|
}
|
83
|
|
84
|
public void setCurrentRank(Rank currentRank) {
|
85
|
this.currentRank = currentRank;
|
86
|
}
|
87
|
|
88
|
public Rank getCurrentRank() {
|
89
|
return currentRank;
|
90
|
}
|
91
|
|
92
|
|
93
|
|
94
|
}
|