...
authorEric Prud'hommeaux <bertails@w3.org>
Wed, 30 Dec 2009 09:55:53 -0500
changeset 87 98edfae72eae
parent 86 ee54401b7e2d
child 88 77007f8d3764
...
src/main/scala/RDB2RDFMain.scala
--- a/src/main/scala/RDB2RDFMain.scala	Wed Dec 30 09:42:53 2009 -0500
+++ b/src/main/scala/RDB2RDFMain.scala	Wed Dec 30 09:55:53 2009 -0500
@@ -320,11 +320,12 @@
 		R2RState(myState.joins, myState.varmap, myState.exprs + PrimaryExpressionEq(varToAttribute(myState.varmap, v), RValueAttr(unionAliasAttr)))
 	    } else {
 	      /* This variable is new to the outer context. */
+	      val unionAttr = RelAliasAttribute(unionAlias, Attribute(Name("A_" + v.s)))
 	      val mapper:SQL2RDFValueMapper = disjointState.varmap(v) match {
-		case RDFNoder(rel, constrainMe)  => RDFNoder(rel, RelAliasAttribute(unionAlias, constrainMe.attribute))
-		case StringMapper(constrainMe)   => StringMapper(RelAliasAttribute(unionAlias, Attribute(Name("A_" + v.s))))
-		case IntMapper(constrainMe)      => IntMapper(RelAliasAttribute(unionAlias, constrainMe.attribute))
-		case RDFBNoder(rel, constrainMe) => RDFBNoder(rel, RelAliasAttribute(unionAlias, constrainMe.attribute))
+		case RDFNoder(rel, constrainMe)  => RDFNoder(rel, unionAttr)
+		case StringMapper(constrainMe)   => StringMapper(unionAttr)
+		case IntMapper(constrainMe)      => IntMapper(unionAttr)
+		case RDFBNoder(rel, constrainMe) => RDFBNoder(rel, unionAttr)
 	      }
 	      R2RState(myState.joins, myState.varmap + (v -> mapper), myState.exprs)
 	    }