Strabon

changeset 887:66d551b85cd6

removed styling from KML writer (we are not doing fashion here)
author Babis Nikolaou <charnik@di.uoa.gr>
date Tue Mar 05 19:44:45 2013 +0200 (2013-03-05)
parents 47b0fb531588
children 215b5e9647ca
files resultio-spatial/sparqlkml/src/main/java/org/openrdf/query/resultio/sparqlkml/stSPARQLResultsKMLWriter.java
line diff
     1.1 --- a/resultio-spatial/sparqlkml/src/main/java/org/openrdf/query/resultio/sparqlkml/stSPARQLResultsKMLWriter.java	Fri Feb 22 19:28:42 2013 +0200
     1.2 +++ b/resultio-spatial/sparqlkml/src/main/java/org/openrdf/query/resultio/sparqlkml/stSPARQLResultsKMLWriter.java	Tue Mar 05 19:44:45 2013 +0200
     1.3 @@ -73,17 +73,18 @@
     1.4  	private static final String NAME_ATTR			= NAME_TAG;
     1.5  
     1.6  	private static final String STYLE_ID 			= "resultStyle";
     1.7 -	private static final String TABLE_ROW_BEGIN 	= "<TR>";
     1.8 +	private static final String TABLE_ROW_BEGIN 		= "<TR>";
     1.9  	private static final String TABLE_ROW_END 		= "</TR>";
    1.10 -	private static final String TABLE_DATA_BEGIN 	= "<TD>";
    1.11 +	private static final String TABLE_DATA_BEGIN 		= "<TD>";
    1.12  	private static final String TABLE_DATA_END 		= "</TD>";
    1.13  	private static final String NEWLINE 			= "\n";
    1.14 -	private static final String TABLE_DESC_BEGIN 	= "<![CDATA[<TABLE border=\"1\">"+ NEWLINE;
    1.15 +	private static final String TABLE_DESC_BEGIN 		= "<![CDATA[<TABLE border=\"1\">"+ NEWLINE;
    1.16  	private static final String TABLE_DESC_END 		= "</TABLE>]]>" + NEWLINE;
    1.17  
    1.18  	private static final String GEOMETRY_NAME 		= "Geometry";
    1.19  	private static final String MULTIGEOMETRY 		= "MultiGeometry";
    1.20  
    1.21 +	/*
    1.22  	// Styling options
    1.23  	private static final int numOfStyles = 5;
    1.24  	private static final String[][] styles = {
    1.25 @@ -110,7 +111,7 @@
    1.26  					"ad0000ff" },
    1.27  			{ STYLE_ID + "5", "1.5", "7dff0000", "adff0000", "1.5", "7dff0000",
    1.28  					"adff0000" } };
    1.29 -
    1.30 +	*/
    1.31  	/**
    1.32  	 * The underlying XML formatter.
    1.33  	 */
    1.34 @@ -184,6 +185,7 @@
    1.35  			xmlWriter.startTag(ROOT_TAG);
    1.36  			xmlWriter.startTag(RESULT_SET_TAG);
    1.37  
    1.38 +			/*
    1.39  			// add default styles
    1.40  			for (String[] style : styles) {
    1.41  				String id = style[0];
    1.42 @@ -232,6 +234,7 @@
    1.43  				xmlWriter.endTag(STYLEMAP_TAG);
    1.44  			}
    1.45  			// end of default style definition
    1.46 +			*/
    1.47  		} catch (IOException e) {
    1.48  			throw new TupleQueryResultHandlerException(e);
    1.49  		}
    1.50 @@ -310,7 +313,7 @@
    1.51  				for (String geometry : geometries) {
    1.52  					xmlWriter.startTag(PLACEMARK_TAG);
    1.53  					xmlWriter.textElement(NAME_TAG, GEOMETRY_NAME);
    1.54 -					xmlWriter.textElement("styleUrl", "#"+ styles[geometries.indexOf(geometry) % (numOfStyles - 2)][0]);
    1.55 +					//xmlWriter.textElement("styleUrl", "#"+ styles[geometries.indexOf(geometry) % (numOfStyles - 2)][0]);
    1.56  					xmlWriter.startTag(MULTIGEOMETRY);
    1.57  					xmlWriter.unescapedText(geometry);
    1.58  					xmlWriter.endTag(MULTIGEOMETRY);
    1.59 @@ -321,7 +324,7 @@
    1.60  			// also write them in the same placemarks
    1.61  			xmlWriter.startTag(PLACEMARK_TAG);
    1.62  			xmlWriter.textElement(NAME_TAG, GEOMETRY_NAME);
    1.63 -			xmlWriter.textElement("styleUrl", "#" + styles[(numOfStyles - 1)][0]);
    1.64 +			//xmlWriter.textElement("styleUrl", "#" + styles[(numOfStyles - 1)][0]);
    1.65  			xmlWriter.startTag(MULTIGEOMETRY);
    1.66  			
    1.67  			for (String geometry : geometries) {