private IOccurrenceService occurrenceService;\r
@Autowired\r
private INameService nameService;\r
- @Autowired \r
- private ITaxonService taxonService; \r
- \r
+ @Autowired\r
+ private ITaxonService taxonService;\r
+\r
\r
protected static final List<String> TAXONNODE_INIT_STRATEGY = Arrays.asList(new String []{\r
"taxonNodes"\r
return null;\r
}\r
}\r
- \r
\r
- @RequestMapping(value = "specimensOrObersvations", method = RequestMethod.GET)\r
- public ModelAndView doListSpecimensOrObersvations(\r
+\r
+ @RequestMapping(value = "specimensOrObservations", method = RequestMethod.GET)\r
+ public ModelAndView doListSpecimensOrObservations(\r
@PathVariable("uuid") UUID uuid,\r
HttpServletRequest request,\r
HttpServletResponse response) throws IOException {\r
- logger.info("doListSpecimensOrObersvations() - " + request.getServletPath());\r
+ logger.info("doListSpecimensOrObservations() - " + request.getServletPath());\r
\r
ModelAndView mv = new ModelAndView();\r
\r
orderHints.add(new OrderHint("titleCache", SortOrder.DESCENDING));\r
\r
if(tb instanceof Taxon){\r
- List<SpecimenOrObservationBase> specimensOrObersvations = occurrenceService.listByAnyAssociation(\r
- null, (Taxon)tb, null, 0, orderHints, null);\r
+ List<SpecimenOrObservationBase> specimensOrObersvations = occurrenceService.listByAssociatedTaxon(null, null, (Taxon)tb, null, null, null, orderHints, null);\r
mv.addObject(specimensOrObersvations);\r
} else {\r
HttpStatusMessage.UUID_REFERENCES_WRONG_TYPE.send(response);\r
mv.addObject(nameService.getTaggedName(tb.getName().getUuid()));\r
return mv;\r
}\r
- \r
+\r
+ /**\r
+ * FIXME change @RequestMapping to /taxon/findBestMatchingTaxon and also move into TaxonListController\r
+ */\r
@RequestMapping(value = "/bestMatchingTaxon/{taxonName}", method = RequestMethod.GET)\r
public TaxonBase doFindBestMatchingTaxon(\r
- @PathVariable("taxonName") String taxonName,\r
- HttpServletRequest request, \r
- HttpServletResponse response)throws IOException {\r
- \r
- Taxon bestMatchingTaxon = taxonService.findBestMatchingTaxon(taxonName);\r
- \r
- return bestMatchingTaxon;\r
- \r
- \r
+ @PathVariable("taxonName") String taxonName,\r
+ HttpServletRequest request,\r
+ HttpServletResponse response)throws IOException {\r
+\r
+ Taxon bestMatchingTaxon = taxonService.findBestMatchingTaxon(taxonName);\r
+\r
+ return bestMatchingTaxon;\r
+\r
+\r
}\r
\r
}
\ No newline at end of file