Strabon

changeset 342:7837e4b7fd73

made KML and GeoJSON query result writers to return the new stSPARQL formats KML and GEOJSON
author Babis Nikolaou <charnik@di.uoa.gr>
date Mon Jun 25 13:28:37 2012 +0300 (2012-06-25)
parents b695c2b754ab
children ee84ac7678c4
files resultio/src/main/java/org/openrdf/query/resultio/sparqljson/stSPARQLResultsGeoJSONWriter.java resultio/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsKMLWriter.java resultio/src/main/java/org/openrdf/query/resultio/stSPARQLQueryResultFormat.java
line diff
     1.1 --- a/resultio/src/main/java/org/openrdf/query/resultio/sparqljson/stSPARQLResultsGeoJSONWriter.java	Mon Jun 25 13:21:30 2012 +0300
     1.2 +++ b/resultio/src/main/java/org/openrdf/query/resultio/sparqljson/stSPARQLResultsGeoJSONWriter.java	Mon Jun 25 13:28:37 2012 +0300
     1.3 @@ -24,6 +24,7 @@
     1.4  import org.openrdf.query.algebra.evaluation.util.JTSWrapper;
     1.5  import org.openrdf.query.resultio.TupleQueryResultFormat;
     1.6  import org.openrdf.query.resultio.TupleQueryResultWriter;
     1.7 +import org.openrdf.query.resultio.stSPARQLQueryResultFormat;
     1.8  import org.slf4j.Logger;
     1.9  import org.slf4j.LoggerFactory;
    1.10  
    1.11 @@ -234,6 +235,6 @@
    1.12  
    1.13  	@Override
    1.14  	public TupleQueryResultFormat getTupleQueryResultFormat() {
    1.15 -		return TupleQueryResultFormat.JSON;
    1.16 +		return stSPARQLQueryResultFormat.GEOJSON;
    1.17  	}
    1.18  }
     2.1 --- a/resultio/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsKMLWriter.java	Mon Jun 25 13:21:30 2012 +0300
     2.2 +++ b/resultio/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsKMLWriter.java	Mon Jun 25 13:28:37 2012 +0300
     2.3 @@ -21,6 +21,7 @@
     2.4  import org.openrdf.query.algebra.evaluation.util.JTSWrapper;
     2.5  import org.openrdf.query.resultio.TupleQueryResultFormat;
     2.6  import org.openrdf.query.resultio.TupleQueryResultWriter;
     2.7 +import org.openrdf.query.resultio.stSPARQLQueryResultFormat;
     2.8  import org.slf4j.Logger;
     2.9  import org.slf4j.LoggerFactory;
    2.10  
    2.11 @@ -358,7 +359,7 @@
    2.12  
    2.13  	@Override
    2.14  	public TupleQueryResultFormat getTupleQueryResultFormat() {
    2.15 -		return TupleQueryResultFormat.SPARQL;
    2.16 +		return stSPARQLQueryResultFormat.KML;
    2.17  	}
    2.18  	
    2.19  	/**
     3.1 --- a/resultio/src/main/java/org/openrdf/query/resultio/stSPARQLQueryResultFormat.java	Mon Jun 25 13:21:30 2012 +0300
     3.2 +++ b/resultio/src/main/java/org/openrdf/query/resultio/stSPARQLQueryResultFormat.java	Mon Jun 25 13:28:37 2012 +0300
     3.3 @@ -41,7 +41,7 @@
     3.4  	public static final stSPARQLQueryResultFormat GEOJSON = new stSPARQLQueryResultFormat("GeoJSON", 
     3.5  			Arrays.asList("application/json", "application/json"), Charset.forName("UTF-8"), Arrays.asList("json"));
     3.6  	
     3.7 -	// registers stSPARQL formats
     3.8 +	// registers stSPARQL/GeoSPARQL formats
     3.9  	static {
    3.10  		register(KML);
    3.11  		register(KMZ);