jsp - semantic search using sparql-dl and owlapi -


I have a jsp based web application that uses Tomcat as a j2ee server, please apply to me one Recommend semantic search with the necessary steps?

I have added the code below. Public string query ontology (string value) throws overlotation activation {Ollantilla manager manager = OWLManager.createowLOntologyManager ();

  OWLDataFactory dataFactory = manager.getOWLDataFactory (); File otology file = new file ("D: \\ on.owl"); Ovlontology Psychological Ontology = Manager. Load Ontology Pharmatology Document (Ontology File); // OLLRJason Arstermarkt = New Structural Reasoner Fattarter () Vs. Regener (psychological ontology); OWLReasoner rHermit = New Reasoner. ReasonerFactory (). Make Reasoner (psychiatricOntology); {QueryEngine queryEng = QueryEngine.create (Manager, RHermit); Query query = query Create ("Select" C where {class (? C)} "); Query result result = queryEng.execute (query); Return result. ToString (); } Hold (query parser exception ex) {// return ex.getMessage (); } Hold (QueryEngineException pre) {ex.getMessage (); } Finally {rHermit.dispose (); //rStructral.dispose (); } Return tap; }   

The above code snippet shows a returning string value for the query executed and it is returned correctly. But when Java attributes try to get results in an error within the result

  Protects zero doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {// Process Request (request, reaction); String val = request.getParameter ("query"); PrintWriter out = response.getWriter (); GetInfo gi = new getInfo (); Include Request.getRequestDispatcher ("header.jsp") (request, response); outside. Print ("& lt; div id = content & gt;"); Out.print (val); Try {//gi.createIndex (); // from the list & lt; String & gt; Str = gi.createIndexSearcher (Val); //out.print(str); out.print (gi.queryOntology (val)); } Catch (prior to overlocation exception) {LoggerGetLugser (search.clash.gate_name ()) Logs (level. SESEE, ANNEL, X); } outside. Print ("& lt; / div & gt;"); Request.getRequestDispatcher ("footer.jsp") Included (request, response); }   

was used in the above code. How do I solve this? Thanks in advance

This is a screenshot of the I get error screen

given Thank you very much for the help, doing the trick by adding the dependencies required for the sparkle-DL API.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -