Revision 91bfe65c
Added by Patrick Plitzner over 10 years ago
- removed list of DerivedUnits from EditorInput to make it more light-weight
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/dataimport/DerivedUnitEditorInput.java | ||
---|---|---|
12 | 12 |
import java.io.IOException; |
13 | 13 |
import java.io.InputStream; |
14 | 14 |
import java.net.URISyntaxException; |
15 |
import java.util.ArrayList;
|
|
15 |
import java.util.Collections;
|
|
16 | 16 |
import java.util.List; |
17 | 17 |
|
18 | 18 |
import org.apache.http.client.ClientProtocolException; |
... | ... | |
40 | 40 |
|
41 | 41 |
private final BioCaseQuery query; |
42 | 42 |
|
43 |
private List<SpecimenOrObservationBase> results; |
|
44 |
|
|
45 | 43 |
/** |
46 | 44 |
* @param results |
47 | 45 |
*/ |
48 | 46 |
public DerivedUnitEditorInput(BioCaseQuery query) { |
49 | 47 |
this.query = query; |
50 |
results = new ArrayList<SpecimenOrObservationBase>(); |
|
51 | 48 |
} |
52 | 49 |
|
53 | 50 |
/* (non-Javadoc) |
... | ... | |
104 | 101 |
* @return the results |
105 | 102 |
*/ |
106 | 103 |
public List<SpecimenOrObservationBase> getResults() { |
107 |
if(results!=null && !results.isEmpty()){ |
|
108 |
return results; |
|
109 |
} |
|
110 | 104 |
String errorMessage = "Could not execute query " + query; |
105 |
List<SpecimenOrObservationBase> results = Collections.EMPTY_LIST; |
|
111 | 106 |
try { |
112 | 107 |
InputStream resultStream = new BioCaseQueryServiceWrapper().query(query); |
113 | 108 |
Abcd206ImportConfigurator configurator = Abcd206ImportConfigurator.NewInstance(resultStream, null, false); |
Also available in: Unified diff