Project

General

Profile

Download (2.08 KB) Statistics
| Branch: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
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.
8
*/
9

    
10
package eu.etaxonomy.cdm.io.berlinModel.in;
11

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

    
15
import org.apache.log4j.Logger;
16

    
17
import eu.etaxonomy.cdm.io.common.DbImportStateBase;
18
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
19
import eu.etaxonomy.cdm.model.common.MarkerType;
20

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

    
30
	private Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<String, DefinedTermBase>();
31
	
32
	private boolean isReferenceSecondPath = false;
33

    
34
	
35
	/* (non-Javadoc)
36
	 * @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase)
37
	 */
38
	@Override
39
	public void initialize(BerlinModelImportConfigurator config) {
40
//		super(config);
41
		String tableName = "WebMarkerCategory_";
42
		//webMarkerCategory
43
		dbCdmDefTermMap.put(tableName + 1, MarkerType.COMPLETE());
44
	}
45

    
46
	public BerlinModelImportState(BerlinModelImportConfigurator config) {
47
		super(config);
48
	}
49

    
50
	public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){
51
		return this.dbCdmDefTermMap;
52
	}
53
	
54
	public void putDefinedTermToMap(String tableName, String id, DefinedTermBase term){
55
		 this.dbCdmDefTermMap.put(tableName + "_" + id, term);
56
	}
57
	
58
	public void putDefinedTermToMap(String tableName, int id, DefinedTermBase term){
59
		putDefinedTermToMap(tableName, String.valueOf(id), term);
60
	}
61

    
62

    
63
	public boolean isReferenceSecondPath() {
64
		return isReferenceSecondPath;
65
	}
66

    
67
	public void setReferenceSecondPath(boolean isReferenceSecondPath) {
68
		this.isReferenceSecondPath = isReferenceSecondPath;
69
	}
70

    
71

    
72

    
73
    
74
}
(7-7/21)