3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.cdm
.io
.berlinModel
.in
;
13 import java
.util
.HashMap
;
16 import org
.apache
.log4j
.Logger
;
18 import eu
.etaxonomy
.cdm
.io
.common
.ImportStateBase
;
19 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
20 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
21 import eu
.etaxonomy
.cdm
.model
.common
.User
;
22 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
23 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonomicTree
;
30 public class BerlinModelImportState
extends ImportStateBase
<BerlinModelImportConfigurator
>{
31 @SuppressWarnings("unused")
32 private static final Logger logger
= Logger
.getLogger(BerlinModelImportState
.class);
34 Map
<String
, DefinedTermBase
> dbCdmDefTermMap
= new HashMap
<String
, DefinedTermBase
>();
36 Map
<String
, User
> usernameMap
= new HashMap
<String
, User
>();
38 * @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase)
41 public void initialize(BerlinModelImportConfigurator config
) {
42 String tableName
= "WebMarkerCategory_";
44 dbCdmDefTermMap
.put(tableName
+ 1, MarkerType
.COMPLETE());
47 public BerlinModelImportState() {
51 public Map
<String
, DefinedTermBase
> getDbCdmDefinedTermMap(){
52 return this.dbCdmDefTermMap
;
55 public void putDefinedTermToMap(String tableName
, String id
, DefinedTermBase term
){
56 this.dbCdmDefTermMap
.put(tableName
+ "_" + id
, term
);
59 public void putDefinedTermToMap(String tableName
, int id
, DefinedTermBase term
){
60 putDefinedTermToMap(tableName
, String
.valueOf(id
), term
);
63 public User
getUser(String username
){
64 return usernameMap
.get(username
);
67 public void putUser(String username
, User user
){
68 usernameMap
.put(username
, user
);