Project

General

Profile

Download (1.47 KB) Statistics
| Branch: | Revision:
1
/**
2
* Copyright (C) 2015 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
package eu.etaxonomy.cdm.io.edaphobase;
10

    
11
import java.util.HashMap;
12
import java.util.HashSet;
13
import java.util.Map;
14
import java.util.Set;
15
import java.util.UUID;
16

    
17
import org.apache.log4j.Logger;
18

    
19
import eu.etaxonomy.cdm.io.common.DbImportStateBase;
20

    
21
/**
22
 * @author a.mueller
23
 * @since 18.12.2015
24
 *
25
 */
26
public class EdaphobaseImportState extends DbImportStateBase<EdaphobaseImportConfigurator, EdaphobaseImportState>{
27
    @SuppressWarnings("unused")
28
    private static final Logger logger = Logger.getLogger(EdaphobaseImportState.class);
29

    
30
    private final Map<String, UUID> authorMap = new HashMap<>();
31
    private final Set<Integer> synonymsWithAcceptedTaxa = new HashSet<>();
32

    
33
    /**
34
     * @param config
35
     */
36
    protected EdaphobaseImportState(EdaphobaseImportConfigurator config) {
37
        super(config);
38
    }
39

    
40
    public UUID getAuthorUuid(String key){
41
        return authorMap.get(key);
42
    }
43

    
44
    public void setAuthorMap(Map<String, UUID> authorMap){
45
        this.authorMap.putAll(authorMap);
46
    }
47

    
48
    public void addSynonymWithAcceptedTaxon(Integer synId){
49
        synonymsWithAcceptedTaxa.add(synId);
50
    }
51

    
52
    public boolean hasAcceptedTaxon (Integer synId){
53
        return synonymsWithAcceptedTaxa.contains(synId);
54
    }
55
}
(6-6/12)