Strabon

changeset 1102:6622d12bb712

Added rcc8Eq test.
author Panayiotis Smeros <psmeros@di.uoa.gr>
date Fri Apr 26 20:43:39 2013 +0300 (2013-04-26)
parents 1832661cb95e
children 5201f8b77bb5
files testsuite/src/test/java/eu/earthobservatory/testsuite/geoSPARQL/Rcc8SpatialRelationsTest.java testsuite/src/test/resources/geoSPARQL/Rcc8SpatialRelationsTest/Rcc8EqTest.rq testsuite/src/test/resources/geoSPARQL/Rcc8SpatialRelationsTest/Rcc8EqTest.srx testsuite/src/test/resources/geoSPARQL/Rcc8SpatialRelationsTest/Rcc8SpatialRelationsTest.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/Rcc8SpatialRelationsTest.java	Fri Apr 26 20:43:39 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 Rcc8's spatial relations test. 
    1.20 + * 
    1.21 + * @author Panayiotis Smeros <psmeros@di.uoa.gr
    1.22 + */
    1.23 +public class Rcc8SpatialRelationsTest extends TemplateTest
    1.24 +{
    1.25 +	public Rcc8SpatialRelationsTest() 
    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/Rcc8SpatialRelationsTest/Rcc8EqTest.rq	Fri Apr 26 20:43:39 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((?x != ?y) && (geof:rcc8eq(?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/Rcc8SpatialRelationsTest/Rcc8EqTest.srx	Fri Apr 26 20:43:39 2013 +0300
     3.3 @@ -0,0 +1,25 @@
     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#E</uri>
    3.14 +			</binding>
    3.15 +			<binding name='x'>
    3.16 +				<uri>http://example.org#D</uri>
    3.17 +			</binding>
    3.18 +		</result>
    3.19 +		<result>
    3.20 +			<binding name='y'>
    3.21 +				<uri>http://example.org#D</uri>
    3.22 +			</binding>
    3.23 +			<binding name='x'>
    3.24 +				<uri>http://example.org#E</uri>
    3.25 +			</binding>
    3.26 +		</result>
    3.27 +	</results>
    3.28 +</sparql>
    3.29 \ 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/Rcc8SpatialRelationsTest/Rcc8SpatialRelationsTest.nt	Fri Apr 26 20:43:39 2013 +0300
     4.3 @@ -0,0 +1,14 @@
     4.4 +<http://example.org#A> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomA>.
     4.5 +<http://example.org#B> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomB>.
     4.6 +<http://example.org#C> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomC>.
     4.7 +<http://example.org#D> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomD>.
     4.8 +<http://example.org#E> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomE>.
     4.9 +<http://example.org#F> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomF>.
    4.10 +<http://example.org#G> <http://www.opengis.net/ont/geosparql#hasGeometry> <http://example.org#geomG>.
    4.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>.
    4.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>.
    4.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>.
    4.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>.
    4.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>.
    4.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>.
    4.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>.