Strabon

changeset 1243:9b9129ab812e

clean up
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Wed Jul 31 17:03:42 2013 +0300 (2013-07-31)
parents 48d719bebfac
children 375c415ad894 da14a303bf2c 596e8d1f9d98
files endpoint/WebContent/WEB-INF/connection.properties endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java resultio-spatial/sparqlkml/src/main/java/org/openrdf/query/resultio/sparqlkml/stSPARQLResultsKMLWriter.java
line diff
     1.1 --- a/endpoint/WebContent/WEB-INF/connection.properties	Wed Jul 31 16:41:48 2013 +0300
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,6 +0,0 @@
     1.4 -hostname=localhost
     1.5 -port=5432
     1.6 -dbengine=postgis
     1.7 -password=postgres
     1.8 -dbname=endpoint
     1.9 -username=postgres
     2.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Wed Jul 31 16:41:48 2013 +0300
     2.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Wed Jul 31 17:03:42 2013 +0300
     2.3 @@ -316,16 +316,13 @@
     2.4  						
     2.5  						// create temporary KML/KMZ file
     2.6  						File file = new File(basePath + tempKMLFile);
     2.7 -						//File file = new File(tempKMLFile);
     2.8  						// if file does not exist, then create it
     2.9  						if(!file.exists()){
    2.10 -							System.out.println("FILE PATH"+basePath + tempKMLFile);
    2.11  							file.createNewFile();
    2.12  						}
    2.13  						
    2.14  						try {
    2.15  							// query and write the result in the temporary KML/KMZ file
    2.16 -							//FileOutputStream fos = new FileOutputStream(basePath + tempKMLFile);
    2.17  							FileOutputStream fos = new FileOutputStream(basePath + tempKMLFile);
    2.18  							strabonWrapper.query(query, format, fos);
    2.19  							fos.close();
     3.1 --- a/resultio-spatial/sparqlkml/src/main/java/org/openrdf/query/resultio/sparqlkml/stSPARQLResultsKMLWriter.java	Wed Jul 31 16:41:48 2013 +0300
     3.2 +++ b/resultio-spatial/sparqlkml/src/main/java/org/openrdf/query/resultio/sparqlkml/stSPARQLResultsKMLWriter.java	Wed Jul 31 17:03:42 2013 +0300
     3.3 @@ -198,6 +198,9 @@
     3.4  			xmlWriter.startTag(PLACEMARK_TAG);
     3.5  			for (Binding binding : bindingSet) {
     3.6  				
     3.7 +				if(!binding.getValue().toString().contains("^^")){
     3.8 +					continue;
     3.9 +				}
    3.10  				Literal literal = (Literal) binding.getValue();
    3.11  				if(XMLGSDatatypeUtil.isCalendarDatatype(literal.getDatatype())){
    3.12  					hasTimestamp = true;