Project

General

Profile

Download (2.45 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.pesi.indexFungorum;
11

    
12
import java.util.ArrayList;
13
import java.util.HashMap;
14
import java.util.List;
15
import java.util.Map;
16
import java.util.UUID;
17

    
18
import org.apache.log4j.Logger;
19

    
20
import eu.etaxonomy.cdm.io.common.DbImportStateBase;
21
import eu.etaxonomy.cdm.model.permission.User;
22
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
23
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
24

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

    
33
	private Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<>();
34

    
35
	private Map<String, User> usernameMap = new HashMap<>();
36

    
37
	private Map<String, TaxonBase> speciesMap;
38

    
39
	private List<UUID> infraspecificTaxaUUIDs = new ArrayList<>();
40

    
41

    
42

    
43
	public IndexFungorumImportState(IndexFungorumImportConfigurator config) {
44
		super(config);
45
	}
46

    
47
	@Override
48
	public void initialize(IndexFungorumImportConfigurator config) {
49
//		super(config);
50
	}
51

    
52
    public List<UUID> getInfraspecificTaxaUUIDs() {
53
        return infraspecificTaxaUUIDs;
54
    }
55
    public void setInfraspecificTaxaUUIDs(List<UUID> infraspecificTaxaUUIDs) {
56
        this.infraspecificTaxaUUIDs = infraspecificTaxaUUIDs;
57
    }
58

    
59
	public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){
60
		return this.dbCdmDefTermMap;
61
	}
62
	public void putDefinedTermToMap(String tableName, String id, DefinedTermBase term){
63
		 this.dbCdmDefTermMap.put(tableName + "_" + id, term);
64
	}
65
	public void putDefinedTermToMap(String tableName, int id, DefinedTermBase term){
66
		putDefinedTermToMap(tableName, String.valueOf(id), term);
67
	}
68

    
69
	@Override
70
    public User getUser(String username){
71
		return usernameMap.get(username);
72
	}
73
	@Override
74
    public void putUser(String username, User user){
75
		usernameMap.put(username, user);
76
	}
77

    
78
    public Map<String, TaxonBase> getSpeciesMap() {
79
        return speciesMap;
80
    }
81
    public void setSpeciesMap(Map<String, TaxonBase> speciesMap) {
82
        this.speciesMap = speciesMap;
83
    }
84

    
85
}
(6-6/10)