Project

General

Profile

« Previous | Next » 

Revision fb3dec85

Added by Andreas Müller over 8 years ago

Latest changes for Cuba import

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/cuba/CubaImportState.java
18 18

  
19 19
import eu.etaxonomy.cdm.io.excel.common.ExcelImportState;
20 20
import eu.etaxonomy.cdm.io.excel.common.ExcelRowBase;
21
import eu.etaxonomy.cdm.model.reference.Reference;
21 22
import eu.etaxonomy.cdm.model.taxon.Classification;
22 23
import eu.etaxonomy.cdm.model.taxon.Taxon;
24
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
23 25

  
24 26
/**
25 27
 * @author a.mueller
......
30 32
	private static final Logger logger = Logger.getLogger(CubaImportState.class);
31 33

  
32 34
	private final Map<String, Taxon> higherTaxonTaxonMap = new HashMap<String, Taxon>();
33
	private final Map<String, UUID> higherTaxonUuidMap = new HashMap<String, UUID>();
34 35

  
35
//	private CyprusRow cyprusRow;
36
//	private CyprusDistributionRow cyprusDistributionRow;
36
	private final Map<String, UUID> higherTaxonUuidMap = new HashMap<String, UUID>();
37 37

  
38
	//classification
38 39
	private Classification classification;
40
    public Classification getClassification() {return classification;}
41
    public void setClassification(Classification classification) {this.classification = classification;}
39 42

  
43
    //current taxon
44
    private Taxon currentTaxon;
45
    public Taxon getCurrentTaxon() {return currentTaxon;}
46
    public void setCurrentTaxon(Taxon currentTaxon) {this.currentTaxon = currentTaxon;}
40 47

  
41
	public CubaImportState(CubaImportConfigurator config) {
42
		super(config);
43
	}
48
    //rootNode
49
    private TaxonNode rootNode;
50
    public void setRootNode(TaxonNode rootNode) {this.rootNode = rootNode;}
51
    public TaxonNode getRootNode() { return rootNode;}
52

  
53
    private Reference<?> secReference;
54
    public Reference<?> getSecReference() {return secReference;}
55
    public void setSecReference(Reference<?> secReference) {this.secReference = secReference;}
44 56

  
45 57

  
46
	public boolean containsHigherTaxon(String higherName) {
47
		return higherTaxonTaxonMap.containsKey(higherName);
58
    //Constructor
59
    public CubaImportState(CubaImportConfigurator config) {
60
		super(config);
48 61
	}
49 62

  
63

  
64
    //higher taxon
65
    public Taxon getHigherTaxon(String higherName) {
66
        return higherTaxonTaxonMap.get(higherName);
67
    }
50 68
	public Taxon putHigherTaxon(String higherName, Taxon taxon) {
51 69
		return higherTaxonTaxonMap.put(higherName, taxon);
52 70
	}
53

  
54 71
	public Taxon removeHigherTaxon(String higherName) {
55 72
		return higherTaxonTaxonMap.remove(higherName);
56 73
	}
74
    public boolean containsHigherTaxon(String higherName) {
75
        return higherTaxonTaxonMap.containsKey(higherName);
76
    }
57 77

  
58
	public Taxon getHigherTaxon(String higherName) {
59
		return higherTaxonTaxonMap.get(higherName);
60
	}
61

  
62

  
63
	public boolean containsHigherTaxonUuid(String higherName) {
64
		return higherTaxonUuidMap.containsKey(higherName);
65
	}
66

  
78
    //higher taxon uuid
79
    public UUID getHigherTaxonUuid(String higherName) {
80
        return higherTaxonUuidMap.get(higherName);
81
    }
67 82
	public UUID putHigherTaxon(String higherName, UUID uuid) {
68 83
		return higherTaxonUuidMap.put(higherName, uuid);
69 84
	}
70

  
71 85
	public UUID removeHigherTaxonUuid(String higherName) {
72 86
		return higherTaxonUuidMap.remove(higherName);
73 87
	}
74

  
75
	public UUID getHigherTaxonUuid(String higherName) {
76
		return higherTaxonUuidMap.get(higherName);
77
	}
78

  
79

  
80
    /**
81
     * @return
82
     */
83
    public Classification getClassification() {
84
        return classification;
88
    public boolean containsHigherTaxonUuid(String higherName) {
89
        return higherTaxonUuidMap.containsKey(higherName);
85 90
    }
86 91

  
87

  
88
    /**
89
     * @param classification the classification to set
90
     */
91
    public void setClassification(Classification classification) {
92
        this.classification = classification;
93
    }
94

  
95

  
96

  
97

  
98

  
99
//	/**
100
//	 * @return the cyprusRow
101
//	 */
102
//	public CyprusRow getCyprusRow() {
103
//		return cyprusRow;
104
//	}
105
//
106
//	/**
107
//	 * @param cyprusRow the normalExplicitRow to set
108
//	 */
109
//	public void setCyprusRow(CyprusRow cyprusRow) {
110
//		this.cyprusRow = cyprusRow;
111
//	}
112

  
113

  
114
//	/**
115
//	 * @return the cyprusRow
116
//	 */
117
//	public CyprusDistributionRow getCyprusDistributionRow() {
118
//		return cyprusDistributionRow;
119
//	}
120
//
121
//	/**
122
//	 * @param cyprusRow the normalExplicitRow to set
123
//	 */
124
//	public void setCyprusDistributionRow(CyprusDistributionRow cyprusRow) {
125
//		this.cyprusDistributionRow = cyprusRow;
126
//	}
127

  
128

  
129

  
130

  
131 92
}

Also available in: Unified diff