<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%@page import="com.hp.hpl.jena.rdf.model.ModelMaker"%> <%@page import="java.util.Iterator"%> <%@page import="java.util.ArrayList"%> <%@page import="java.util.List"%>

SPARQL Query

query:

Format for SELECT query results:

Format for CONSTRUCT and DESCRIBE query results:

    <% try{ if( request.getSession() != null && application.getAttribute("vitroJenaModelMaker") != null ){ ModelMaker maker = (ModelMaker) application.getAttribute("vitroJenaModelMaker"); for (Iterator it = maker.listModels(); it.hasNext(); ) { String modelName = (String) it.next(); %>
  • <%=modelName%>
  • <% } }else{ %>
  • could not find named models in session
  • <% } }catch(Exception ex){ %>
  • could not find named models in ModelMaker
  • <% } %>
<%--

Notes

CONSTRUCT and DESCRIBE queries always return RDF XML

The parameter 'resultFormat' must not be null or zero length

The parameter 'resultFormat' must be one of the following:

--%>