~ CONSTRUCT example not constrained to a db schema
authorEric Prud'hommeaux <eric@w3.org>
Sun, 31 Jan 2010 12:06:15 -0500
changeset 152 bf251f29cfe0
parent 151 001bd3da58ea
child 153 dae731526190
~ CONSTRUCT example not constrained to a db schema
src/test/scala/SparqlTest.scala
--- a/src/test/scala/SparqlTest.scala	Sun Jan 31 12:02:27 2010 -0500
+++ b/src/test/scala/SparqlTest.scala	Sun Jan 31 12:06:15 2010 -0500
@@ -424,9 +424,10 @@
   test("CONSTRUCT") {
     val a = Sparql()
     val e = """
+PREFIX foaf : <http://xmlns.com/foaf/0.1/>
 PREFIX empP : <http://hr.example/DB/Employee#>
-CONSTRUCT { ?emp <http://foo.example/person#lname> ?empName }
-    WHERE { ?emp empP:lastName   ?empName }
+CONSTRUCT { ?emp foaf:last_name ?empName }
+    WHERE { ?emp empP:lastName  ?empName }
 """
     val tps =
       Construct(
@@ -434,7 +435,7 @@
 	  List(
 	    TriplePattern(
 	      SVar(Var("emp")),
-	      PUri(Uri("http://foo.example/person#lname")),
+	      PUri(Uri("http://xmlns.com/foaf/0.1/last_name")),
 	      OVar(Var("empName"))))),
 	TriplesBlock(
 	  List(