Strabon

changeset 1300:e7eafd649da6

added tests with group by for all aggregate functions
author Stella Giannakopoulou <sgian@di.uoa.gr>
date Thu Nov 28 12:55:04 2013 +0200 (2013-11-28)
parents 0998e91f6fa5
children 704a516daff8
files testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/AggregateFunctionsTest.nt testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/ExtentGroupByTest.rq testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/ExtentGroupByTest.srx testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/IntersectionGroupByTest.rq testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/IntersectionGroupByTest.srx testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/UnionGroupByTest.rq testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/UnionGroupByTest.srx
line diff
     1.1 --- a/testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/AggregateFunctionsTest.nt	Thu Nov 28 12:49:06 2013 +0200
     1.2 +++ b/testsuite/src/test/resources/stSPARQL/AggregateFunctionsTest/AggregateFunctionsTest.nt	Thu Nov 28 12:55:04 2013 +0200
     1.3 @@ -1,2 +1,4 @@
     1.4  <http://example.org#A> <http://example.org#hasGeometry> "Polygon((0 0, 1 0, 1 1, 0 1, 0 0))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
     1.5 -<http://example.org#B> <http://example.org#hasGeometry> "Polygon((0 0, 2 0, 2 2, 0 2 , 0 0))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
     1.6 \ No newline at end of file
     1.7 +<http://example.org#B> <http://example.org#hasGeometry> "Polygon((0 0, 2 0, 2 2, 0 2 , 0 0))"^^<http://strdf.di.uoa.gr/ontology#WKT>.
     1.8 +<http://example.org#ExA> <http://example.org#consistsOf> <http://example.org#A> .
     1.9 +<http://example.org#ExA> <http://example.org#consistsOf> <http://example.org#B> .
    1.10 \ 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/stSPARQL/AggregateFunctionsTest/ExtentGroupByTest.rq	Thu Nov 28 12:55:04 2013 +0200
     2.3 @@ -0,0 +1,7 @@
     2.4 +select (strdf:extent(?g) as ?extent)
     2.5 +where
     2.6 +{
     2.7 +	?x ex:consistsOf ?y .
     2.8 +	?y ex:hasGeometry ?g .
     2.9 +}
    2.10 +group by ?x
    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/AggregateFunctionsTest/ExtentGroupByTest.srx	Thu Nov 28 12:55:04 2013 +0200
     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='extent'/>
     3.8 +	</head>
     3.9 +	<results>
    3.10 +		<result>
    3.11 +			<binding name='extent'>
    3.12 +				<literal datatype='http://strdf.di.uoa.gr/ontology#WKT'>POLYGON ((0 0, 0 2, 2 2, 2 0, 0 0));http://www.opengis.net/def/crs/EPSG/0/4326</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/stSPARQL/AggregateFunctionsTest/IntersectionGroupByTest.rq	Thu Nov 28 12:55:04 2013 +0200
     4.3 @@ -0,0 +1,7 @@
     4.4 +select (strdf:intersection(?g) as ?intersection)
     4.5 +where
     4.6 +{
     4.7 +	?x ex:consistsOf ?y .
     4.8 +	?y ex:hasGeometry ?g .
     4.9 +}
    4.10 +group by ?x
    4.11 \ 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/AggregateFunctionsTest/IntersectionGroupByTest.srx	Thu Nov 28 12:55:04 2013 +0200
     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='intersection'/>
     5.8 +	</head>
     5.9 +	<results>
    5.10 +		<result>
    5.11 +			<binding name='intersection'>
    5.12 +				<literal datatype='http://strdf.di.uoa.gr/ontology#WKT'>POLYGON ((1 0, 0 0, 0 1, 1 1, 1 0));http://www.opengis.net/def/crs/EPSG/0/4326</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/stSPARQL/AggregateFunctionsTest/UnionGroupByTest.rq	Thu Nov 28 12:55:04 2013 +0200
     6.3 @@ -0,0 +1,7 @@
     6.4 +select (strdf:union(?g) as ?union)
     6.5 +where
     6.6 +{
     6.7 +	?x ex:consistsOf ?y .
     6.8 +	?y ex:hasGeometry ?g .
     6.9 +}
    6.10 +group by ?x
    6.11 \ 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/stSPARQL/AggregateFunctionsTest/UnionGroupByTest.srx	Thu Nov 28 12:55:04 2013 +0200
     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='union'/>
     7.8 +	</head>
     7.9 +	<results>
    7.10 +		<result>
    7.11 +			<binding name='union'>
    7.12 +				<literal datatype='http://strdf.di.uoa.gr/ontology#WKT'>POLYGON ((1 0, 0 0, 0 1, 0 2, 2 2, 2 0, 1 0));http://www.opengis.net/def/crs/EPSG/0/4326</literal>
    7.13 +			</binding>
    7.14 +		</result>
    7.15 +	</results>
    7.16 +</sparql>