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.excel.common;
|
11
|
|
12
|
import java.util.HashMap;
|
13
|
|
14
|
import org.apache.log4j.Logger;
|
15
|
|
16
|
import eu.etaxonomy.cdm.io.common.ImportStateBase;
|
17
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
18
|
|
19
|
/**
|
20
|
* @author a.mueller
|
21
|
* @since 11.05.2009
|
22
|
*/
|
23
|
public class ExcelImportState<CONFIG extends ExcelImportConfiguratorBase, ROW extends ExcelRowBase>
|
24
|
extends ImportStateBase<CONFIG, ExcelImportBase>{
|
25
|
@SuppressWarnings("unused")
|
26
|
private static final Logger logger = Logger.getLogger(ExcelImportState.class);
|
27
|
|
28
|
private Integer currentLine;
|
29
|
private ROW currentRow;
|
30
|
private HashMap<String, String> originalRecord;
|
31
|
|
32
|
private Reference sourceReference;
|
33
|
|
34
|
|
35
|
public ExcelImportState(CONFIG config) {
|
36
|
super(config);
|
37
|
}
|
38
|
|
39
|
|
40
|
public Integer getCurrentLine() {
|
41
|
return currentLine;
|
42
|
}
|
43
|
public void setCurrentLine(Integer currentLine) {
|
44
|
this.currentLine = currentLine;
|
45
|
}
|
46
|
|
47
|
/**
|
48
|
* Increments the current line
|
49
|
*/
|
50
|
public void incCurrentLine(){
|
51
|
this.currentLine++;
|
52
|
}
|
53
|
|
54
|
|
55
|
/**
|
56
|
* The data holder class in which results for the current record are stored.
|
57
|
* @return
|
58
|
*/
|
59
|
public ROW getCurrentRow() {
|
60
|
return currentRow;
|
61
|
}
|
62
|
|
63
|
public void setCurrentRow(ROW currentRow) {
|
64
|
this.currentRow = currentRow;
|
65
|
}
|
66
|
|
67
|
public HashMap<String,String> getOriginalRecord(){
|
68
|
return this.originalRecord;
|
69
|
}
|
70
|
|
71
|
public void setOriginalRecord(HashMap<String,String> originalRecord){
|
72
|
this.originalRecord = originalRecord;
|
73
|
}
|
74
|
|
75
|
|
76
|
public Reference getSourceReference() {
|
77
|
return this.sourceReference;
|
78
|
}
|
79
|
public void setSourceReference(Reference sourceReference) {
|
80
|
this.sourceReference = sourceReference;
|
81
|
}
|
82
|
|
83
|
}
|