<%@page import="java.net.URLEncoder"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%> <%@page import="org.springframework.web.context.WebApplicationContext"%> <%@page import="eu.earthobservatory.org.StrabonEndpoint.StrabonBeanWrapper"%> <%@page import="eu.earthobservatory.org.StrabonEndpoint.StrabonBeanWrapperConfiguration"%> <%@page import="java.util.List"%> <%@page import="java.util.Iterator"%> <% // get the reference to StrabonBeanWrapper StrabonBeanWrapper strabonWrapper; ServletContext context; context = getServletContext(); WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(context); strabonWrapper=(StrabonBeanWrapper) applicationContext.getBean("strabonBean"); // get query parameter or attribute (the attribute comes from ConnectionBean) String query = strabonWrapper.getPrefixes(); if (request.getParameter("query") != null) { query = request.getParameter("query"); } else if (request.getAttribute("query") != null) { query = (String) request.getAttribute("query"); } if ("null".equals(query)) { query = ""; } // get format parameter or attribute (the attribute comes from ConnectionBean) String selFormat = "HTML"; if (request.getParameter("format") != null) { selFormat = request.getParameter("format"); } else if (request.getAttribute("format") != null) { selFormat = (String) request.getAttribute("format"); } // get handle parameter or attribute (the attribute comes from ConnectionBean) String handle = ""; if (request.getParameter("handle") != null) { handle = request.getParameter("handle"); } else if (request.getAttribute("handle") != null) { handle = (String) request.getAttribute("handle"); } if (request.getAttribute("pathToKML") != null) { if ("map_local".equals(request.getAttribute("handle"))) { %> <% } %> <% } else { %> <%}%> TELEIOS: Strabon Endpoint <%@ include file="teleios-header.html"%>
<% Iterator entryListIterator = strabonWrapper.getEntries().iterator(); boolean first = true; String hash = ""; while(entryListIterator.hasNext()) { StrabonBeanWrapperConfiguration entry = entryListIterator.next(); if (entry.isHeader()) { if (!first) { %>
<% } else { first = false; } String label=entry.getLabel(); String style = "", href = ""; hash = new Integer(Math.abs(label.hashCode())).toString(); href="href=\"#"+hash+"\""; %>

<%=href%>><%=label%>

<% } else if (entry.isBean()) { String label=entry.getLabel(); String bean=entry.getBean(); String style = "", href = ""; hash = new Integer(Math.abs(label.hashCode()*bean.hashCode())).toString(); href = "\"" +bean + "#"+ hash+"\""; style = "class=\"navText\""; %> · ><%=label%>
<% } else { String href="\""+URLEncoder.encode(entry.getBean(),"utf-8")+"?view=HTML&handle="+entry.getHandle()+"&query="+URLEncoder.encode(entry.getStatement(),"utf-8")+"&format="+URLEncoder.encode(entry.getFormat(),"utf-8")+(hash == "" ? "" : "#" + hash)+"\""; String title="\""+entry.getTitle()+"\""; String label=entry.getLabel(); %> ·  title=<%=title%>><%=label%>
<% } } %>
<%if (request.getAttribute("info") != null) { %> <%}%> <% if (request.getAttribute("error") != null) {%> <%}%>

<%=request.getAttribute("info") %>

stSPARQL Query:
You must be logged in to perform update queries.
Output Format:



View Result:
 
Result: <%=request.getAttribute("error") %>


 
<% if (request.getAttribute("response") != null) { if (Common.getHTMLFormat().equals(request.getParameter("format"))) {%> <%=request.getAttribute("response")%> <%} else { %>
<%=request.getAttribute("response") %>
<%}%> <%}%> <% if (request.getAttribute("pathToKML") != null) { %>
<%}%>