Updates for terminology annotation, sending submission URL from jsp to javascript instead of hard-coding. Also including some basic validation by preventing submission when no terms are selected.
This commit is contained in:
parent
5e60e05812
commit
dd44eeb314
4 changed files with 22 additions and 13 deletions
|
@ -53,6 +53,7 @@ public class ProcessTerminologyController extends VitroHttpServlet {
|
|||
}
|
||||
|
||||
int numberTerms = termsArray.length;
|
||||
log.debug("Number of terms included is " + numberTerms);
|
||||
//if multiple values then need to process this differently by adding additional
|
||||
//fields, assertions, etc. as well as changing the URL slightly
|
||||
String url = "/edit/processRdfForm2.jsp?" + vreq.getQueryString();
|
||||
|
@ -68,7 +69,7 @@ public class ProcessTerminologyController extends VitroHttpServlet {
|
|||
//Generate new url which will map input fields to value
|
||||
url = generateUrl(editConfig, vreq);
|
||||
}
|
||||
|
||||
log.debug("Submitting to url using the following parameters " + url);
|
||||
RequestDispatcher dispatcher = req.getRequestDispatcher(url);
|
||||
dispatcher.forward(req, resp);
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public class UMLSTerminologyAnnotation extends VitroHttpServlet {
|
|||
try{
|
||||
//Get parameter
|
||||
String entryText = vreq.getParameter("searchTerm");
|
||||
System.out.println("Entry text is " + entryText);
|
||||
log.debug("Executing UMLS term retrieval using " + entryText);
|
||||
//TODO: Find a non-deprecated mechanism to do so
|
||||
String dataUrl = submissionUrl + "textToProcess=" + URLEncoder.encode(entryText) + "&format=json";
|
||||
try{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue