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
.DbImportStateBase
;
19 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
20 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
27 public class BerlinModelImportState
extends DbImportStateBase
<BerlinModelImportConfigurator
, BerlinModelImportState
>{
28 @SuppressWarnings("unused")
29 private static final Logger logger
= Logger
.getLogger(BerlinModelImportState
.class);
31 private Map
<String
, DefinedTermBase
> dbCdmDefTermMap
= new HashMap
<String
, DefinedTermBase
>();
33 private boolean isReferenceSecondPath
= false;
37 * @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase)
40 public void initialize(BerlinModelImportConfigurator config
) {
42 String tableName
= "WebMarkerCategory_";
44 dbCdmDefTermMap
.put(tableName
+ 1, MarkerType
.COMPLETE());
47 public BerlinModelImportState(BerlinModelImportConfigurator config
) {
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
);
64 public boolean isReferenceSecondPath() {
65 return isReferenceSecondPath
;
68 public void setReferenceSecondPath(boolean isReferenceSecondPath
) {
69 this.isReferenceSecondPath
= isReferenceSecondPath
;