--- a/src/test/scala/RDB2RDFTest.scala Fri Jan 08 00:53:55 2010 -0500
+++ b/src/test/scala/RDB2RDFTest.scala Fri Jan 08 01:18:52 2010 -0500
@@ -1,35 +1,87 @@
/* RDB2RDFTest: transform SPARQL to SQL and compare against a reference query.
*
* These work with a database:
- *
+
Employee+----------+------------+---------+
| empid | lastName | birthday | manager |
+-------+----------+------------+---------+
-| 18 | Johnson | 1969-11-08 | NULL |
-| 253 | Smith | 1979-01-18 | 18 |
-| 255 | Jones | 1981-03-24 | 253 |
-| 19 | Xu | 1966-11-08 | NULL |
-| 254 | Ishita | 1971-10-31 | 253 |
-+-------+----------+------------+---------+
-
-Tasks----+--------+------+
-| taskid | name | lead |
-+--------+--------+------+
-| 1 | widget | 18 |
-| 2 | dingus | 253 |
+| 18 | Johnson | 1969-11-08 | NULL | TaskAssignments--------+
+| 253 | Smith | 1979-01-18 | 18 | | id | task | employee |
+| 255 | Jones | 1981-03-24 | 253 | +----+------+----------+
+| 19 | Xu | 1966-11-08 | NULL | | 1 | 1 | 18 |
+| 254 | Ishita | 1971-10-31 | 253 | | 2 | 2 | 253 |
++-------+----------+------------+---------+ | 3 | 3 | 19 |
+ | 4 | 4 | 253 |
+Tasks----+--------+------+ | 5 | 1 | 253 |
+| taskid | name | lead | | 6 | 2 | 255 |
++--------+--------+------+ | 7 | 3 | 255 |
+| 1 | widget | 18 | | 8 | 4 | 254 |
+| 2 | dingus | 253 | +----+------+----------+
| 3 | thingy | 18 |
| 4 | toy | 253 |
+--------+--------+------+
-TaskAssignments--------+
-| id | task | employee |
-+----+------+----------+
-| 1 | 253 | 18 |
-| 2 | 255 | 253 |
-| 3 | 255 | 19 |
-| 4 | 254 | 253 |
-+----+------+----------+
+ * with has an RDF representation:
+PREFIX empP : <http://hr.example/DB/Employee#>
+PREFIX task : <http://hr.example/DB/Tasks#>
+PREFIX tass : <http://hr.example/DB/TaskAssignments#>
+PREFIX xsd : <http://www.w3.org/2001/XMLSchema#>
+
+<http://hr.example/DB/Employee/empid.18#record>
+ empP:lastName "Johnson"^^xsd:string ; empP:birthday "1969-11-08"^^xsd:date .
+<http://hr.example/DB/Employee/empid.253#record>
+ empP:lastName "Smith"^^xsd:string ; empP:birthday "1969-11-08"^^xsd:date ;
+ empP:manager <http://hr.example/DB/Employee/empid.18#record> .
+<http://hr.example/DB/Employee/empid.255#record>
+ empP:lastName "Jones"^^xsd:string ; empP:birthday "1981-03-24"^^xsd:date ;
+ empP:manager <http://hr.example/DB/Employee/empid.253#record> .
+<http://hr.example/DB/Employee/empid.19#record>
+ empP:lastName "Xu"^^xsd:string ; empP:birthday "1966-11-08"^^xsd:date .
+<http://hr.example/DB/Employee/empid.254#record>
+ empP:lastName "Ishita"^^xsd:string ; empP:birthday "1971-10-31"^^xsd:date ;
+ empP:manager <http://hr.example/DB/Employee/empid.253#record> .
+
+<http://hr.example/DB/Tasks/taskid.1#record>
+ task:lastName "widget"^^xsd:string ;
+ task:manager <http://hr.example/DB/Employee/empid.18#record> .
+<http://hr.example/DB/Tasks/taskid.2#record>
+ task:lastName "dingus"^^xsd:string ;
+ task:manager <http://hr.example/DB/Employee/empid.253#record> .
+<http://hr.example/DB/Tasks/taskid.3#record>
+ task:lastName "thingy"^^xsd:string ;
+ task:manager <http://hr.example/DB/Employee/empid.18#record> .
+<http://hr.example/DB/Tasks/taskid.4#record>
+ task:lastName "toy"^^xsd:string ;
+ task:manager <http://hr.example/DB/Employee/empid.253#record> .
+
+<http://hr.example/DB/TaskAssignment/id.1#record>
+ tass:task <http://hr.example/DB/Tasks/taskid.1#record>
+ tass:employee <http://hr.example/DB/Employee/empid.18#record> .
+<http://hr.example/DB/TaskAssignment/id.2#record>
+ tass:task <http://hr.example/DB/Tasks/taskid.2#record>
+ tass:employee <http://hr.example/DB/Employee/empid.253#record> .
+<http://hr.example/DB/TaskAssignment/id.3#record>
+ tass:task <http://hr.example/DB/Tasks/taskid.3#record>
+ tass:employee <http://hr.example/DB/Employee/empid.19#record> .
+<http://hr.example/DB/TaskAssignment/id.4#record>
+ tass:task <http://hr.example/DB/Tasks/taskid.4#record>
+ tass:employee <http://hr.example/DB/Employee/empid.253#record> .
+<http://hr.example/DB/TaskAssignment/id.5#record>
+ tass:task <http://hr.example/DB/Tasks/taskid.1#record>
+ tass:employee <http://hr.example/DB/Employee/empid.253#record> .
+<http://hr.example/DB/TaskAssignment/id.6#record>
+ tass:task <http://hr.example/DB/Tasks/taskid.2#record>
+ tass:employee <http://hr.example/DB/Employee/empid.255#record> .
+<http://hr.example/DB/TaskAssignment/id.7#record>
+ tass:task <http://hr.example/DB/Tasks/taskid.3#record>
+ tass:employee <http://hr.example/DB/Employee/empid.255#record> .
+<http://hr.example/DB/TaskAssignment/id.8#record>
+ tass:task <http://hr.example/DB/Tasks/taskid.4#record>
+ tass:employee <http://hr.example/DB/Employee/empid.254#record> .
+
+ * The obvious test s that the results from the SPARQL query and the relational
+ * query match.
*/
package w3c.sw