Strabon
changeset 347:3d2d299efeea
Some changes in Strabon endpoint appearance. Changed colors. Added explanatory titles
for every button.
for every button.
author | Konstantina Mpereta <grad1110@di.uoa.gr> |
---|---|
date | Mon Jun 25 16:45:14 2012 +0300 (2012-06-25) |
parents | d437dd57982a |
children | d2d52cec6bfd |
files | endpoint/WebContent/WEB-INF/beans.xml endpoint/WebContent/style.css endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java |
line diff
1.1 --- a/endpoint/WebContent/WEB-INF/beans.xml Mon Jun 25 15:40:01 2012 +0300 1.2 +++ b/endpoint/WebContent/WEB-INF/beans.xml Mon Jun 25 16:45:14 2012 +0300 1.3 @@ -18,7 +18,7 @@ 1.4 1.5 <constructor-arg type="java.lang.String" > 1.6 <!-- Database name --> 1.7 - <value>endpoint</value> 1.8 + <value>newdemo</value> 1.9 </constructor-arg> 1.10 1.11 <constructor-arg type="java.lang.String" > 1.12 @@ -28,7 +28,7 @@ 1.13 1.14 <constructor-arg type="java.lang.String" > 1.15 <!-- Password --> 1.16 - <value>postgres</value> 1.17 + <value>p1r3as</value> 1.18 </constructor-arg> 1.19 1.20 <constructor-arg type="int" > 1.21 @@ -86,6 +86,7 @@ 1.22 ?file noa:producedFromProcessingChain ?chain . 1.23 FILTER( str(?chain) = "StaticThresholds" ) . 1.24 }]]></value> 1.25 +<value>Find all shapefiles derived from sensor MSG2 between [2007-08-26T12:00:00,2007-08-26T12:30:00], using dynamic thresholds.</value> 1.26 </list> 1.27 <list> 1.28 <!-- Bean --> 1.29 @@ -125,6 +126,7 @@ 1.30 FILTER(?hAcqTime = "2007-08-24T14:45:00"^^xsd:dateTime) . 1.31 FILTER(strdf:contains("POLYGON((21.027 38.36, 23.77 38.36, 23.77 36.05, 21.027 36.05, 21.027 38.36))"^^ strdf:WKT, ?hGeo)) . 1.32 }]]></value> 1.33 +<value>Find all hotspots in Pelloponesus derived from the dynamic thresholds processing chain at 2007-08-24T14:45:00. </value> 1.34 </list> 1.35 <list> 1.36 <!-- Bean --> 1.37 @@ -164,6 +166,7 @@ 1.38 } 1.39 FILTER(!bound(?c)). 1.40 }]]></value> 1.41 +<value>Delete all hotspots produced by the static thresholds processing chain and are acquired at 2007-08-24T14:45:00 which are located in the sea</value> 1.42 </list> 1.43 <list> 1.44 <!-- Bean --> 1.45 @@ -205,6 +208,7 @@ 1.46 GROUP BY ?h ?hGeo 1.47 HAVING strdf:overlap(?hGeo, strdf:union(?cGeo)) 1.48 }]]></value> 1.49 + <value>Refine hotspots acquired at 2007-08-24T14:45:00 removing the part that lies in the sea. </value> 1.50 </list> 1.51 <list> 1.52 <!-- Bean --> 1.53 @@ -236,6 +240,7 @@ 1.54 FILTER(?aLandUseType = clc:ConiferousForest). 1.55 FILTER(strdf:contains("POLYGON((21.027 38.36, 23.77 38.36, 23.77 36.05, 21.027 36.05, 21.027 38.36))"^^strdf:WKT,?aGeo)). 1.56 }]]></value> 1.57 +<value>Discover all coniferous forests using the clc ontology </value> 1.58 </list> 1.59 <list> 1.60 <!-- Bean --> 1.61 @@ -265,6 +270,7 @@ 1.62 rdfs:label ?dLabel. 1.63 FILTER(strdf:contains("POLYGON((21.027 38.36, 23.77 38.36, 23.77 36.05, 21.027 36.05, 21.027 38.36))"^^ strdf:WKT, ?dGeo)). 1.64 }]]></value> 1.65 +<value>Find all municipalities of Pelloponnese using kallikratis ontology </value> 1.66 </list> 1.67 <list> 1.68 <!-- Bean --> 1.69 @@ -294,6 +300,7 @@ 1.70 FILTER(?rType = lgdo:Primary) . 1.71 FILTER(strdf:contains("POLYGON((21.027 38.36, 23.77 38.36, 23.77 36.05, 21.027 36.05,21.027 38.36))"^^strdf:WKT, ?rGeo) ). 1.72 }]]></value> 1.73 +<value>get all primary roads in Pelloponnese using the linked geodata ontology </value> 1.74 </list> 1.75 <list> 1.76 <!-- Bean --> 1.77 @@ -335,6 +342,7 @@ 1.78 FILTER(strdf:contains("POLYGON((21.027 38.36, 23.77 38.36, 23.77 36.05, 21.027 36.05, 21.027 38.36))"^^strdf:WKT,?aGeo)). 1.79 FILTER(strdf:overlap(?aGeo, ?hGeo)) . 1.80 }]]></value> 1.81 +<value>Find all hotspots located in Pelloponnesian forests and acquired at 2007-08-24T14:45:00 using static thresholds processing chain </value> 1.82 </list> 1.83 <!-- <list> --> 1.84 <!-- Bean -->
2.1 --- a/endpoint/WebContent/style.css Mon Jun 25 15:40:01 2012 +0300 2.2 +++ b/endpoint/WebContent/style.css Mon Jun 25 16:45:14 2012 +0300 2.3 @@ -9,12 +9,24 @@ 2.4 color:#222222; 2.5 font-size: 15px 2.6 } 2.7 - 2.8 + 2.9 +form 2.10 +{ 2.11 +border-top: 12px solid #E6A685; 2.12 +} 2.13 + 2.14 +table 2.15 +{ 2.16 + background-color:#EFEDEA; 2.17 +} 2.18 + 2.19 + 2.20 a { 2.21 - color: darkblue; 2.22 + color: green; 2.23 } 2.24 -a:hover { 2.25 - color: blue; 2.26 +a:hover 2.27 +{ 2.28 + color: green; 2.29 } 2.30 2.31 p { 2.32 @@ -23,9 +35,18 @@ 2.33 2.34 /* ID Styles */ 2.35 2.36 +#border 2.37 +{ 2.38 +border-bottom:10px solid #D1D1BA; 2.39 +} 2.40 + 2.41 + 2.42 #navigation td { 2.43 - border-bottom: 1px solid #8da3b1; 2.44 + border: 1px dotted #A7A795; 2.45 + border-radius:5px; 2.46 + 2.47 } 2.48 + 2.49 2.50 #navigation a { 2.51 font: bold 11px Arial, Helvetica, sans-serif; 2.52 @@ -38,8 +59,10 @@ 2.53 } 2.54 2.55 #navigation a:hover { 2.56 - background: #5f7383; 2.57 - color:#dfe8f0; 2.58 +# background: #5f7383; 2.59 + background:#D1D1BA; 2.60 +# background-color:#B8B894; 2.61 +# color:#dfe8f0; 2.62 } 2.63 2.64 .logo {
3.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java Mon Jun 25 15:40:01 2012 +0300 3.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java Mon Jun 25 16:45:14 2012 +0300 3.3 @@ -471,7 +471,7 @@ 3.4 out.println(" <TD height=\"16\" background=\"images/pixi_white.gif\"><img src=\"images/pixi_white.gif\" width=\"16\" height=\"16\"></TD>"); 3.5 out.println(" </TR>"); 3.6 out.println(" <TR>"); 3.7 - out.println(" <TD height=\"1\" background=\"images/top_bg_blue.gif\"></TD>"); 3.8 + out.println(" <TD height=\"1\"></TD>"); 3.9 out.println(" </TR> "); 3.10 out.println(" <TR>"); 3.11 out.println(" <TD height=\"60\" background=\"images/nav2_bg.gif\"> "); 3.12 @@ -485,11 +485,11 @@ 3.13 out.println(" </table> </TD>"); 3.14 out.println(" </TR>"); 3.15 out.println(" <TR>"); 3.16 - out.println(" <TD height=\"21\" background=\"images/nav1_bg1.gif\">"); 3.17 + out.println(" <TD height=\"21\" >"); 3.18 out.println(" </TD>"); 3.19 out.println(" </TR>"); 3.20 out.println(" <TR>"); 3.21 - out.println(" <TD height=\"2\" background=\"images/top_bg_blue.gif\"></TD>"); 3.22 + out.println(" <TD height=\"2\" ></TD>"); 3.23 out.println(" </TR>"); 3.24 out.println("</TABLE>"); 3.25 out.println("<form " + 3.26 @@ -510,8 +510,8 @@ 3.27 } 3.28 3.29 protected static void appendHTML1b(PrintWriter out) { 3.30 - out.println("<tr><td width=\"90\" class=\"style4\"><a href=\"store.jsp\" class=\"navText\">Store</a></td></tr> "); 3.31 - out.println("<tr><td width=\"90\" class=\"style4\"><a href=\"javascript:history.go(0)\" class=\"navText\">Clear</a></td></tr> "); 3.32 + out.println("<tr><td width=\"90\" class=\"style4\"><a href=\"store.jsp\" class=\"navText\" title=\"Store triples\">Store</a></td></tr> "); 3.33 + out.println("<tr><td width=\"90\" class=\"style4\"><a href=\"javascript:history.go(0)\" class=\"navText\" title=\"Clear editor\">Clear</a></td></tr> "); 3.34 out.println("</table>"); 3.35 out.println("</td>"); 3.36 out.println("<td width=\"*\" valign=\"top\" >"); 3.37 @@ -519,7 +519,7 @@ 3.38 out.println("<table cellspacing=\"5\">"); 3.39 out.println("<tr>"); 3.40 out.println("<td style=\"border: 1px dashed #bbbbbb;\">stSPARQL Query:</td>"); 3.41 - out.println("<td style=\"border: 1px dashed #bbbbbb;\"><textarea name=\"SPARQLQuery\" rows=\"15\" cols=\"100\">"); 3.42 + out.println("<td style=\"border: 1px dashed #bbbbbb;\"><textarea name=\"SPARQLQuery\" title=\"pose your query/update here\" rows=\"15\" cols=\"100\">"); 3.43 } 3.44 3.45 protected static void appendHTML2(PrintWriter out, String format) { 3.46 @@ -553,7 +553,7 @@ 3.47 out.println("</select></center></td>"); 3.48 out.println("</tr>"); 3.49 out.println("<tr>"); 3.50 - out.println("<td colspan=2 style=\"border: 1px dashed #bbbbbb;\"><br/><center><input type=\"submit\" value=\"Query\" name=\"submit\" style=\"width: 400px\"/><br/><input type=\"submit\" value=\"Update\" name=\"submit\" style=\"width: 400px\"/></center><br/></td>"); 3.51 + out.println("<td colspan=2 style=\"border: 1px dashed #bbbbbb;\"><br/><center><input type=\"submit\" title=\"execute query\" value=\"Query\" name=\"submit\" style=\"width: 400px\"/><br/><input type=\"submit\" title=\"execute update\" value=\"Update\" name=\"submit\" style=\"width: 400px\"/></center><br/></td>"); 3.52 out.println("</tr>"); 3.53 } 3.54 3.55 @@ -594,7 +594,8 @@ 3.56 buf.append("?SPARQLQuery="); 3.57 buf.append(URLEncoder.encode(entry.getStatement(), "UTF-8")); 3.58 buf.append("&format="); 3.59 - buf.append(entry.getFormat()); 3.60 + buf.append(entry.getFormat()+"\""); 3.61 + buf.append("title="+"\""+entry.getTitle()); 3.62 buf.append("\"> · "); 3.63 buf.append(entry.getLabel()); 3.64 buf.append("</a><br/>");
4.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java Mon Jun 25 15:40:01 2012 +0300 4.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java Mon Jun 25 16:45:14 2012 +0300 4.3 @@ -35,12 +35,14 @@ 4.4 private String bean; 4.5 private String statement; 4.6 private String format; 4.7 + private String title; 4.8 4.9 - public Entry(String label, String bean, String statement, String format) { 4.10 + public Entry(String label, String bean, String statement, String format, String title) { 4.11 this.label = label; 4.12 this.bean = bean; 4.13 this.statement = statement; 4.14 this.format = format; 4.15 + this.title=title; 4.16 } 4.17 4.18 public String getLabel() { 4.19 @@ -59,6 +61,15 @@ 4.20 this.bean = bean; 4.21 } 4.22 4.23 + 4.24 + public String getTitle() { 4.25 + return title; 4.26 + } 4.27 + 4.28 + public void setTitle(String title) { 4.29 + this.title = title; 4.30 + } 4.31 + 4.32 public String getStatement() { 4.33 return statement; 4.34 } 4.35 @@ -107,7 +118,7 @@ 4.36 4.37 while (it.hasNext()) { 4.38 int items = 0; 4.39 - String label = "", bean = "", statement = "", format = ""; 4.40 + String label = "", bean = "", statement = "", format = "", title=""; 4.41 4.42 if (it.hasNext()) { 4.43 bean = it.next(); 4.44 @@ -125,11 +136,17 @@ 4.45 statement = it.next(); 4.46 items++; 4.47 } 4.48 - 4.49 - if (items == 4) { 4.50 - Entry entry = new Entry(label, bean, statement, format); 4.51 + if (it.hasNext()) { 4.52 + title = it.next(); 4.53 + System.out.println("TITLE= "+title); 4.54 + items++; 4.55 + } 4.56 + if (items == 5) { 4.57 + Entry entry = new Entry(label, bean, statement, format, title); 4.58 this.entries.add(entry); 4.59 } 4.60 + 4.61 + 4.62 } 4.63 } 4.64