2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.io
.berlinModel
.in
;
12 import java
.util
.HashMap
;
15 import org
.apache
.log4j
.Logger
;
17 import eu
.etaxonomy
.cdm
.io
.common
.DbImportStateBase
;
18 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
19 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
26 public class BerlinModelImportState
extends DbImportStateBase
<BerlinModelImportConfigurator
, BerlinModelImportState
>{
27 @SuppressWarnings("unused")
28 private static final Logger logger
= Logger
.getLogger(BerlinModelImportState
.class);
30 private Map
<String
, DefinedTermBase
> dbCdmDefTermMap
= new HashMap
<String
, DefinedTermBase
>();
32 private boolean isReferenceSecondPath
= false;
36 * @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase)
39 public void initialize(BerlinModelImportConfigurator config
) {
41 String tableName
= "WebMarkerCategory_";
43 dbCdmDefTermMap
.put(tableName
+ 1, MarkerType
.COMPLETE());
46 public BerlinModelImportState(BerlinModelImportConfigurator config
) {
50 public Map
<String
, DefinedTermBase
> getDbCdmDefinedTermMap(){
51 return this.dbCdmDefTermMap
;
54 public void putDefinedTermToMap(String tableName
, String id
, DefinedTermBase term
){
55 this.dbCdmDefTermMap
.put(tableName
+ "_" + id
, term
);
58 public void putDefinedTermToMap(String tableName
, int id
, DefinedTermBase term
){
59 putDefinedTermToMap(tableName
, String
.valueOf(id
), term
);
63 public boolean isReferenceSecondPath() {
64 return isReferenceSecondPath
;
67 public void setReferenceSecondPath(boolean isReferenceSecondPath
) {
68 this.isReferenceSecondPath
= isReferenceSecondPath
;