Project

General

Profile

Download (2.28 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.berlinModel.in;
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.term.DefinedTermBase;
21

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

    
30
	private Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<>();
31

    
32
	private boolean isReferenceSecondPath = false;
33

    
34
	private Map<String, UUID> xmlImportRefUuids = new HashMap<>();
35

    
36

    
37
	@Override
38
	public void initialize(BerlinModelImportConfigurator config) {
39
//		super(config);
40
		String tableName = "WebMarkerCategory_";
41
		//webMarkerCategory
42
		dbCdmDefTermMap.put(tableName + 1, MarkerType.COMPLETE());
43
	}
44

    
45
	public BerlinModelImportState(BerlinModelImportConfigurator config) {
46
		super(config);
47
	}
48

    
49
	public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){
50
		return this.dbCdmDefTermMap;
51
	}
52

    
53
	public void putDefinedTermToMap(String tableName, String id, DefinedTermBase term){
54
		 this.dbCdmDefTermMap.put(tableName + "_" + id, term);
55
	}
56

    
57
	public void putDefinedTermToMap(String tableName, int id, DefinedTermBase term){
58
		putDefinedTermToMap(tableName, String.valueOf(id), term);
59
	}
60

    
61

    
62
	public boolean isReferenceSecondPath() {
63
		return isReferenceSecondPath;
64
	}
65

    
66
	public void setReferenceSecondPath(boolean isReferenceSecondPath) {
67
		this.isReferenceSecondPath = isReferenceSecondPath;
68
	}
69

    
70

    
71
    public UUID getXmlImportRefUuid(String username) {
72
        return xmlImportRefUuids.get(username);
73
    }
74

    
75
    /**
76
     * @param username
77
     * @param uuid
78
     */
79
    public void putXmlImportRefUuid(String username, UUID uuid) {
80
        xmlImportRefUuids.put(username, uuid);
81
    }
82

    
83

    
84

    
85

    
86
}
(8-8/22)