~ the test suites moved into split projects: it makes dependencies easier to deal with
authorAlexandre Bertails <alexandre@bertails.org>
Wed, 12 Jan 2011 16:15:46 -0500
changeset 303 88e49ef8e80e
parent 302 e2bf09a1a9d6
child 304 20c3a5b0af1e
~ the test suites moved into split projects: it makes dependencies easier to deal with
directmapping-test/src/main/scala/DirectMappingTestSuite.scala
directmapping/src/test/scala/DirectMappingTest.scala
jena-test/src/test/scala/JenaTest.scala
project/build/RDB2RDF.scala
rdfxml-test/src/main/scala/RDFXMLTestSuite.scala
rdfxml/src/test/scala/RDFXMLTest.scala
turtle-test/src/main/scala/TurtleTestSuite.scala
turtle/src/test/scala/turtleTest.scala
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/directmapping-test/src/main/scala/DirectMappingTestSuite.scala	Wed Jan 12 16:15:46 2011 -0500
@@ -0,0 +1,95 @@
+package org.w3.directmapping
+
+import org.w3.rdf.{Model => RDFModel, Implicits => RDFImplicits, _}
+import org.w3.rdb.RDB._
+import org.w3.sql
+import org.w3.rdf.turtle.TurtleModule
+import java.io.File
+
+import org.scalatest.FunSuite
+
+class FundamentalTestWithRDF extends FundamentalTest with ConcreteModel with RDFImplicits
+
+abstract class FundamentalTest extends FunSuite with DirectMappingModule with RDFImplicits {
+
+  val DirectMapping = new DirectMapping {  }
+
+  import DirectMapping._
+
+  test("NodeMap") {
+
+    val ck1:CandidateKey = CandidateKey("name", "ssn")
+    val ck2:CandidateKey = CandidateKey("ID")
+    val v11:List[CellValue] = List(LexicalValue("bob"), LexicalValue("123"))
+    val v21:List[CellValue] = List(LexicalValue("alice"), LexicalValue("8"))
+    val v12:List[CellValue] = List(LexicalValue("18"))
+    val v22:List[CellValue] = List(LexicalValue("23"))
+    val s1:Node = NodeBNode(BNode("1"))
+    val s2:Node = NodeBNode(BNode("2"))
+    val data:Set[(List[(CandidateKey, List[CellValue])], Node)] =
+      Set((List((ck1, v11),(ck2, v21)), s1),
+	  (List((ck1, v12),(ck2, v22)), s2))
+    val test = data.foldLeft(KeyMap(Map[CandidateKey,  Map[List[CellValue], Node]]()))((m, t) => m ++ (t._1, t._2))
+
+    val goal:KeyMap = KeyMap(
+      Map(ck1 -> Map(v11 -> s1,
+      		     v12 -> s2),
+      	  ck2 -> Map(v21 -> s1,
+      		     v22 -> s2))
+    )
+    assert(goal === test)
+  }
+
+}
+
+
+
+
+
+
+class DirectMappingTestWithConcreteModel extends DirectMappingTest with ConcreteModel
+
+trait DirectMappingTest extends FunSuite with RDFModel with RDFImplicits with DirectMappingModule with TurtleModule {
+
+  val DirectMapping = new DirectMapping {  }
+
+  import DirectMapping._
+
+  val SqlParser = sql.SqlParser()
+
+  val turtleParser = new TurtleParser { }
+
+  def testDirectMapping(testName:String, db:Database, expectedGraph:Graph):Unit =
+    test(testName) {
+      val computedGraph = directDB(db)
+      assert (expectedGraph === computedGraph)
+    }
+
+  def testDirectMapping(testName:String, dbFile:File, expectedGraphFile:File):Unit = {
+    val db = SqlParser.toDB(dbFile)
+    val expectedGraph:Graph = turtleParser.toGraph(expectedGraphFile)
+    testDirectMapping(testName, db, expectedGraph)
+  }
+
+  def testDirectMapping(testName:String):Unit =
+    testDirectMapping(testName,
+		      new File("./sharedtestdata/directmappingspec/" + testName + ".sql"),
+		      new File("./sharedtestdata/directmappingspec/" + testName + ".ttl"))
+
+  // 2 People 1 Addresses
+  testDirectMapping("emp_addr")
+
+  // 2 People 1 Addresses 1 Department
+  testDirectMapping("multi_key")
+
+  // 2 People 1 Addresses 1 Department 2 Projects 1 Task
+  testDirectMapping("ref_no_pk")
+
+  // 1 People 1 Addresses 1 Offices
+  testDirectMapping("hier_tabl_proto")
+
+  // 1 People 1 Addresses 1 Offices 1 ExectutiveOffices
+  testDirectMapping("hier_tabl")
+
+}
+
--- a/directmapping/src/test/scala/DirectMappingTest.scala	Tue Jan 11 18:35:16 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-package org.w3.directmapping
-
-import org.w3.rdf.{Model => RDFModel, Implicits => RDFImplicits, _}
-import org.w3.rdb.RDB._
-import org.w3.sql
-import org.w3.rdf.turtle.TurtleModule
-//import org.w3.directmapping.DirectMapping
-import java.io.File
-
-import org.scalatest.FunSuite
-
-class FundamentalTestWithRDF extends FundamentalTest with ConcreteModel with RDFImplicits
-
-abstract class FundamentalTest extends FunSuite with DirectMappingModule with RDFImplicits {
-
-  val DirectMapping = new DirectMapping {  }
-
-  import DirectMapping._
-
-  test("NodeMap") {
-
-    val ck1:CandidateKey = CandidateKey("name", "ssn")
-    val ck2:CandidateKey = CandidateKey("ID")
-    val v11:List[CellValue] = List(LexicalValue("bob"), LexicalValue("123"))
-    val v21:List[CellValue] = List(LexicalValue("alice"), LexicalValue("8"))
-    val v12:List[CellValue] = List(LexicalValue("18"))
-    val v22:List[CellValue] = List(LexicalValue("23"))
-    val s1:Node = NodeBNode(BNode("1"))
-    val s2:Node = NodeBNode(BNode("2"))
-    val data:Set[(List[(CandidateKey, List[CellValue])], Node)] =
-      Set((List((ck1, v11),(ck2, v21)), s1),
-	  (List((ck1, v12),(ck2, v22)), s2))
-    val test = data.foldLeft(KeyMap(Map[CandidateKey,  Map[List[CellValue], Node]]()))((m, t) => m ++ (t._1, t._2))
-
-    val goal:KeyMap = KeyMap(
-      Map(ck1 -> Map(v11 -> s1,
-      		     v12 -> s2),
-      	  ck2 -> Map(v21 -> s1,
-      		     v22 -> s2))
-    )
-    assert(goal === test)
-  }
-
-}
-
-
-
-
-
-
-class DirectMappingTestWithConcreteModel extends DirectMappingTest with ConcreteModel
-
-class DirectMappingTestWithJenaModel extends DirectMappingTest with org.w3.rdf.jena.JenaModel
-
-trait DirectMappingTest extends FunSuite with RDFModel with RDFImplicits with DirectMappingModule with TurtleModule {
-
-  val DirectMapping = new DirectMapping {  }
-
-  import DirectMapping._
-
-  val SqlParser = sql.SqlParser()
-
-  val turtleParser = new TurtleParser { }
-
-  def testDirectMapping(testName:String, db:Database, expectedGraph:Graph):Unit =
-    test(testName) {
-      val computedGraph = directDB(db)
-      assert (expectedGraph === computedGraph)
-    }
-
-  def testDirectMapping(testName:String, dbFile:File, expectedGraphFile:File):Unit = {
-    val db = SqlParser.toDB(dbFile)
-    val expectedGraph:Graph = turtleParser.toGraph(expectedGraphFile)
-    testDirectMapping(testName, db, expectedGraph)
-  }
-
-  def testDirectMapping(testName:String):Unit =
-    testDirectMapping(testName,
-		      new File("./sharedtestdata/directmappingspec/" + testName + ".sql"),
-		      new File("./sharedtestdata/directmappingspec/" + testName + ".ttl"))
-
-  // 2 People 1 Addresses
-  testDirectMapping("emp_addr")
-
-  // 2 People 1 Addresses 1 Department
-  testDirectMapping("multi_key")
-
-  // 2 People 1 Addresses 1 Department 2 Projects 1 Task
-  testDirectMapping("ref_no_pk")
-
-  // 1 People 1 Addresses 1 Offices
-  testDirectMapping("hier_tabl_proto")
-
-  // 1 People 1 Addresses 1 Offices 1 ExectutiveOffices
-  testDirectMapping("hier_tabl")
-
-}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jena-test/src/test/scala/JenaTest.scala	Wed Jan 12 16:15:46 2011 -0500
@@ -0,0 +1,14 @@
+package org.w3.rdf.jena
+
+import org.w3.rdf.rdfxml._
+
+class RDFXMLTestWithJena extends RDFXMLTest with JenaModel
+
+import org.w3.rdf.turtle._
+
+class TurtleTestWithJena extends TurtleTest with JenaModel
+
+import org.w3.directmapping._
+
+class DirectMappingTestWithJena extends DirectMappingTest with JenaModel
+
--- a/project/build/RDB2RDF.scala	Tue Jan 11 18:35:16 2011 -0500
+++ b/project/build/RDB2RDF.scala	Wed Jan 12 16:15:46 2011 -0500
@@ -7,6 +7,13 @@
   override def defaultExcludes = super.defaultExcludes || "*~"
 }
 
