Strabon

changeset 387:74c6142de217

merge
author Babis Nikolaou <charnik@di.uoa.gr>
date Wed Jun 27 19:31:08 2012 +0300 (2012-06-27)
parents c45fb8bccd90 451bbffc0e15
children 390625cc49c3
files
line diff
     1.1 --- a/endpoint/WebContent/WEB-INF/beans.xml	Wed Jun 27 19:30:50 2012 +0300
     1.2 +++ b/endpoint/WebContent/WEB-INF/beans.xml	Wed Jun 27 19:31:08 2012 +0300
     1.3 @@ -134,7 +134,7 @@
     1.4  	                <!-- Format -->
     1.5  	                <value>HTML</value>
     1.6  	                <!-- Label -->
     1.7 -	                <value>Update A: Remove hotspots in sea</value> 
     1.8 +	                <value>Update A: Invalidate hotspots in sea</value> 
     1.9  	                <!-- Statement -->
    1.10  	                <value><![CDATA[# Delete hotspots that lie in sea
    1.11  PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
    1.12 @@ -166,7 +166,7 @@
    1.13          }
    1.14          FILTER(!bound(?c)). 
    1.15  }]]></value>
    1.16 -<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.17 +<value>Mark as invalid 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.18  	            </list>
    1.19  	            <list>
    1.20  	                <!-- Bean -->
    1.21 @@ -177,37 +177,42 @@
    1.22  	                <value>Update B: Refine hotspots in sea</value>
    1.23  	                <!-- Statement -->
    1.24  	                <value><![CDATA[# Refine the geometry of hotspots that partially lie in sea
    1.25 -PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
    1.26 -PREFIX clc: <http://teleios.di.uoa.gr/ontologies/clcOntology.owl#>
    1.27 -PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    1.28 -PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    1.29 -PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
    1.30 -PREFIX teleios: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
    1.31 -PREFIX gag: <http://www.semanticweb.org/ontologies/2011/gagKallikratis.rdf#>
    1.32 -PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
    1.33 -PREFIX georss: <http://www.georss.org/georss/>
    1.34 -PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
    1.35 -PREFIX lgdo: <http://linkedgeodata.org/ontology/>
    1.36 -PREFIX gn: <http://www.geonames.org/ontology#>
    1.37 +PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#> 
    1.38 +PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
    1.39 +PREFIX strdf: <http://strdf.di.uoa.gr/ontology#> 
    1.40 +PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
    1.41  
    1.42 -DELETE { ?h noa:hasGeometry ?hGeo}
    1.43 -INSERT { ?h noa:hasGeometry ?dif}
    1.44 -WHERE {
    1.45 -SELECT DISTINCT ?h ?hGeo (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif)
    1.46 -WHERE { ?h rdf:type noa:Hotspot;
    1.47 -           noa:hasAcquisitionTime ?hAcqTime;
    1.48 -           noa:producedFromProcessingChain ?hChain;
    1.49 -           noa:hasGeometry ?hGeo.
    1.50 -        FILTER("2007-08-24T14:45:00"^^xsd:dateTime = ?hAcqTime).
    1.51 -        FILTER(str(?hChain) = "StaticThresholds").
    1.52 -        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.53 -        ?c rdf:type noa:Coastline ;
    1.54 -           noa:hasGeometry ?cGeo .
    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, ?cGeo)).
    1.56 -        FILTER(strdf:anyInteract(?hGeo, ?cGeo)).}
    1.57 -        GROUP BY ?h ?hGeo
    1.58 -        HAVING strdf:overlap(?hGeo, strdf:union(?cGeo)) 
    1.59 -}]]></value>
    1.60 +
    1.61 +INSERT { ?h noa:isDiscarded "1"^^xsd:int . 
    1.62 +	 ?valid rdf:type noa:Hotspot ;
    1.63 +		noa:hasConfidence ?conf ;
    1.64 +	        noa:hasGeometry ?dif ;
    1.65 +		noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 
    1.66 +	        noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
    1.67 +		noa:hasConfirmation noa:unknown ;
    1.68 +	        noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    1.69 +		noa:isProducedBy noa:noa ;
    1.70 +		noa:isDerivedFromSatellite ?sat .
    1.71 +}
    1.72 +WHERE { 
    1.73 +  SELECT DISTINCT ?h ?hGeo (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif) (BNODE() AS ?valid) ?conf ?sat
    1.74 +  WHERE { 
    1.75 +    ?h rdf:type noa:Hotspot ; 
    1.76 +       noa:hasAcquisitionTime ?hAcqTime ; 
    1.77 +       noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    1.78 +       noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
    1.79 +       noa:hasGeometry ?hGeo ;
    1.80 +       noa:hasConfidence ?conf ;
    1.81 +       noa:isDerivedFromSatellite ?sat .
    1.82 +    FILTER("TIMESTAMP"^^xsd:dateTime = ?hAcqTime) .
    1.83 +    ?c rdf:type noa:Coastline ;
    1.84 +       noa:hasGeometry ?cGeo .
    1.85 +    FILTER(strdf:anyInteract(?hGeo, ?cGeo)) . 
    1.86 +  }
    1.87 +  GROUP BY ?h ?hGeo ?conf ?sat
    1.88 +  HAVING strdf:overlap(?hGeo, strdf:union(?cGeo))
    1.89 +}
    1.90 +]]></value>
    1.91  	      <value>Refine hotspots acquired at 2007-08-24T14:45:00 removing the part that lies in the sea. </value>
    1.92  	            </list>
    1.93  	            <list>
     2.1 --- a/endpoint/WebContent/style.css	Wed Jun 27 19:30:50 2012 +0300
     2.2 +++ b/endpoint/WebContent/style.css	Wed Jun 27 19:31:08 2012 +0300
     2.3 @@ -30,7 +30,7 @@
     2.4  
     2.5  a:hover 
     2.6  {
     2.7 -	color: #E6A685;
     2.8 +	color: blue;
     2.9  	}
    2.10  
    2.11  p {
    2.12 @@ -54,6 +54,13 @@
    2.13  	border:3px solid #E6A685;
    2.14  	border-radius:5px;
    2.15  	padding:5px;
    2.16 +	font-size:13px;
    2.17 +
    2.18 +}
    2.19 +
    2.20 +#par
    2.21 +{
    2.22 +	display:none;
    2.23  }
    2.24  #output
    2.25  {
    2.26 @@ -84,7 +91,10 @@
    2.27  
    2.28  	}
    2.29  
    2.30 -	
    2.31 +#navigation
    2.32 +{
    2.33 +	background:#D1D1BA;
    2.34 +}	
    2.35  #navigation a {
    2.36  	font: bold 11px Arial, Helvetica, sans-serif;
    2.37  	color: #5f7383;
    2.38 @@ -92,12 +102,13 @@
    2.39  	letter-spacing:.1em;
    2.40  	text-decoration: none;
    2.41  	display:block;
    2.42 -	padding:8px 6px 10px 20px;
    2.43 +	padding:8px 6px 10px 20px;	
    2.44 +	background:#D1D1BA;
    2.45  	}
    2.46  	
    2.47 -#navigation a:hover {
    2.48 +#navigation a:hover  {
    2.49  #	background: #5f7383;
    2.50 -	background:#D1D1BA;
    2.51 +	background:#F9E9E1;
    2.52  #	background-color:#B8B894;
    2.53  #	color:#dfe8f0;
    2.54  	border: 1px solid #E6A685;
     3.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Wed Jun 27 19:30:50 2012 +0300
     3.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Wed Jun 27 19:31:08 2012 +0300
     3.3 @@ -437,6 +437,16 @@
     3.4  		out.println("<link href=\"http://code.google.com/apis/maps/documentation/javascript/examples/default.css\" rel=\"stylesheet\" type=\"text/css\" />");
     3.5  		out.println("<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\" /> ");
     3.6  		out.println("<script type=\"text/javascript\" src=\"http://maps.googleapis.com/maps/api/js?sensor=false\"></script>");
     3.7 +		out.println("<script type=\"text/javascript\">" +
     3.8 +				"function toggleMe(a){" +
     3.9 +				"var e=document.getElementById(a);" +
    3.10 +				"if(!e)return true;" +
    3.11 +				"if(e.style.display==\"none\"){" +
    3.12 +						"e.style.display=\"block\"" +
    3.13 +						"}else{" +
    3.14 +						"e.style.display=\"none\"}" +
    3.15 +						"return true;}" +
    3.16 +						"</script>");
    3.17  		out.println("<script type=\"text/javascript\">");
    3.18  		out.println("function initialize() {");
    3.19  		out.println("  var brahames = new google.maps.LatLng(37.92253, 23.72275);");
    3.20 @@ -496,15 +506,16 @@
    3.21  				"<a href=\"http://labs.mondeca.com/dataset/lov/details/vocabulary_lgdo.html\" > Linked Geodata </a> " +
    3.22  				" and <a href=\"http://www.geonames.org/search.html?q=ontology&country=\" >  geonames </a>." +
    3.23  				"We also use the <a href=\"images/graph.png\">NOA ontology</a> we developed for the <a href=\"http://www.space.noa.gr/ \">NOA </a> use case of the European FP7 project " +
    3.24 -				"<a href=\"http://www.earthobservatory.eu/\" >TELEIOS </a>. </br> </br>") ;
    3.25 -		out.println(" In this context NOA has been developing a real-time fire hotspot detection service for effectively monitoring a " +
    3.26 +				"<a href=\"http://www.earthobservatory.eu/\" >TELEIOS </a>. ") ;
    3.27 +		out.println("<a onclick=\"return toggleMe('par')\" />(More) </a> <br>");
    3.28 +		out.println(" <p id=\"par\"> In this context NOA has been developing a real-time fire hotspot detection service for effectively monitoring a " +
    3.29  				"fire-front. The technique is based on the use of acquisitions originating from the SEVIRI (Spinning Enhanced Visible and " +
    3.30  				"Infrared Imager) sensor, on top of MSG-1 (Meteosat Second Generation satellite, renamed to Meteosat-8) and MSG-2 (renamed to " +
    3.31  				"Meteosat-9) satellite platforms. Since 2007, NOA operates an MSG/SEVIRI acquisition station, and has been systematically archiving" +
    3.32  				" raw satellite images on a 5 and 15 minutes basis, the respective temporal resolutions of MSG-1 and MSG-2. The acquired data are then annotated " +
    3.33 -				"using the stRDF model and can be queried using the stSPARQL query language.</br> </br> ");
    3.34 +				"using the stRDF model and can be queried using the stSPARQL query language. </p>  ");
    3.35  		out.println("On the left sidebar, some example stSPARQL queries are provided. The NOA use case is described in more detail in the VLDB application paper " +
    3.36 -				"<a href=\"\"> here </a> ");
    3.37 +				"<a href=\"\"> here. </a> ");
    3.38  		out.println("      </TD>");
    3.39  		out.println("	</TR>");
    3.40  		out.println("</TABLE>");
    3.41 @@ -542,6 +553,9 @@
    3.42  		out.println("</textarea></td>");
    3.43  		//		out.println("<td style=\"border: 1px dashed #bbbbbb;\"><input type=\"radio\" name=\"format\" value=\"KML\">KML<br/>");
    3.44  		//		out.println("<input type=\"radio\" name=\"format\" value=\"HTML\">HTML</td>");
    3.45 +		out.println("</tr>");
    3.46 +		out.println("<tr>");
    3.47 +
    3.48  		out.println("<td id=\"output\";\"><center>Output Format:<br/><select name=\"format\" title=\"select one of the following output format types\">");
    3.49  		
    3.50  		Map<String, String> selections = new HashMap<String, String>();
    3.51 @@ -567,8 +581,8 @@
    3.52  		}
    3.53  		
    3.54  		out.println("</select></center></td>");
    3.55 -		out.println("</tr>");
    3.56 -		out.println("<tr>");
    3.57 +		//out.println("</tr>");
    3.58 +		//out.println("<tr>");
    3.59  		out.println("<td colspan=2 \"><br/><center><input type=\"submit\" title=\"execute query\" value=\"Query\" name=\"submit\" /><br/><input type=\"submit\" title=\"execute update\" value=\"Update\" name=\"submit\" style=\"width: 400px\"/></center><br/></td>");
    3.60  		out.println("</tr>");
    3.61  	}
     4.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/postgis/testCRS.java	Wed Jun 27 19:30:50 2012 +0300
     4.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/postgis/testCRS.java	Wed Jun 27 19:31:08 2012 +0300
     4.3 @@ -18,7 +18,7 @@
     4.4  			strabon = new Strabon("tut","postgres","p1r3as", 5432, "localhost", true);
     4.5  		} catch (SQLException e) {
     4.6  			// TODO Auto-generated catch block
     4.7 -			strabon.close();
     4.8 +		
     4.9  			e.printStackTrace();
    4.10  		} catch (ClassNotFoundException e) {
    4.11  			// TODO Auto-generated catch block
    4.12 @@ -37,7 +37,7 @@
    4.13  	String statement2= "<http://example.org/CoastLine5> <http://www.earthobservatory.eu/ontologies/noaOntology.owl#hasGeometry> " +
    4.14  				"\"POLYGON((34.80 19.37,41.74 19.37,41.74 29.64 ,34.80 29.64,34.80 19.37));http://www.opengis.net/def/crs/EPSG/0/32630" +
    4.15  				"\"^^<http://strdf.di.uoa.gr/ontology#WKT> .";
    4.16 -		String gml =  "<http://example.org/rcc8Obj1> <http://example.org/hasGeometry> \"<gml:Point> <gml:coordinates>45.67, 88.56</gml:coordinates> </gml:Point>\"^^<http://strdf.di.uoa.gr/ontology#GML> .\n";
    4.17 +		String gml =  "<http://example.org/rcc8Obj1> <http://example.org/hasGeometry> \"<gml:Point> <gml:coordinates>45.67, 88.56</gml:coordinates> </gml:Point>\"^^<http://strdf.di.uoa.gr/ontology#GML> .";
    4.18  				
    4.19  		String file = "/home/konstantina/gmlread.nt";
    4.20  		URL url = new URL("http://www.di.uoa.gr/~pms509/rdf-data/streason.nt");
    4.21 @@ -50,7 +50,7 @@
    4.22  			//strabon.storeInRepo(statement2, stringBaseURI, null, stringRDFFormat);
    4.23  			//strabon.storeInRepo(text, null, null, "NTRIPLES");
    4.24  			strabon.storeInRepo(file, fileRDFFormat);
    4.25 -			//strabon.storeInRepo(gml, null, null, fileRDFFormat);
    4.26 +			//strabon.storeInRepo(gml, null, null, stringRDFFormat);
    4.27  			
    4.28  		} catch (RDFParseException e) {
    4.29  			e.printStackTrace();