import eu.etaxonomy.cdm.api.service.IClassificationService;\r
import eu.etaxonomy.cdm.api.service.ITaxonService;\r
import eu.etaxonomy.cdm.api.service.ITermService;\r
-import eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator;\r
-import eu.etaxonomy.cdm.api.service.config.TaxonServiceConfiguratorImpl;\r
+import eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator;\r
+import eu.etaxonomy.cdm.api.service.config.FindTaxaAndNamesConfiguratorImpl;\r
import eu.etaxonomy.cdm.api.service.pager.Pager;\r
import eu.etaxonomy.cdm.api.service.search.SearchResult;\r
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;\r
PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);\r
pagerParams.normalizeAndValidate(response);\r
\r
- ITaxonServiceConfigurator config = new TaxonServiceConfiguratorImpl();\r
+ IFindTaxaAndNamesConfigurator config = new FindTaxaAndNamesConfiguratorImpl();\r
\r
config.setTaxonPropertyPath(initializationStrategy);\r
\r
*/\r
@RequestMapping(method = RequestMethod.GET, value={"findByDescriptionElementFullText"})\r
public Pager<SearchResult<TaxonBase>> dofindByDescriptionElementFullText(\r
- @RequestParam(value = "clazz", required = false) Class clazz,\r
+ @RequestParam(value = "clazz", required = false) Class<? extends DescriptionElementBase> clazz,\r
@RequestParam(value = "query", required = true) String queryString,\r
@RequestParam(value = "tree", required = false) UUID treeUuid,\r
@RequestParam(value = "features", required = false) UuidList featureUuids,\r
}\r
}\r
\r
- Pager<SearchResult<TaxonBase>> pager = service.findByDescriptionElementFullText(clazz, queryString, classification, features, languages, highlighting, pagerParams.getPageSize(), pagerParams.getPageIndex(), ((List<OrderHint>)null), initializationStrategy);\r
+ Pager<SearchResult<TaxonBase>> pager = service.findByDescriptionElementFullText(\r
+ clazz, queryString, classification, features, languages, highlighting,\r
+ pagerParams.getPageSize(), pagerParams.getPageIndex(), ((List<OrderHint>)null),\r
+ initializationStrategy);\r
+ return pager;\r
+ }\r
+\r
+ @RequestMapping(method = RequestMethod.GET, value={"findByFullText"})\r
+ public Pager<SearchResult<TaxonBase>> dofindByFullText(\r
+ @RequestParam(value = "clazz", required = false) Class<? extends TaxonBase> clazz,\r
+ @RequestParam(value = "query", required = true) String queryString,\r
+ @RequestParam(value = "tree", required = false) UUID treeUuid,\r
+ @RequestParam(value = "languages", required = false) List<Language> languages,\r
+ @RequestParam(value = "hl", required = false) Boolean highlighting,\r
+ @RequestParam(value = "pageNumber", required = false) Integer pageNumber,\r
+ @RequestParam(value = "pageSize", required = false) Integer pageSize,\r
+ HttpServletRequest request,\r
+ HttpServletResponse response\r
+ )\r
+ throws IOException, ParseException {\r
+\r
+ logger.info("findByFullText : " + request.getRequestURI() + "?" + request.getQueryString() );\r
+\r
+ PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);\r
+ pagerParams.normalizeAndValidate(response);\r
+\r
+ if(highlighting == null){\r
+ highlighting = false;\r
+ }\r
+\r
+ Classification classification = null;\r
+ if(treeUuid != null){\r
+ classification = classificationService.find(treeUuid);\r
+ }\r
+\r
+ Pager<SearchResult<TaxonBase>> pager = service.findByFullText(clazz, queryString, classification, languages,\r
+ highlighting, pagerParams.getPageSize(), pagerParams.getPageIndex(), ((List<OrderHint>)null),\r
+ initializationStrategy);\r
+ return pager;\r
+ }\r
+\r
+ @RequestMapping(method = RequestMethod.GET, value={"findByEverythingFullText"})\r
+ public Pager<SearchResult<TaxonBase>> dofindByEverythingFullText(\r
+ @RequestParam(value = "clazz", required = false) Class<? extends TaxonBase> clazz,\r
+ @RequestParam(value = "query", required = true) String queryString,\r
+ @RequestParam(value = "tree", required = false) UUID treeUuid,\r
+ @RequestParam(value = "languages", required = false) List<Language> languages,\r
+ @RequestParam(value = "hl", required = false) Boolean highlighting,\r
+ @RequestParam(value = "pageNumber", required = false) Integer pageNumber,\r
+ @RequestParam(value = "pageSize", required = false) Integer pageSize,\r
+ HttpServletRequest request,\r
+ HttpServletResponse response\r
+ )\r
+ throws IOException, ParseException {\r
+\r
+ logger.info("findByEverythingFullText : " + request.getRequestURI() + "?" + request.getQueryString() );\r
+\r
+ PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);\r
+ pagerParams.normalizeAndValidate(response);\r
+\r
+ if(highlighting == null){\r
+ highlighting = false;\r
+ }\r
+\r
+ Classification classification = null;\r
+ if(treeUuid != null){\r
+ classification = classificationService.find(treeUuid);\r
+ }\r
+\r
+ Pager<SearchResult<TaxonBase>> pager = service.findByEverythingFullText(\r
+ queryString, classification, languages, highlighting,\r
+ pagerParams.getPageSize(), pagerParams.getPageIndex(),\r
+ ((List<OrderHint>)null), initializationStrategy);\r
return pager;\r
}\r
}
\ No newline at end of file