+trait TestSuite extends BasicScalaProject {
+  val scalatools = "scala-tools" at "http://scala-tools.org/repo-snapshots"
+  val scalatest = "org.scalatest" % "scalatest" % "1.2-for-scala-2.8.0.final-SNAPSHOT" % "compile"
+  override def compileOptions = super.compileOptions ++ Seq(Unchecked, Deprecation, ExplainTypes)
+  override def defaultExcludes = super.defaultExcludes || "*~"
+}
+
 class FeDeRate(info: ProjectInfo) extends ParentProject(info) {
   self =>
 
@@ -18,10 +25,14 @@
   lazy val rdf = project("rdf", "rdf", new RDF(_), isomorphic)
   lazy val rdfdsl = project("rdfdsl", "rdfdsl", new RDFDSL(_), rdf)
   lazy val turtle = project("turtle", "turtle", new Turtle(_), rdf)
+  lazy val turtleTest = project("turtle-test", "turtle-test", new TurtleTest(_), turtle)
   lazy val rdfxml = project("rdfxml", "rdfxml", new RDFXML(_), rdf)
+  lazy val rdfxmlTest = project("rdfxml-test", "rdfxml-test", new RDFXMLTest(_), rdfxml)
   lazy val jena = project("jena", "jena", new Jena(_), rdf)
+  lazy val jenaTest = project("jena-test", "jena-test", new JenaTest(_), jena, directmappingTest, turtleTest, rdfxmlTest)
   lazy val sharedtestdata = project("sharedtestdata", "sharedtestdata", new SharedTestData(_), rdb, rdf, sql, turtle)
-  lazy val directmapping = project("directmapping", "directmapping", new DirectMapping(_), rdb, rdf, sql, sharedtestdata, jena)
+  lazy val directmapping = project("directmapping", "directmapping", new DirectMapping(_), rdb, rdf, sql, sharedtestdata)
+  lazy val directmappingTest = project("directmapping-test", "directmapping-test", new DirectMappingTest(_), directmapping)
   lazy val sparql = project("sparql", "sparql", new SPARQL(_), rdf)
   lazy val sparql2sql = project("sparql2sql", "sparql2sql", new SPARQL2SQL(_), sparql, sql)
   lazy val sparql2sparql = project("sparql2sparql", "sparql2sparql", new SPARQL2SPARQL(_), sparql)
@@ -41,20 +52,28 @@
 
   class Turtle(info: ProjectInfo) extends DefaultProject(info) with Common
 
+  class TurtleTest(info: ProjectInfo) extends DefaultProject(info) with TestSuite
+
   class RDFXML(info: ProjectInfo) extends DefaultProject(info) with Common {
     val jena = "com.hp.hpl.jena" % "jena" % "2.6.4"
     val jenaIri = "com.hp.hpl.jena" % "iri" % "0.8" from "http://openjena.org/repo/com/hp/hpl/jena/iri/0.8/iri-0.8.jar"
   }
 
+  class RDFXMLTest(info: ProjectInfo) extends DefaultProject(info) with TestSuite
+
   class Jena(info: ProjectInfo) extends DefaultProject(info) with Common {
     val jena = "com.hp.hpl.jena" % "jena" % "2.6.4"
     val jenaIri = "com.hp.hpl.jena" % "iri" % "0.8" from "http://openjena.org/repo/com/hp/hpl/jena/iri/0.8/iri-0.8.jar"
   }
 
+  class JenaTest(info: ProjectInfo) extends DefaultProject(info) with Common
+
   class SharedTestData(info: ProjectInfo) extends DefaultProject(info) with Common
 
   class DirectMapping(info: ProjectInfo) extends DefaultProject(info) with Common
 
+  class DirectMappingTest(info: ProjectInfo) extends DefaultProject(info) with TestSuite
+
   class SPARQL(info: ProjectInfo) extends DefaultProject(info) with Common
 
   class SPARQL2SQL(info: ProjectInfo) extends DefaultProject(info) with Common
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdfxml-test/src/main/scala/RDFXMLTestSuite.scala	Wed Jan 12 16:15:46 2011 -0500
@@ -0,0 +1,47 @@
+package org.w3.rdf.rdfxml
+
+import org.w3.rdf.{Model => RDFModel, Implicits => RDFImplicits, _}
+
+import org.scalatest.FunSuite
+
+class RDFXMLTestWithRDF extends RDFXMLTest with ConcreteModel with RDFImplicits
+
+abstract class RDFXMLTest extends FunSuite with RDFXMLModule with RDFImplicits {
+
+  val parser = new RDFXMLParser {  }
+
+  test("default on http://www.rdfabout.com/demo/validator/") {
+
+    val rdfxml = """
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:dc="http://purl.org/dc/elements/1.1/">
+  <rdf:Description rdf:about="http://www.rdfabout.com/">
+    <dc:title>rdf:about: About Resource Description Framework</dc:title>
+  </rdf:Description>
+</rdf:RDF>
+""" // "
+
+    val (graph, _) = parser.toGraph(rdfxml)
+
+    println(graph)
+
+  }
+
+  test("default on http://www.w3.org/RDF/Validator/") {
+
+    val rdfxml = """<?xml version="1.0"?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:dc="http://purl.org/dc/elements/1.1/">
+  <rdf:Description rdf:about="http://www.w3.org/">
+    <dc:title>World Wide Web Consortium</dc:title> 
+  </rdf:Description>
+</rdf:RDF>
+""" // "
+
+    val (graph, _) = parser.toGraph(rdfxml)
+
+    println(graph)
+
+  }
+
+}
--- a/rdfxml/src/test/scala/RDFXMLTest.scala	Tue Jan 11 18:35:16 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-package org.w3.rdf.rdfxml
-
-import org.w3.rdf.{Model => RDFModel, Implicits => RDFImplicits, _}
-
-import org.scalatest.FunSuite
-
-class RDFXMLTestWithRDF extends RDFXMLTest with ConcreteModel with RDFImplicits
-
-abstract class RDFXMLTest extends FunSuite with RDFXMLModule with RDFImplicits {
-
-  val parser = new RDFXMLParser {  }
-
-  test("default on http://www.rdfabout.com/demo/validator/") {
-
-    val rdfxml = """
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-  xmlns:dc="http://purl.org/dc/elements/1.1/">
-  <rdf:Description rdf:about="http://www.rdfabout.com/">
-    <dc:title>rdf:about: About Resource Description Framework</dc:title>
-  </rdf:Description>
-</rdf:RDF>
-""" // "
-
-    val (graph, _) = parser.toGraph(rdfxml)
-
-    println(graph)
-
-  }
-
-  test("default on http://www.w3.org/RDF/Validator/") {
-
-    val rdfxml = """<?xml version="1.0"?>
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-  xmlns:dc="http://purl.org/dc/elements/1.1/">
-  <rdf:Description rdf:about="http://www.w3.org/">
-    <dc:title>World Wide Web Consortium</dc:title> 
-  </rdf:Description>
-</rdf:RDF>
-""" // "
-
-    val (graph, _) = parser.toGraph(rdfxml)
-
-    println(graph)
-
-  }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/turtle-test/src/main/scala/TurtleTestSuite.scala	Wed Jan 12 16:15:46 2011 -0500
@@ -0,0 +1,243 @@
+package org.w3.rdf.turtle
+
+import org.w3.rdf.{Model => RDFModel, Implicits => RDFImplicits, _}
+import org.scalatest.FunSuite
+
+class TurtleTestWithRDF extends TurtleTest with ConcreteModel with RDFImplicits
+
+abstract class TurtleTest extends FunSuite with TurtleModule with RDFImplicits {
+
+  val turtleParser = new TurtleParser { }
+
+  test("directgraph_emp_adder") {
+    val directgraph_emp_adder:Graph =
+      Graph(
+	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
+	Triple(IRI("People/ID.8#_"),IRI("People#ID"),TypedLiteral("8",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("People/ID.8#_"),IRI("People#fname"),TypedLiteral("Sue",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
+	
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string")))
+      )
+
+    val turtle_emp_adder:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
+<People/ID.7#_> <People#ID> "7"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<People/ID.7#_> <People#fname> "Bob"^^<http://www.w3.org/2001/XMLSchema#string> .
+<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
+<People/ID.8#_> <People#ID> 8 .
+<People/ID.8#_> <People#fname> "Sue"^^xsd:string .
+<Addresses/ID.18#_> <Addresses#ID> 18 .
+<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
+<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
+"""
+    assert(directgraph_emp_adder === turtleParser.toGraph(turtle_emp_adder))
+  }
+
+  test("directgraph_multi_key") {
+    val directgraph_multi_key:Graph =
+      Graph(
+	Triple(IRI("People/ID.7#_"),IRI("People#deptName"),TypedLiteral("accounting",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#deptCity"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#deptName_deptCity"),IRI("Department/ID.23#_")),
+
+	Triple(IRI("Department/ID.23#_"),IRI("Department#ID"),TypedLiteral("23",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Department/ID.23#_"),IRI("Department#name"),TypedLiteral("accounting",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Department/ID.23#_"),IRI("Department#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Department/ID.23#_"),IRI("Department#manager"),IRI("People/ID.8#_")),
+
+	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
+	Triple(IRI("People/ID.8#_"),IRI("People#ID"),TypedLiteral("8",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("People/ID.8#_"),IRI("People#fname"),TypedLiteral("Sue",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
+
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string"))))
+
+    val turtle_multi_key:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
+<People/ID.7#_> <People#deptName> "accounting"^^xsd:string .
+<People/ID.7#_> <People#deptCity> "Cambridge"^^xsd:string .
+<People/ID.7#_> <People#deptName_deptCity> <Department/ID.23#_> .
+
+<Department/ID.23#_> <Department#ID> "23"^^xsd:integer .
+<Department/ID.23#_> <Department#name> "accounting"^^xsd:string .
+<Department/ID.23#_> <Department#city> "Cambridge"^^xsd:string .
+<Department/ID.23#_> <Department#manager> <People/ID.8#_> .
+
+<People/ID.7#_> <People#ID> "7"^^xsd:integer .
+<People/ID.7#_> <People#fname> "Bob"^^xsd:string .
+<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
+<People/ID.8#_> <People#ID> "8"^^xsd:integer .
+<People/ID.8#_> <People#fname> "Sue"^^xsd:string . 
+
+<Addresses/ID.18#_> <Addresses#ID> "18"^^xsd:integer .
+<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
+<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
+"""
+    assert(directgraph_multi_key === turtleParser.toGraph(turtle_multi_key))
+  }
+
+  test("directgraph_ref_no_pk") {
+    val directgraph_ref_no_pk:Graph =
+      Graph(
+	Triple(BNode("a"), IRI("Projects#lead"), IRI("People/ID.8#_")),
+	Triple(BNode("a"), IRI("Projects#name"), TypedLiteral("pencil survey", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(BNode("a"), IRI("Projects#deptName"), TypedLiteral("accounting", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(BNode("a"), IRI("Projects#deptCity"), TypedLiteral("Cambridge", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(BNode("a"), IRI("Projects#deptName_deptCity"), IRI("Department/ID.23#_")),
+
+	Triple(BNode("b"), IRI("Projects#lead"), IRI("People/ID.8#_")),
+	Triple(BNode("b"), IRI("Projects#name"), TypedLiteral("eraser survey", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(BNode("b"), IRI("Projects#deptName"), TypedLiteral("accounting", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(BNode("b"), IRI("Projects#deptCity"), TypedLiteral("Cambridge", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(BNode("b"), IRI("Projects#deptName_deptCity"), IRI("Department/ID.23#_")),
+
+	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#worker"), IRI("People/ID.7#_")),
+	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#project"), TypedLiteral("pencil survey", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#deptName"), TypedLiteral("accounting", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#deptCity"), TypedLiteral("Cambridge", IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#deptName_deptCity"), IRI("Department/ID.23#_")),
+	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#project_deptName_deptCity"), BNode("a")),
+
+	Triple(IRI("People/ID.7#_"),IRI("People#deptName"),TypedLiteral("accounting",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#deptCity"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#deptName_deptCity"),IRI("Department/ID.23#_")),
+
+	Triple(IRI("Department/ID.23#_"),IRI("Department#ID"),TypedLiteral("23",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Department/ID.23#_"),IRI("Department#name"),TypedLiteral("accounting",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Department/ID.23#_"),IRI("Department#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Department/ID.23#_"),IRI("Department#manager"),IRI("People/ID.8#_")),
+
+	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
+	Triple(IRI("People/ID.8#_"),IRI("People#ID"),TypedLiteral("8",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("People/ID.8#_"),IRI("People#fname"),TypedLiteral("Sue",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
+
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string")))
+      )
+
+    val turtle_ref_no_pk:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
+_:a <Projects#lead> <People/ID.8#_> .
+_:a <Projects#name> "pencil survey"^^xsd:string .
+_:a <Projects#deptName> "accounting"^^xsd:string .
+_:a <Projects#deptCity> "Cambridge"^^xsd:string .
+_:a <Projects#deptName_deptCity> <Department/ID.23#_> .
+
+_:b <Projects#lead> <People/ID.8#_> .
+_:b <Projects#name> "eraser survey"^^xsd:string .
+_:b <Projects#deptName> "accounting"^^xsd:string .
+_:b <Projects#deptCity> "Cambridge"^^xsd:string .
+_:b <Projects#deptName_deptCity> <Department/ID.23#_> .
+
+<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#worker> <People/ID.7#_> .
+<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#project> "pencil survey"^^xsd:string .
+<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#deptName> "accounting"^^xsd:string .
+<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#deptCity> "Cambridge"^^xsd:string .
+<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#deptName_deptCity> <Department/ID.23#_> .
+<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#project_deptName_deptCity> _:a .
+
+<People/ID.7#_> <People#deptName> "accounting"^^xsd:string .
+<People/ID.7#_> <People#deptCity> "Cambridge"^^xsd:string .
+<People/ID.7#_> <People#deptName_deptCity> <Department/ID.23#_> .
+
+<Department/ID.23#_> <Department#ID> "23"^^xsd:integer .
+<Department/ID.23#_> <Department#name> "accounting"^^xsd:string .
+<Department/ID.23#_> <Department#city> "Cambridge"^^xsd:string .
+<Department/ID.23#_> <Department#manager> <People/ID.8#_> .
+
+<People/ID.7#_> <People#ID> "7"^^xsd:integer .
+<People/ID.7#_> <People#fname> "Bob"^^xsd:string .
+<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
+<People/ID.8#_> <People#ID> "8"^^xsd:integer .
+<People/ID.8#_> <People#fname> "Sue"^^xsd:string .
+
+<Addresses/ID.18#_> <Addresses#ID> "18"^^xsd:integer .
+<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
+<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
+"""
+    assert(directgraph_ref_no_pk === turtleParser.toGraph(turtle_ref_no_pk))
+  }
+
+  test("directgraph_hier_tabl_proto") {
+    val directgraph_hier_tabl_proto:Graph =
+      Graph(
+	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#building"),TypedLiteral("32",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#ofcNumber"),TypedLiteral("G528",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
+
+	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
+
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string")))
+      )
+    val turtle_hier_tabl_proto:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
+<Addresses/ID.18#_> <Offices#ID> "18"^^xsd:integer .
+<Addresses/ID.18#_> <Offices#building> "32"^^xsd:integer .
+<Addresses/ID.18#_> <Offices#ofcNumber> "G528"^^xsd:string . 
+
+<People/ID.7#_> <People#ID> "7"^^xsd:integer .
+<People/ID.7#_> <People#fname> "Bob"^^xsd:string .
+<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
+
+<Addresses/ID.18#_> <Addresses#ID> "18"^^xsd:integer .
+<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
+<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
+"""
+    assert(directgraph_hier_tabl_proto === turtleParser.toGraph(turtle_hier_tabl_proto))
+  }
+
+  test("directgraph_hier_tabl") {
+    val directgraph_hier_tabl:Graph =
+      Graph(
+	Triple(IRI("Addresses/ID.18#_"),IRI("ExecutiveOffices#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("ExecutiveOffices#desk"),TypedLiteral("oak",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
+
+	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#building"),TypedLiteral("32",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#ofcNumber"),TypedLiteral("G528",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
+
+	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
+
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
+	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string")))
+      )
+
+    val turtle_hier_tabl:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
+<Addresses/ID.18#_> <ExecutiveOffices#ID> "18"^^xsd:integer .
+<Addresses/ID.18#_> <ExecutiveOffices#desk> "oak"^^xsd:string . 
+
+<Addresses/ID.18#_> <Offices#ID> "18"^^xsd:integer .
+<Addresses/ID.18#_> <Offices#building> "32"^^xsd:integer .
+<Addresses/ID.18#_> <Offices#ofcNumber> "G528"^^xsd:string . 
+
+<People/ID.7#_> <People#ID> "7"^^xsd:integer .
+<People/ID.7#_> <People#fname> "Bob"^^xsd:string .
+<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
+
+<Addresses/ID.18#_> <Addresses#ID> "18"^^xsd:integer .
+<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
+<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
+"""
+    assert(directgraph_hier_tabl === turtleParser.toGraph(turtle_hier_tabl))
+  }
+
+}
+
--- a/turtle/src/test/scala/turtleTest.scala	Tue Jan 11 18:35:16 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +0,0 @@
-package org.w3.rdf.turtle
-
-import org.w3.rdf.{Model => RDFModel, Implicits => RDFImplicits, _}
-import org.scalatest.FunSuite
-
-class TurtleTestWithRDF extends TurtleTest with ConcreteModel with RDFImplicits
-
-abstract class TurtleTest extends FunSuite with TurtleModule with RDFImplicits {
-
-  val turtleParser = new TurtleParser { }
-
-  test("directgraph_emp_adder") {
-    val directgraph_emp_adder:Graph =
-      Graph(
-	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
-	Triple(IRI("People/ID.8#_"),IRI("People#ID"),TypedLiteral("8",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("People/ID.8#_"),IRI("People#fname"),TypedLiteral("Sue",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
-	
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string")))
-      )
-
-    val turtle_emp_adder:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
-<People/ID.7#_> <People#ID> "7"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<People/ID.7#_> <People#fname> "Bob"^^<http://www.w3.org/2001/XMLSchema#string> .
-<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
-<People/ID.8#_> <People#ID> 8 .
-<People/ID.8#_> <People#fname> "Sue"^^xsd:string .
-<Addresses/ID.18#_> <Addresses#ID> 18 .
-<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
-<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
-"""
-    assert(directgraph_emp_adder === turtleParser.toGraph(turtle_emp_adder))
-  }
-
-  test("directgraph_multi_key") {
-    val directgraph_multi_key:Graph =
-      Graph(
-	Triple(IRI("People/ID.7#_"),IRI("People#deptName"),TypedLiteral("accounting",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#deptCity"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#deptName_deptCity"),IRI("Department/ID.23#_")),
-
-	Triple(IRI("Department/ID.23#_"),IRI("Department#ID"),TypedLiteral("23",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Department/ID.23#_"),IRI("Department#name"),TypedLiteral("accounting",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Department/ID.23#_"),IRI("Department#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Department/ID.23#_"),IRI("Department#manager"),IRI("People/ID.8#_")),
-
-	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
-	Triple(IRI("People/ID.8#_"),IRI("People#ID"),TypedLiteral("8",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("People/ID.8#_"),IRI("People#fname"),TypedLiteral("Sue",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
-
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string"))))
-
-    val turtle_multi_key:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
-<People/ID.7#_> <People#deptName> "accounting"^^xsd:string .
-<People/ID.7#_> <People#deptCity> "Cambridge"^^xsd:string .
-<People/ID.7#_> <People#deptName_deptCity> <Department/ID.23#_> .
-
-<Department/ID.23#_> <Department#ID> "23"^^xsd:integer .
-<Department/ID.23#_> <Department#name> "accounting"^^xsd:string .
-<Department/ID.23#_> <Department#city> "Cambridge"^^xsd:string .
-<Department/ID.23#_> <Department#manager> <People/ID.8#_> .
-
-<People/ID.7#_> <People#ID> "7"^^xsd:integer .
-<People/ID.7#_> <People#fname> "Bob"^^xsd:string .
-<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
-<People/ID.8#_> <People#ID> "8"^^xsd:integer .
-<People/ID.8#_> <People#fname> "Sue"^^xsd:string . 
-
-<Addresses/ID.18#_> <Addresses#ID> "18"^^xsd:integer .
-<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
-<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
-"""
-    assert(directgraph_multi_key === turtleParser.toGraph(turtle_multi_key))
-  }
-
-  test("directgraph_ref_no_pk") {
-    val directgraph_ref_no_pk:Graph =
-      Graph(
-	Triple(BNode("a"), IRI("Projects#lead"), IRI("People/ID.8#_")),
-	Triple(BNode("a"), IRI("Projects#name"), TypedLiteral("pencil survey", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(BNode("a"), IRI("Projects#deptName"), TypedLiteral("accounting", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(BNode("a"), IRI("Projects#deptCity"), TypedLiteral("Cambridge", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(BNode("a"), IRI("Projects#deptName_deptCity"), IRI("Department/ID.23#_")),
-
-	Triple(BNode("b"), IRI("Projects#lead"), IRI("People/ID.8#_")),
-	Triple(BNode("b"), IRI("Projects#name"), TypedLiteral("eraser survey", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(BNode("b"), IRI("Projects#deptName"), TypedLiteral("accounting", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(BNode("b"), IRI("Projects#deptCity"), TypedLiteral("Cambridge", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(BNode("b"), IRI("Projects#deptName_deptCity"), IRI("Department/ID.23#_")),
-
-	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#worker"), IRI("People/ID.7#_")),
-	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#project"), TypedLiteral("pencil survey", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#deptName"), TypedLiteral("accounting", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#deptCity"), TypedLiteral("Cambridge", IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#deptName_deptCity"), IRI("Department/ID.23#_")),
-	Triple(IRI("TaskAssignments/worker.7_project.pencil+survey#_"), IRI("TaskAssignments#project_deptName_deptCity"), BNode("a")),
-
-	Triple(IRI("People/ID.7#_"),IRI("People#deptName"),TypedLiteral("accounting",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#deptCity"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#deptName_deptCity"),IRI("Department/ID.23#_")),
-
-	Triple(IRI("Department/ID.23#_"),IRI("Department#ID"),TypedLiteral("23",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Department/ID.23#_"),IRI("Department#name"),TypedLiteral("accounting",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Department/ID.23#_"),IRI("Department#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Department/ID.23#_"),IRI("Department#manager"),IRI("People/ID.8#_")),
-
-	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
-	Triple(IRI("People/ID.8#_"),IRI("People#ID"),TypedLiteral("8",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("People/ID.8#_"),IRI("People#fname"),TypedLiteral("Sue",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
-
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string")))
-      )
-
-    val turtle_ref_no_pk:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
-_:a <Projects#lead> <People/ID.8#_> .
-_:a <Projects#name> "pencil survey"^^xsd:string .
-_:a <Projects#deptName> "accounting"^^xsd:string .
-_:a <Projects#deptCity> "Cambridge"^^xsd:string .
-_:a <Projects#deptName_deptCity> <Department/ID.23#_> .
-
-_:b <Projects#lead> <People/ID.8#_> .
-_:b <Projects#name> "eraser survey"^^xsd:string .
-_:b <Projects#deptName> "accounting"^^xsd:string .
-_:b <Projects#deptCity> "Cambridge"^^xsd:string .
-_:b <Projects#deptName_deptCity> <Department/ID.23#_> .
-
-<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#worker> <People/ID.7#_> .
-<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#project> "pencil survey"^^xsd:string .
-<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#deptName> "accounting"^^xsd:string .
-<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#deptCity> "Cambridge"^^xsd:string .
-<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#deptName_deptCity> <Department/ID.23#_> .
-<TaskAssignments/worker.7_project.pencil+survey#_> <TaskAssignments#project_deptName_deptCity> _:a .
-
-<People/ID.7#_> <People#deptName> "accounting"^^xsd:string .
-<People/ID.7#_> <People#deptCity> "Cambridge"^^xsd:string .
-<People/ID.7#_> <People#deptName_deptCity> <Department/ID.23#_> .
-
-<Department/ID.23#_> <Department#ID> "23"^^xsd:integer .
-<Department/ID.23#_> <Department#name> "accounting"^^xsd:string .
-<Department/ID.23#_> <Department#city> "Cambridge"^^xsd:string .
-<Department/ID.23#_> <Department#manager> <People/ID.8#_> .
-
-<People/ID.7#_> <People#ID> "7"^^xsd:integer .
-<People/ID.7#_> <People#fname> "Bob"^^xsd:string .
-<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
-<People/ID.8#_> <People#ID> "8"^^xsd:integer .
-<People/ID.8#_> <People#fname> "Sue"^^xsd:string .
-
-<Addresses/ID.18#_> <Addresses#ID> "18"^^xsd:integer .
-<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
-<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
-"""
-    assert(directgraph_ref_no_pk === turtleParser.toGraph(turtle_ref_no_pk))
-  }
-
-  test("directgraph_hier_tabl_proto") {
-    val directgraph_hier_tabl_proto:Graph =
-      Graph(
-	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#building"),TypedLiteral("32",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#ofcNumber"),TypedLiteral("G528",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
-
-	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
-
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string")))
-      )
-    val turtle_hier_tabl_proto:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
-<Addresses/ID.18#_> <Offices#ID> "18"^^xsd:integer .
-<Addresses/ID.18#_> <Offices#building> "32"^^xsd:integer .
-<Addresses/ID.18#_> <Offices#ofcNumber> "G528"^^xsd:string . 
-
-<People/ID.7#_> <People#ID> "7"^^xsd:integer .
-<People/ID.7#_> <People#fname> "Bob"^^xsd:string .
-<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
-
-<Addresses/ID.18#_> <Addresses#ID> "18"^^xsd:integer .
-<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
-<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
-"""
-    assert(directgraph_hier_tabl_proto === turtleParser.toGraph(turtle_hier_tabl_proto))
-  }
-
-  test("directgraph_hier_tabl") {
-    val directgraph_hier_tabl:Graph =
-      Graph(
-	Triple(IRI("Addresses/ID.18#_"),IRI("ExecutiveOffices#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("ExecutiveOffices#desk"),TypedLiteral("oak",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
-
-	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#building"),TypedLiteral("32",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Offices#ofcNumber"),TypedLiteral("G528",IRI("http://www.w3.org/2001/XMLSchema#string"))), 
-
-	Triple(IRI("People/ID.7#_"),IRI("People#ID"),TypedLiteral("7",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#fname"),TypedLiteral("Bob",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("People/ID.7#_"),IRI("People#addr"),IRI("Addresses/ID.18#_")),
-
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#ID"),TypedLiteral("18",IRI("http://www.w3.org/2001/XMLSchema#integer"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#city"),TypedLiteral("Cambridge",IRI("http://www.w3.org/2001/XMLSchema#string"))),
-	Triple(IRI("Addresses/ID.18#_"),IRI("Addresses#state"),TypedLiteral("MA",IRI("http://www.w3.org/2001/XMLSchema#string")))
-      )
-
-    val turtle_hier_tabl:String = """
[email protected] xsd: <http://www.w3.org/2001/XMLSchema#> .
-<Addresses/ID.18#_> <ExecutiveOffices#ID> "18"^^xsd:integer .
-<Addresses/ID.18#_> <ExecutiveOffices#desk> "oak"^^xsd:string . 
-
-<Addresses/ID.18#_> <Offices#ID> "18"^^xsd:integer .
-<Addresses/ID.18#_> <Offices#building> "32"^^xsd:integer .
-<Addresses/ID.18#_> <Offices#ofcNumber> "G528"^^xsd:string . 
-
-<People/ID.7#_> <People#ID> "7"^^xsd:integer .
-<People/ID.7#_> <People#fname> "Bob"^^xsd:string .
-<People/ID.7#_> <People#addr> <Addresses/ID.18#_> .
-
-<Addresses/ID.18#_> <Addresses#ID> "18"^^xsd:integer .
-<Addresses/ID.18#_> <Addresses#city> "Cambridge"^^xsd:string .
-<Addresses/ID.18#_> <Addresses#state> "MA"^^xsd:string .
-"""
-    assert(directgraph_hier_tabl === turtleParser.toGraph(turtle_hier_tabl))
-  }
-
-}
-