Project

General

Profile

« Previous | Next » 

Revision da6c2341

Added by Andreas Müller almost 5 years ago

ref #7823 deduplicate usernames depending on secrefs, use xml imports (and other imports) as source, not username

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelImportState.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
......
11 11

  
12 12
import java.util.HashMap;
13 13
import java.util.Map;
14
import java.util.UUID;
14 15

  
15 16
import org.apache.log4j.Logger;
16 17

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

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

  
32 32
	private boolean isReferenceSecondPath = false;
33 33

  
34
	
35
	/* (non-Javadoc)
36
	 * @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase)
37
	 */
34
	private Map<String, UUID> xmlImportRefUuids = new HashMap<>();
35

  
36

  
38 37
	@Override
39 38
	public void initialize(BerlinModelImportConfigurator config) {
40 39
//		super(config);
......
50 49
	public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){
51 50
		return this.dbCdmDefTermMap;
52 51
	}
53
	
52

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

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

  
71 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

  
72 85

  
73
    
74 86
}

Also available in: Unified diff