Project

General

Profile

« Previous | Next » 

Revision 165e1209

Added by Andreas Müller over 4 years ago

ref #6794 , ref #7099 adapt app-import, pesi, eflora to modelchanges

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/globis/GlobisImportState.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
*/
......
21 21
import eu.etaxonomy.cdm.model.agent.Person;
22 22
import eu.etaxonomy.cdm.model.agent.Team;
23 23
import eu.etaxonomy.cdm.model.common.MarkerType;
24
import eu.etaxonomy.cdm.model.common.User;
25 24
import eu.etaxonomy.cdm.model.name.Rank;
25
import eu.etaxonomy.cdm.model.permission.User;
26 26
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
27 27

  
28 28
/**
......
35 35
	private static final Logger logger = Logger.getLogger(GlobisImportState.class);
36 36

  
37 37
	private Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<String, DefinedTermBase>();
38
	
38

  
39 39
	private Map<String, User> usernameMap = new HashMap<String, User>();
40
	
40

  
41 41
	private Map<Integer, Map<Integer,Rank>> rankMap;
42 42

  
43 43
	private Map<String, Person> personMap = new HashMap<String, Person>();
44
	
44

  
45 45
	private Map<String, Team> teamMap = new HashMap<String, Team>();
46
	
47
	
48
	
46

  
47

  
48

  
49 49
	@Override
50 50
	public void initialize(GlobisImportConfigurator config) {
51 51
//		super(config);
......
61 61
	public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){
62 62
		return this.dbCdmDefTermMap;
63 63
	}
64
	
64

  
65 65
	public void putDefinedTermToMap(String tableName, String id, DefinedTermBase term){
66 66
		 this.dbCdmDefTermMap.put(tableName + "_" + id, term);
67 67
	}
68
	
68

  
69 69
	public void putDefinedTermToMap(String tableName, int id, DefinedTermBase term){
70 70
		putDefinedTermToMap(tableName, String.valueOf(id), term);
71 71
	}
72
	
73
	public User getUser(String username){
72

  
73
	@Override
74
    public User getUser(String username){
74 75
		return usernameMap.get(username);
75 76
	}
76 77

  
77
	public void putUser(String username, User user){
78
	@Override
79
    public void putUser(String username, User user){
78 80
		usernameMap.put(username, user);
79 81
	}
80 82

  
......
91 93
//	public Map<Integer, Map<Integer,Rank>> getRankMap() {
92 94
//		return rankMap;
93 95
//	}
94
	
95
 
96

  
97

  
96 98
	/**
97 99
	 * Returns the CDM rank depending on the ERMS rankId and the ERMS kingdomId. Returns <code>
98 100
	 * null</code> if the rank does not exist.
......
117 119
	public void putPerson(String str, Person person){
118 120
		personMap.put(str, person);
119 121
	}
120
	
122

  
121 123

  
122 124
	public Person getPerson(String str){
123 125
		return personMap.get(str);
......
127 129
	public void putTeam(String str, Team team){
128 130
		teamMap.put(str, team);
129 131
	}
130
	
132

  
131 133

  
132 134
	public Team getTeam(String str){
133 135
		return teamMap.get(str);
134 136
	}
135
	
137

  
136 138
	public Set<AgentBase> getAgents(){
137 139
		Set<AgentBase> result = new HashSet<AgentBase>();
138 140
		result.addAll(personMap.values());
139 141
		result.addAll(teamMap.values());
140 142
		return result;
141 143
	}
142
	
144

  
143 145
}

Also available in: Unified diff