Strabon
changeset 1094:853de4f2d3d9
Added ehEquals and ehDisjoint test.
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/EhSpatialRelationsTest.java Fri Apr 26 19:26:21 2013 +0300 1.3 @@ -0,0 +1,27 @@ 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 Egenhofer' spatial relations test. 1.20 + * 1.21 + * @author Panayiotis Smeros <psmeros@di.uoa.gr 1.22 + */ 1.23 +public class EhSpatialRelationsTest extends TemplateTest 1.24 +{ 1.25 + public EhSpatialRelationsTest() 1.26 + { 1.27 + super(); 1.28 + this.inference=true; 1.29 + } 1.30 +} 1.31 \ 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/EhSpatialRelationsTest/EhDisjointTest.rq Fri Apr 26 19:26:21 2013 +0300 2.3 @@ -0,0 +1,10 @@ 2.4 +SELECT ?x ?y 2.5 +WHERE 2.6 +{ 2.7 +?x geo:hasGeometry ?geom1. 2.8 +?geom1 geo:asWKT ?g1. 2.9 + 2.10 +?y geo:hasGeometry ?geom2. 2.11 +?geom2 geo:asWKT ?g2. 2.12 + 2.13 +FILTER((geof:ehDisjoint(?g1, ?g2)))} 2.14 \ 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/EhSpatialRelationsTest/EhDisjointTest.srx Fri Apr 26 19:26:21 2013 +0300 3.3 @@ -0,0 +1,153 @@ 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='x'/> 3.8 + <variable name='y'/> 3.9 + </head> 3.10 + <results> 3.11 + <result> 3.12 + <binding name='y'> 3.13 + <uri>http://example.org#A</uri> 3.14 + </binding> 3.15 + <binding name='x'> 3.16 + <uri>http://example.org#E</uri> 3.17 + </binding> 3.18 + </result> 3.19 + <result> 3.20 + <binding name='y'> 3.21 + <uri>http://example.org#A</uri> 3.22 + </binding> 3.23 + <binding name='x'> 3.24 + <uri>http://example.org#D</uri> 3.25 + </binding> 3.26 + </result> 3.27 + <result> 3.28 + <binding name='y'> 3.29 + <uri>http://example.org#A</uri> 3.30 + </binding> 3.31 + <binding name='x'> 3.32 + <uri>http://example.org#F</uri> 3.33 + </binding> 3.34 + </result> 3.35 + <result> 3.36 + <binding name='y'> 3.37 + <uri>http://example.org#B</uri> 3.38 + </binding> 3.39 + <binding name='x'> 3.40 + <uri>http://example.org#E</uri> 3.41 + </binding> 3.42 + </result> 3.43 + <result> 3.44 + <binding name='y'> 3.45 + <uri>http://example.org#B</uri> 3.46 + </binding> 3.47 + <binding name='x'> 3.48 + <uri>http://example.org#D</uri> 3.49 + </binding> 3.50 + </result> 3.51 + <result> 3.52 + <binding name='y'> 3.53 + <uri>http://example.org#B</uri> 3.54 + </binding> 3.55 + <binding name='x'> 3.56 + <uri>http://example.org#F</uri> 3.57 + </binding> 3.58 + </result> 3.59 + <result> 3.60 + <binding name='y'> 3.61 + <uri>http://example.org#D</uri> 3.62 + </binding> 3.63 + <binding name='x'> 3.64 + <uri>http://example.org#A</uri> 3.65 + </binding> 3.66 + </result> 3.67 + <result> 3.68 + <binding name='y'> 3.69 + <uri>http://example.org#D</uri> 3.70 + </binding> 3.71 + <binding name='x'> 3.72 + <uri>http://example.org#B</uri> 3.73 + </binding> 3.74 + </result> 3.75 + <result> 3.76 + <binding name='y'> 3.77 + <uri>http://example.org#D</uri> 3.78 + </binding> 3.79 + <binding name='x'> 3.80 + <uri>http://example.org#G</uri> 3.81 + </binding> 3.82 + </result> 3.83 + <result> 3.84 + <binding name='y'> 3.85 + <uri>http://example.org#E</uri> 3.86 + </binding> 3.87 + <binding name='x'> 3.88 + <uri>http://example.org#A</uri> 3.89 + </binding> 3.90 + </result> 3.91 + <result> 3.92 + <binding name='y'> 3.93 + <uri>http://example.org#E</uri> 3.94 + </binding> 3.95 + <binding name='x'> 3.96 + <uri>http://example.org#B</uri> 3.97 + </binding> 3.98 + </result> 3.99 + <result> 3.100 + <binding name='y'> 3.101 + <uri>http://example.org#E</uri> 3.102 + </binding> 3.103 + <binding name='x'> 3.104 + <uri>http://example.org#G</uri> 3.105 + </binding> 3.106 + </result> 3.107 + <result> 3.108 + <binding name='y'> 3.109 + <uri>http://example.org#F</uri> 3.110 + </binding> 3.111 + <binding name='x'> 3.112 + <uri>http://example.org#A</uri> 3.113 + </binding> 3.114 + </result> 3.115 + <result> 3.116 + <binding name='y'> 3.117 + <uri>http://example.org#F</uri> 3.118 + </binding> 3.119 + <binding name='x'> 3.120 + <uri>http://example.org#B</uri> 3.121 + </binding> 3.122 + </result> 3.123 + <result> 3.124 + <binding name='y'> 3.125 + <uri>http://example.org#F</uri> 3.126 + </binding> 3.127 + <binding name='x'> 3.128 + <uri>http://example.org#G</uri> 3.129 + </binding> 3.130 + </result> 3.131 + <result> 3.132 + <binding name='y'> 3.133 + <uri>http://example.org#G</uri> 3.134 + </binding> 3.135 + <binding name='x'> 3.136 + <uri>http://example.org#E</uri> 3.137 + </binding> 3.138 + </result> 3.139 + <result> 3.140 + <binding name='y'> 3.141 + <uri>http://example.org#G</uri> 3.142 + </binding> 3.143 + <binding name='x'> 3.144 + <uri>http://example.org#D</uri> 3.145 + </binding> 3.146 + </result> 3.147 + <result> 3.148 + <binding name='y'> 3.149 + <uri>http://example.org#G</uri> 3.150 + </binding> 3.151 + <binding name='x'> 3.152 + <uri>http://example.org#F</uri> 3.153 + </binding> 3.154 + </result> 3.155 + </results> 3.156 +</sparql>
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/testsuite/src/test/resources/geoSPARQL/EhSpatialRelationsTest/EhEqualsTest.rq Fri Apr 26 19:26:21 2013 +0300 4.3 @@ -0,0 +1,10 @@ 4.4 +SELECT ?x ?y 4.5 +WHERE 4.6 +{ 4.7 +?x geo:hasGeometry ?geom1. 4.8 +?geom1 geo:asWKT ?g1. 4.9 + 4.10 +?y geo:hasGeometry ?geom2. 4.11 +?geom2 geo:asWKT ?g2. 4.12 + 4.13 +FILTER((?x != ?y) && (geof:ehEquals(?g1, ?g2)))} 4.14 \ 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/EhSpatialRelationsTest/EhEqualsTest.srx Fri Apr 26 19:26:21 2013 +0300 5.3 @@ -0,0 +1,25 @@ 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='x'/> 5.8 + <variable name='y'/> 5.9 + </head> 5.10 + <results> 5.11 + <result> 5.12 + <binding name='y'> 5.13 + <uri>http://example.org#E</uri> 5.14 + </binding> 5.15 + <binding name='x'> 5.16 + <uri>http://example.org#D</uri> 5.17 + </binding> 5.18 + </result> 5.19 + <result> 5.20 + <binding name='y'> 5.21 + <uri>http://example.org#D</uri> 5.22 + </binding> 5.23 + <binding name='x'> 5.24 + <uri>http://example.org#E</uri> 5.25 + </binding> 5.26 + </result> 5.27 + </results> 5.28 +</sparql> 5.29 \ 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/EhSpatialRelationsTest/EhSpatialRelationsTest.nt Fri Apr 26 19:26:21 2013 +0300 6.3 @@ -0,0 +1,14 @@ 6.4 +<http://example.org#A> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomA>. 6.5 +<http://example.org#B> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomB>. 6.6 +<http://example.org#C> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomC>. 6.7 +<http://example.org#D> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomD>. 6.8 +<http://example.org#E> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomE>. 6.9 +<http://example.org#F> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomF>. 6.10 +<http://example.org#G> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomG>. 6.11 +<http://example.org#geomA> <http://www.opengis.net/ont/geosparql#asWKT> " <http://www.opengis.net/def/crs/OGC/1.3/CRS84> Polygon((0 0, 1 0, 1 1, 0 1, 0 0)) "^^<http://www.opengis.net/ont/geosparql#wktLiteral>. 6.12 +<http://example.org#geomB> <http://www.opengis.net/ont/geosparql#asWKT> " <http://www.opengis.net/def/crs/OGC/1.3/CRS84> Polygon((0 0, 2 0, 2 2, 0 2 , 0 0)) "^^<http://www.opengis.net/ont/geosparql#wktLiteral>. 6.13 +<http://example.org#geomC> <http://www.opengis.net/ont/geosparql#asWKT> " <http://www.opengis.net/def/crs/OGC/1.3/CRS84> Polygon((1 1, 3 1, 3 2, 1 2, 1 1)) "^^<http://www.opengis.net/ont/geosparql#wktLiteral>. 6.14 +<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>. 6.15 +<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>. 6.16 +<http://example.org#geomF> <http://www.opengis.net/ont/geosparql#asWKT> " <http://www.opengis.net/def/crs/OGC/1.3/CRS84> Linestring(3 2, 4 0) "^^<http://www.opengis.net/ont/geosparql#wktLiteral>. 6.17 +<http://example.org#geomG> <http://www.opengis.net/ont/geosparql#asWKT> " <http://www.opengis.net/def/crs/OGC/1.3/CRS84> Point(1 1) "^^<http://www.opengis.net/ont/geosparql#wktLiteral>.