changeset 344:e4918c0a0e71 no-hierarchy

~ references and scalars don't need to be passed the relation
author Alexandre Bertails <bertails@w3.org>
date Mon, 14 Feb 2011 14:13:53 -0500
parents b4679fb25560
children 57ecde6ce678
files directmapping/src/main/scala/DirectMapping.scala rdb/src/main/scala/RDB.scala
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/directmapping/src/main/scala/DirectMapping.scala	Sun Feb 13 23:02:26 2011 -0500
+++ b/directmapping/src/main/scala/DirectMapping.scala	Mon Feb 14 14:13:53 2011 -0500
@@ -133,8 +133,8 @@
 	    SubjectNode(freshnode)
 	  }
         }
-      val fromFKs = t.references(r) map { fk => referenceSemantics(nodemap, t, fk) }
-      val fromLexicalValues = t.scalars(r) flatMap { a => lexicalValueSemantics(t, a) }
+      val fromFKs = t.references map { fk => referenceSemantics(nodemap, t, fk) }
+      val fromLexicalValues = t.scalars flatMap { a => lexicalValueSemantics(t, a) }
       // the relation provenance is mapped to an RDF type information, computed from the relation itself
       val fromRelation = (PredicateIRI(IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")),
 			  ObjectNode(NodeIRI(IRI(UE(r)))))
--- a/rdb/src/main/scala/RDB.scala	Sun Feb 13 23:02:26 2011 -0500
+++ b/rdb/src/main/scala/RDB.scala	Mon Feb 14 14:13:53 2011 -0500
@@ -113,7 +113,7 @@
     /**
      * returns all foreign keys that have only not-null values in it
      */
-    def references(r:Relation):Set[ForeignKey] = {
+    def references:Set[ForeignKey] = {
       val nullAttributes:Set[AttrName] =
 	m collect { case (attrName, cellValue) if cellValue == ␀ => attrName } toSet
 
@@ -124,7 +124,7 @@
      * returns all the not null attribute names
      * such that they don't also define a unary foreign key
      */
-    def scalars(r:Relation):Set[AttrName] = {
+    def scalars:Set[AttrName] = {
       val notNullAttributes:Set[AttrName] =
 	m collect { case (attrName, cellValue) if cellValue != ␀ => attrName } toSet
 
Set up and maintained by W3C Systems Team, please report bugs to sysreq@w3.org.

W3C would like to thank Microsoft who donated the server that allows us to run this service.