HttpServletRequest request,
HttpServletResponse response,
Object command,
BindException bindExp) throws Exception {
List<String> ubioResultErrors = new ArrayList<String>();
TaxonLabel taxonLabel = (TaxonLabel) command;
taxonLabel.setTaxonVariant(null);
processRedirection(request, "onSubmit");
TaxonVariant variant = getTaxonVariant(request, taxonLabel, ubioResultErrors);
if ( variant != null ) {
Map<Long,String> homonyms = (Map<Long,String>)request.getSession().getAttribute("homonyms");
if ( homonyms != null ) {
homonyms.remove(taxonLabel.getId());
request.getSession().setAttribute("homonyms", homonyms);
}
taxonLabel.setAttemptedLinking(true);
taxonLabel.setTaxonVariant(variant);
getTaxonLabelService().update(taxonLabel);
getTaxonLabelService().updateAndRegenerateNewick(taxonLabel);// Trees still need to be updated
return new ModelAndView(getSuccessView());
}
long starttime = System.currentTimeMillis();
variant = getTaxonLabelService().createFromUBIOService(taxonLabel);
if ( variant == null ) {
// For now user is not forced to enter the valid Taxon Label.
// String message = "Taxon label: " + alabel + " is invalid.";
// request.setAttribute("errors", message);
// return showForm(request, response, bindExp);
}
else {
taxonLabel.setAttemptedLinking(true);
taxonLabel.setTaxonVariant(variant);
getTaxonLabelService().update(taxonLabel);
}
if ( LOGGER.isInfoEnabled() ) {
long endtime = System.currentTimeMillis();