Strabon

changeset 1144:364967d5fd20

Added srid-function, default-crs and empty wkt and gml literal test.
author Panayiotis Smeros <psmeros@di.uoa.gr>
date Fri May 03 18:52:48 2013 +0300 (2013-05-03)
parents 9a328f20752e
children 3cd76c715947
files testsuite/src/test/java/eu/earthobservatory/testsuite/geoSPARQL/GeometryLiteralsTest.java testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/DefaultCRS.rq testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/DefaultCRS.srx testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/EmptyGMLLiteral.rq testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/EmptyGMLLiteral.srx testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/EmptyWKTLiteral.rq testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/EmptyWKTLiteral.srx testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/GeometryLiteralsTest.nt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/testsuite/src/test/java/eu/earthobservatory/testsuite/geoSPARQL/GeometryLiteralsTest.java	Fri May 03 18:52:48 2013 +0300
     1.3 @@ -0,0 +1,20 @@
     1.4 +/**
     1.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + * 
     1.9 + * Copyright (C) 2010, 2011, 2012, 2013 Pyravlos Team
    1.10 + * 
    1.11 + * http://www.strabon.di.uoa.gr/
    1.12 + */
    1.13 +package eu.earthobservatory.testsuite.geoSPARQL;
    1.14 +
    1.15 +import eu.earthobservatory.testsuite.utils.TemplateTest;
    1.16 +
    1.17 +
    1.18 +/**
    1.19 + * GeoSPARQL srid-function, default-crs and empty wkt and gml literal test.
    1.20 + * 
    1.21 + * @author Panayiotis Smeros <psmeros@di.uoa.gr
    1.22 + */
    1.23 +public class GeometryLiteralsTest extends TemplateTest{}
    1.24 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/DefaultCRS.rq	Fri May 03 18:52:48 2013 +0300
     2.3 @@ -0,0 +1,4 @@
     2.4 +SELECT (geof:getSRID(?g1) as ?srid)
     2.5 +WHERE
     2.6 +{<http://example.org#A> geo:hasGeometry ?geom1.
     2.7 +?geom1 geo:asWKT ?g1.}
     2.8 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/DefaultCRS.srx	Fri May 03 18:52:48 2013 +0300
     3.3 @@ -0,0 +1,13 @@
     3.4 +<?xml version='1.0' encoding='UTF-8'?>
     3.5 +<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
     3.6 +	<head>
     3.7 +		<variable name='srid'/>
     3.8 +	</head>
     3.9 +	<results>
    3.10 +		<result>
    3.11 +			<binding name='srid'>
    3.12 +				<literal datatype='http://www.w3.org/2001/XMLSchema#int'>3857</literal>
    3.13 +			</binding>
    3.14 +		</result>
    3.15 +	</results>
    3.16 +</sparql>
    3.17 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/EmptyGMLLiteral.rq	Fri May 03 18:52:48 2013 +0300
     4.3 @@ -0,0 +1,4 @@
     4.4 +SELECT ?g1
     4.5 +WHERE
     4.6 +{<http://example.org#C> geo:hasGeometry ?geom1.
     4.7 +?geom1 geo:asGML ?g1.}
     4.8 \ No newline at end of file
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/EmptyGMLLiteral.srx	Fri May 03 18:52:48 2013 +0300
     5.3 @@ -0,0 +1,13 @@
     5.4 +<?xml version='1.0' encoding='UTF-8'?>
     5.5 +<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
     5.6 +	<head>
     5.7 +		<variable name='g1'/>
     5.8 +	</head>
     5.9 +	<results>
    5.10 +		<result>
    5.11 +			<binding name='g1'>
    5.12 +				<literal datatype='http://www.opengis.net/ont/geosparql#gmlLiteral'> </literal>
    5.13 +			</binding>
    5.14 +		</result>
    5.15 +	</results>
    5.16 +</sparql>
    5.17 \ No newline at end of file
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/EmptyWKTLiteral.rq	Fri May 03 18:52:48 2013 +0300
     6.3 @@ -0,0 +1,4 @@
     6.4 +SELECT (strdf:area(?g1) as ?area)
     6.5 +WHERE
     6.6 +{<http://example.org#B> geo:hasGeometry ?geom1.
     6.7 +?geom1 geo:asWKT ?g1.}
     6.8 \ No newline at end of file
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/EmptyWKTLiteral.srx	Fri May 03 18:52:48 2013 +0300
     7.3 @@ -0,0 +1,13 @@
     7.4 +<?xml version='1.0' encoding='UTF-8'?>
     7.5 +<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
     7.6 +	<head>
     7.7 +		<variable name='area'/>
     7.8 +	</head>
     7.9 +	<results>
    7.10 +		<result>
    7.11 +			<binding name='area'>
    7.12 +				<literal datatype='http://www.w3.org/2001/XMLSchema#double'>0.0</literal>
    7.13 +			</binding>
    7.14 +		</result>
    7.15 +	</results>
    7.16 +</sparql>
    7.17 \ No newline at end of file
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/testsuite/src/test/resources/geoSPARQL/GeometryLiteralsTest/GeometryLiteralsTest.nt	Fri May 03 18:52:48 2013 +0300
     8.3 @@ -0,0 +1,6 @@
     8.4 +<http://example.org#A> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomA>.
     8.5 +<http://example.org#B> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomB>.
     8.6 +<http://example.org#C> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomC>.
     8.7 +<http://example.org#geomA> <http://www.opengis.net/ont/geosparql#asWKT> " Polygon((2.1 1.1, 2.9 1.1, 2.9 1.9, 2.1 1.9, 2.1 1.1))  "^^<http://www.opengis.net/ont/geosparql#wktLiteral>.
     8.8 +<http://example.org#geomB> <http://www.opengis.net/ont/geosparql#asWKT> " "^^<http://www.opengis.net/ont/geosparql#wktLiteral>.
     8.9 +<http://example.org#geomC> <http://www.opengis.net/ont/geosparql#asGML> " "^^<http://www.opengis.net/ont/geosparql#gmlLiteral>.