Strabon

changeset 1145:3cd76c715947

Added relate query function test (DE-9IM intersection pattern for equality).
author Panayiotis Smeros <psmeros@di.uoa.gr>
date Fri May 03 19:18:25 2013 +0300 (2013-05-03)
parents 364967d5fd20
children 0d370b75a8b9
files testsuite/src/test/java/eu/earthobservatory/testsuite/geoSPARQL/RelateQueryFunctionTest.java testsuite/src/test/resources/geoSPARQL/RelateQueryFunctionTest/RelateQueryFunctionTest.nt testsuite/src/test/resources/geoSPARQL/RelateQueryFunctionTest/RelateQueryFunctionTest.rq testsuite/src/test/resources/geoSPARQL/RelateQueryFunctionTest/RelateQueryFunctionTest.srx
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/RelateQueryFunctionTest.java	Fri May 03 19:18:25 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 relate query function test (DE-9IM intersection pattern for equality).
    1.20 + * 
    1.21 + * @author Panayiotis Smeros <psmeros@di.uoa.gr
    1.22 + */
    1.23 +public class RelateQueryFunctionTest 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/RelateQueryFunctionTest/RelateQueryFunctionTest.nt	Fri May 03 19:18:25 2013 +0300
     2.3 @@ -0,0 +1,4 @@
     2.4 +<http://example.org#D> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomD>.
     2.5 +<http://example.org#E> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomE>.
     2.6 +<http://example.org#geomD> <http://www.opengis.net/ont/geosparql#asWKT> "  <http://www.opengis.net/def/crs/OGC/1.3/CRS84> Polygon((3 1, 4 1, 4 2, 3 2, 3 1))  "^^<http://www.opengis.net/ont/geosparql#wktLiteral>.
     2.7 +<http://example.org#geomE> <http://www.opengis.net/ont/geosparql#asWKT> "  <http://www.opengis.net/def/crs/OGC/1.3/CRS84> Polygon((3 1, 4 1, 4 2, 3 2, 3 1))  "^^<http://www.opengis.net/ont/geosparql#wktLiteral>.
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/testsuite/src/test/resources/geoSPARQL/RelateQueryFunctionTest/RelateQueryFunctionTest.rq	Fri May 03 19:18:25 2013 +0300
     3.3 @@ -0,0 +1,10 @@
     3.4 +SELECT ?x ?y
     3.5 +WHERE
     3.6 +{
     3.7 +?x geo:hasGeometry ?geom1.
     3.8 +?geom1 geo:asWKT ?g1.
     3.9 +
    3.10 +?y geo:hasGeometry ?geom2.
    3.11 +?geom2 geo:asWKT ?g2.
    3.12 +
    3.13 +FILTER((?x != ?y) && (geof:relate(?g1, ?g2, "TFFFTFFFT"^^xsd:String)))}
    3.14 \ 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/RelateQueryFunctionTest/RelateQueryFunctionTest.srx	Fri May 03 19:18:25 2013 +0300
     4.3 @@ -0,0 +1,25 @@
     4.4 +<?xml version='1.0' encoding='UTF-8'?>
     4.5 +<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
     4.6 +	<head>
     4.7 +		<variable name='x'/>
     4.8 +		<variable name='y'/>
     4.9 +	</head>
    4.10 +	<results>
    4.11 +		<result>
    4.12 +			<binding name='y'>
    4.13 +				<uri>http://example.org#E</uri>
    4.14 +			</binding>
    4.15 +			<binding name='x'>
    4.16 +				<uri>http://example.org#D</uri>
    4.17 +			</binding>
    4.18 +		</result>
    4.19 +		<result>
    4.20 +			<binding name='y'>
    4.21 +				<uri>http://example.org#D</uri>
    4.22 +			</binding>
    4.23 +			<binding name='x'>
    4.24 +				<uri>http://example.org#E</uri>
    4.25 +			</binding>
    4.26 +		</result>
    4.27 +	</results>
    4.28 +</sparql>
    4.29 \ No newline at end of file