*/\r
@Controller\r
@RequestMapping(value = {"/taxon/{uuid}"})\r
-public class TaxonController extends AnnotatableController<TaxonBase, ITaxonService>\r
+public class TaxonController extends BaseController<TaxonBase, ITaxonService>\r
{\r
public static final Logger logger = Logger.getLogger(TaxonController.class);\r
\r
private IOccurrenceService occurrenceService;\r
@Autowired\r
private INameService nameService;\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
mv.addObject(nameService.getTaggedName(tb.getName().getUuid()));\r
return mv;\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
+ }\r
\r
}
\ No newline at end of file