Revision beab7c7b
Added by Andreas Müller over 3 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ImportResult.java | ||
---|---|---|
24 | 24 |
* @since 5 Aug 2015 |
25 | 25 |
*/ |
26 | 26 |
public class ImportResult extends IoResultBase implements Serializable { |
27 |
|
|
27 | 28 |
private static final long serialVersionUID = -7299667532720042100L; |
28 | 29 |
|
29 | 30 |
private List<byte[]> reports = new ArrayList<>(); |
... | ... | |
91 | 92 |
public List<byte[]> getReports() { |
92 | 93 |
return reports; |
93 | 94 |
} |
94 |
|
|
95 |
/** |
|
96 |
* @param reports the reports to set |
|
97 |
*/ |
|
98 | 95 |
public void setReports(List<byte[]> reports) { |
99 | 96 |
this.reports = reports; |
100 | 97 |
} |
... | ... | |
141 | 138 |
this.addNewRecord(CdmBase.deproxy(newRecord).getClass().getSimpleName()); |
142 | 139 |
} |
143 | 140 |
|
144 |
|
|
145 | 141 |
//updated records |
146 | 142 |
public void addUpdatedRecord(String clazz){ |
147 | 143 |
addUpdatedRecords(clazz, 1); |
... | ... | |
172 | 168 |
} |
173 | 169 |
} |
174 | 170 |
|
175 |
|
|
176 | 171 |
public void addDeletedRecord(CdmBase deletedRecord) { |
177 | 172 |
this.addDeletedRecord(CdmBase.deproxy(deletedRecord).getClass().getSimpleName()); |
178 | 173 |
} |
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/fact/altitude/in/AltitudeExcelImport.java | ||
---|---|---|
45 | 45 |
// return; |
46 | 46 |
taxon = Taxon.NewInstance(null, null); |
47 | 47 |
} |
48 |
|
|
48 | 49 |
UUID featureUuid = Feature.uuidAltitude; |
49 | 50 |
String featureLabel = "Altitude"; |
50 | 51 |
Feature feature = getFeature(state, featureUuid); |
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/fact/altitude/in/AltitudeExcelImportConfigurator.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.cdm.io.fact.altitude.in; |
10 | 10 |
|
11 | 11 |
import java.net.URI; |
12 |
import java.util.UUID; |
|
13 | 12 |
|
14 | 13 |
import eu.etaxonomy.cdm.database.ICdmDataSource; |
15 | 14 |
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer; |
... | ... | |
25 | 24 |
|
26 | 25 |
private static final long serialVersionUID = -6403743396163163359L; |
27 | 26 |
|
28 |
private UUID featureUuid; |
|
29 |
|
|
30 | 27 |
public static AltitudeExcelImportConfigurator NewInstance(URI uri, ICdmDataSource destination){ |
31 | 28 |
return new AltitudeExcelImportConfigurator(uri, destination, null); |
32 | 29 |
} |
... | ... | |
65 | 62 |
return new AltitudeExcelFormatAnalyzer(this); |
66 | 63 |
} |
67 | 64 |
|
68 |
public UUID getFeatureUuid() { |
|
69 |
return featureUuid; |
|
70 |
} |
|
71 |
|
|
72 |
public void setFeatureUuid(UUID featureUuid) { |
|
73 |
this.featureUuid = featureUuid; |
|
74 |
} |
|
75 |
|
|
76 | 65 |
@Override |
77 | 66 |
public NomenclaturalCode getNomenclaturalCode() { |
78 | 67 |
NomenclaturalCode result = super.getNomenclaturalCode(); |
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/fact/categorical/in/CategoricalDataExcelImportConfigurator.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
private UUID stateVocabularyUuid; |
31 | 31 |
private String stateVocabularyLabel; |
32 |
private UUID featureUuid; |
|
33 | 32 |
|
34 | 33 |
public static CategoricalDataExcelImportConfigurator NewInstance(URI uri, ICdmDataSource destination){ |
35 | 34 |
return new CategoricalDataExcelImportConfigurator(uri, destination, null); |
... | ... | |
86 | 85 |
this.stateVocabularyLabel = stateVocabularyLabel; |
87 | 86 |
} |
88 | 87 |
|
89 |
public UUID getFeatureUuid() { |
|
90 |
return featureUuid; |
|
91 |
} |
|
92 |
public void setFeatureUuid(UUID featureUuid) { |
|
93 |
this.featureUuid = featureUuid; |
|
94 |
} |
|
95 |
|
|
96 | 88 |
} |
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/fact/in/FactExcelImportConfiguratorBase.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.cdm.io.fact.in; |
10 | 10 |
|
11 | 11 |
import java.net.URI; |
12 |
import java.util.UUID; |
|
12 | 13 |
|
13 | 14 |
import eu.etaxonomy.cdm.database.ICdmDataSource; |
14 | 15 |
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer; |
... | ... | |
26 | 27 |
|
27 | 28 |
private static final long serialVersionUID = 1649010514975388511L; |
28 | 29 |
|
30 |
private UUID featureUuid; |
|
31 |
private String featureLabel; |
|
32 |
|
|
29 | 33 |
protected FactExcelImportConfiguratorBase(URI uri, ICdmDataSource destination, IInputTransformer transformer) { |
30 | 34 |
super(uri, destination, transformer); |
31 | 35 |
} |
32 | 36 |
|
33 | 37 |
public abstract A getAnalyzer(); |
34 | 38 |
|
39 |
|
|
40 |
|
|
41 |
public UUID getFeatureUuid() { |
|
42 |
return featureUuid; |
|
43 |
} |
|
44 |
public void setFeatureUuid(UUID featureUuid) { |
|
45 |
this.featureUuid = featureUuid; |
|
46 |
} |
|
47 |
|
|
48 |
public String getFeatureLabel() { |
|
49 |
return this.featureLabel; |
|
50 |
} |
|
51 |
public void setFeatureLabel(String featureLabel) { |
|
52 |
this.featureLabel = featureLabel; |
|
53 |
} |
|
35 | 54 |
} |
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/common/IoResultBase.java | ||
---|---|---|
180 | 180 |
return report; |
181 | 181 |
} |
182 | 182 |
|
183 |
|
|
184 |
|
|
185 |
|
|
186 |
|
|
187 |
/** |
|
188 |
* @param report |
|
189 |
*/ |
|
190 | 183 |
protected void addShortDescription(StringBuffer report) { |
191 | 184 |
//do nothing |
192 |
|
|
193 | 185 |
} |
194 |
/** |
|
195 |
* @param report |
|
196 |
* @param label |
|
197 |
* @param list |
|
198 |
*/ |
|
186 |
|
|
199 | 187 |
private void addErrorReport(StringBuffer report, String label, List<IoInfo> list) { |
200 | 188 |
if (!list.isEmpty()){ |
201 | 189 |
report.append("\n\n" + label + ":\n" + StringUtils.leftPad("", label.length()+1, "=")); |
Also available in: Unified diff
cleanup