Strabon

changeset 1206:9999cd386a6e

Added Dimension Test for stSPARQL.
author Panayiotis Smeros <psmeros@di.uoa.gr>
date Mon Jul 15 15:41:15 2013 +0300 (2013-07-15)
parents 079711dfc125
children d533f932c2b9
files testsuite/src/test/java/eu/earthobservatory/testsuite/stSPARQL/BasicFunctionsTest.java testsuite/src/test/resources/prefixes testsuite/src/test/resources/stSPARQL/BasicFunctionsTest/BasicFunctionsTest.nt testsuite/src/test/resources/stSPARQL/BasicFunctionsTest/DimensionTest.rq testsuite/src/test/resources/stSPARQL/BasicFunctionsTest/DimensionTest.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/stSPARQL/BasicFunctionsTest.java	Mon Jul 15 15:41:15 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.stSPARQL;
    1.14 +
    1.15 +import eu.earthobservatory.testsuite.utils.TemplateTest;
    1.16 +
    1.17 +/**
    1.18 + * A test for the basic functions of stSPARQL.
    1.19 + * 
    1.20 + * @author Panayiotis Smeros <psmeros@di.uoa.gr>
    1.21 + */
    1.22 +
    1.23 +public class BasicFunctionsTest extends TemplateTest {}
     2.1 --- a/testsuite/src/test/resources/prefixes	Mon Jul 15 12:48:14 2013 +0300
     2.2 +++ b/testsuite/src/test/resources/prefixes	Mon Jul 15 15:41:15 2013 +0300
     2.3 @@ -12,4 +12,5 @@
     2.4  PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
     2.5  PREFIX geo: <http://www.opengis.net/ont/geosparql#>
     2.6  PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
     2.7 -PREFIX ogc: <http://www.opengis.net/def/uom/OGC/1.0/>
     2.8 \ No newline at end of file
     2.9 +PREFIX ogc: <http://www.opengis.net/def/uom/OGC/1.0/>
    2.10 +PREFIX ex: <http://example.org#>
    2.11 \ 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/stSPARQL/BasicFunctionsTest/BasicFunctionsTest.nt	Mon Jul 15 15:41:15 2013 +0300
     3.3 @@ -0,0 +1,2 @@
     3.4 +<http://example.org#polygon1> <http://example.org#hasGeometry> "Polygon((0 0, 1 0, 1 1, 0 1, 0 0))"^^<http://strdf.di.uoa.gr/ontology#WKT> .
     3.5 +<http://example.org#polygon2> <http://example.org#hasGeometry> "Polygon((0 0, 1 0, 0 1, 1 1, 0 0))"^^<http://strdf.di.uoa.gr/ontology#WKT> .
     3.6 \ 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/stSPARQL/BasicFunctionsTest/DimensionTest.rq	Mon Jul 15 15:41:15 2013 +0300
     4.3 @@ -0,0 +1,5 @@
     4.4 +select (strdf:dimension(?g) as ?dimension)
     4.5 +where
     4.6 +{
     4.7 +	?x ex:hasGeometry ?g.
     4.8 +}
     4.9 \ 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/stSPARQL/BasicFunctionsTest/DimensionTest.srx	Mon Jul 15 15:41:15 2013 +0300
     5.3 @@ -0,0 +1,18 @@
     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='dimension'/> 
     5.8 +		</head> 
     5.9 +		<results> 
    5.10 +			<result> 
    5.11 +				<binding name='dimension'> 
    5.12 +					<literal datatype='http://www.w3.org/2001/XMLSchema#int'>2</literal> 
    5.13 +				</binding> 
    5.14 +			</result> 
    5.15 +			<result> 
    5.16 +				<binding name='dimension'> 
    5.17 +					<literal datatype='http://www.w3.org/2001/XMLSchema#int'>2</literal> 
    5.18 +				</binding> 
    5.19 +			</result> 
    5.20 +		</results> 
    5.21 +	</sparql> 
    5.22 \ No newline at end of file