Changeset 2606
- Timestamp:
- 02/22/13 10:10:48 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sresult/SearchResultsController.java
r2599 r2606 69 69 public void executeSearch(Set<Treeitem> selectedItems, int maxRecords, String searchString, SRUVersion version) { 70 70 71 // execute search only if a user selected at least one endpint/corpus72 if (selectedItems.isEmpty()) {73 Messagebox.show("Please select at least one corpus!", "CLARIN-D FCS Aggregator", 0, Messagebox.EXCLAMATION);74 return;75 }76 71 // execute search only if a user entered a search query 77 72 if (searchString == null || searchString.isEmpty()) { … … 104 99 new Object[]{searchString, maxRecords}); 105 100 101 boolean requestSent = false; 106 102 for (Treeitem selectedItem : selectedItems) { 107 103 Object nodeData = selectedItem.getAttribute(CorpusTreeNodeRenderer.ITEM_DATA); 108 if (selectedItem.getParentItem().isSelected() || (nodeData instanceof Institution)) { 104 if ( (nodeData instanceof Institution) || 105 selectedItem.getParentItem().isSelected() ) { 109 106 // don't query institution, and don't query subcorpus separately 110 107 // if there whole parent corpus/endpoint will be queried 111 108 } else { 109 requestSent = true; 112 110 SearchResult resultsItem = executeRequest(nodeData, searchString, maxRecords, version); 113 111 resultsUnprocessed.add(resultsItem); 114 112 } 113 } 114 115 // there were no requests if a user didn't select at least one endpint/corpus 116 if (!requestSent) { 117 logger.log(Level.INFO, "No corpus/endpoint selected"); 118 Messagebox.show("Please select at least one corpus or endpoint!", "CLARIN-D FCS Aggregator", 0, Messagebox.EXCLAMATION); 115 119 } 116 120 }
Note: See TracChangeset
for help on using the changeset viewer.