#  Licensed to the Apache Software Foundation (ASF) under one or more
#  contributor license agreements.  See the NOTICE file distributed with
#  this work for additional information regarding copyright ownership.
#  The ASF licenses this file to You under the Apache License, Version 2.0
#  (the "License"); you may not use this file except in compliance with
#  the License.  You may obtain a copy of the License at
# 
#       http://www.apache.org/licenses/LICENSE-2.0
# 
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://www.w3.org/2001/sw/DataAccess/tests/data-r2/sort/manifest#> .
@prefix rdfs:	<http://www.w3.org/2000/01/rdf-schema#> .
@prefix mf:     <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@prefix qt:     <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
@prefix dawgt:   <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> .

<>  rdf:type mf:Manifest ;
    rdfs:comment "Sorting test cases." ;
    mf:entries
    ( :dawg-sort-1 :dawg-sort-2 :dawg-sort-3 :dawg-sort-4
    :dawg-sort-5 :dawg-sort-6 :dawg-sort-7 :dawg-sort-8
    :dawg-sort-9 :dawg-sort-10 
    :dawg-sort-numbers
    :dawg-sort-builtin
    :dawg-sort-function
    ).

:dawg-sort-1 a mf:QueryEvaluationTest;
	 mf:name "sort-1" ;
         rdfs:comment "Alphabetic sort (ascending) on untyped literals" ;
         mf:action
            [ qt:query  <query-sort-1.rq> ;
              qt:data   <data-sort-1.ttl> ] ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:result  <result-sort-1.rdf> .

:dawg-sort-2 a mf:QueryEvaluationTest;
	 mf:name "sort-2" ;
         rdfs:comment "Alphabetic sort (descending) on untyped literals" ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-2.rq> ;
              qt:data   <data-sort-1.ttl> ] ;
         mf:result  <result-sort-2.rdf>.

:dawg-sort-3 a mf:QueryEvaluationTest;
	 mf:name "sort-3" ;
         rdfs:comment "Sort on (possibly unbound) URIs" ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-3.rq> ;
              qt:data   <data-sort-3.ttl> ] ;
         mf:result  <result-sort-3.rdf>.

:dawg-sort-4 a mf:QueryEvaluationTest;
	 mf:name "sort-4" ;
         rdfs:comment "Sort on datatyped (integer) literals" ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-4.rq> ;
              qt:data   <data-sort-4.ttl> ] ;
         mf:result  <result-sort-4.rdf>.

:dawg-sort-5 a mf:QueryEvaluationTest;
	 mf:name "sort-5" ;
         rdfs:comment "Sort first on untyped literals (ascending), then on datatyped (integer) literals (descending" ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-5.rq> ;
              qt:data   <data-sort-4.ttl> ] ;
         mf:result  <result-sort-5.rdf>.

:dawg-sort-6 a mf:QueryEvaluationTest;
	 mf:name "sort-6" ;
         rdfs:comment "Sort on mixed result of uris and literals." ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-6.rq> ;
              qt:data   <data-sort-6.ttl> ] ;
         mf:result  <result-sort-6.rdf>.

:dawg-sort-7 a mf:QueryEvaluationTest;
	 mf:name "sort-7" ;
         rdfs:comment "Sort on comparable mixed typed literals (integer and float)" ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-4.rq> ;
              qt:data   <data-sort-7.ttl> ] ;
         mf:result  <result-sort-7.rdf>.

:dawg-sort-8 a mf:QueryEvaluationTest;
	 mf:name "sort-8" ;
         rdfs:comment "Sort on several mixed values (bnode, uri, literal)" ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-4.rq> ;
              qt:data   <data-sort-8.ttl> ] ;
         mf:result  <result-sort-8.rdf>.

:dawg-sort-9 a mf:QueryEvaluationTest;
	 mf:name "sort-9" ;
         rdfs:comment "Alphabetic sort (ascending) on datatyped (string) literals" ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-9.rq> ;
              qt:data   <data-sort-9.ttl> ] ;
         mf:result  <result-sort-9.rdf> .

:dawg-sort-10 a mf:QueryEvaluationTest;
	 mf:name "sort-10" ;
         rdfs:comment "Alphabetic sort (descending) on datatyped (string) literals" ;
    dawgt:approvedBy <http://www.w3.org/2007/06/26-dawg-minutes> ;
    dawgt:approval dawgt:Approved ;
         mf:action
            [ qt:query  <query-sort-10.rq> ;
              qt:data   <data-sort-9.ttl> ] ;
         mf:result  <result-sort-10.rdf>.

:dawg-sort-numbers a mf:QueryEvaluationTest;
	 mf:name "Expression sort" ;
         rdfs:comment "Sort by a bracketted expression" ;
         mf:action
            [ qt:query  <query-sort-numbers.rq> ;
              qt:data   <data-sort-numbers.ttl> ] ;
      dawgt:approvedBy <http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0096/21-dawg-minutes.html> ;
    dawgt:approval dawgt:Approved ;
         mf:result  <result-sort-numbers.ttl> .

:dawg-sort-builtin a mf:QueryEvaluationTest;
	 mf:name "Builtin sort" ;
         rdfs:comment "Sort by a builtin operator" ;
         mf:action
            [ qt:query  <query-sort-builtin.rq> ;
              qt:data   <data-sort-builtin.ttl> ] ;
      dawgt:approvedBy <http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0096/21-dawg-minutes.html> ;
    dawgt:approval dawgt:Approved ;
         mf:result  <result-sort-builtin.ttl> .

:dawg-sort-function a mf:QueryEvaluationTest;
	 mf:name "Function sort" ;
         rdfs:comment "Sort by function invocation" ;
         mf:action
            [ qt:query  <query-sort-function.rq> ;
              qt:data   <data-sort-function.ttl> ] ;
      dawgt:approvedBy <http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0096/21-dawg-minutes.html> ;
    dawgt:approval dawgt:Approved ;
         mf:result  <result-sort-function.ttl> .

