Revision bfda0eba
Added by Patrick Plitzner almost 7 years ago
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/TaxonListController.java | ||
---|---|---|
130 | 130 |
* internally always is appended to the query string, a search |
131 | 131 |
* always compares the query string with the beginning of a name. |
132 | 132 |
* - <i>required parameter</i> |
133 |
* @param treeUuid
|
|
134 |
* the {@link UUID} of a {@link Classification} to which the |
|
133 |
* @param classificationNodeUuid
|
|
134 |
* the {@link UUID} of the root node of a {@link Classification} to which the
|
|
135 | 135 |
* search is to be restricted. - <i>optional parameter</i> |
136 | 136 |
* @param areas |
137 | 137 |
* restrict the search to a set of geographic {@link NamedArea}s. |
... | ... | |
158 | 158 |
@RequestMapping(method = RequestMethod.GET, value={"search"}) |
159 | 159 |
public Pager<SearchResult<TaxonBase>> doSearch( |
160 | 160 |
@RequestParam(value = "query", required = true) String query, |
161 |
@RequestParam(value = "tree", required = false) UUID treeUuid,
|
|
161 |
@RequestParam(value = "classificationNodeUuid", required = false) UUID classificationNodeUuid,
|
|
162 | 162 |
@RequestParam(value = "area", required = false) DefinedTermBaseList<NamedArea> areaList, |
163 | 163 |
@RequestParam(value = "status", required = false) Set<PresenceAbsenceTerm> status, |
164 | 164 |
@RequestParam(value = "pageNumber", required = false) Integer pageNumber, |
... | ... | |
201 | 201 |
} |
202 | 202 |
|
203 | 203 |
Classification classification = null; |
204 |
if(treeUuid != null){ |
|
205 |
classification = classificationService.find(treeUuid); |
|
204 |
if(classificationNodeUuid != null){ |
|
205 |
TaxonNode rootNode = taxonNodeService.load(classificationNodeUuid); |
|
206 |
if(rootNode!=null){ |
|
207 |
classification = rootNode.getClassification(); |
|
208 |
} |
|
206 | 209 |
} |
207 | 210 |
|
208 | 211 |
return service.findTaxaAndNamesByFullText(searchModes, query, |
Also available in: Unified diff
#5890 Adjust service method to work on taxon node instead of
classification