--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/algebraicpattern/src/main/scala/AlgebraicPattern.scala Wed Dec 29 11:31:25 2010 -0500
@@ -0,0 +1,26 @@
+package org.w3.algebraic
+
+trait PatternMatching1[T,R] {
+ def unapply(r:R):Option[T]
+}
+
+trait Algebraic1[T,R] extends Function1[T,R] with PatternMatching1[T,R]
+
+trait PatternMatching2[T1,T2,R] {
+ def unapply(r:R):Option[(T1, T2)]
+}
+
+/**
+ * basically, you have to implement both following functions
+ * def apply(t1:T1, t2:T2):R
+ * def unapply(r:R):Option[(T1, T2)]
+ */
+trait Algebraic2[T1,T2,R] extends Function2[T1, T2, R] with PatternMatching2[T1,T2,R]
+
+trait PatternMatching3[T1,T2,T3,R] {
+ def unapply(r:R):Option[(T1, T2, T3)]
+}
+
+trait Algebraic3[T1,T2,T3,R] extends Function3[T1, T2, T3, R] with PatternMatching3[T1,T2,T3,R]
+
+
--- a/project/build/RDB2RDF.scala Tue Dec 28 10:56:35 2010 -0500
+++ b/project/build/RDB2RDF.scala Wed Dec 29 11:31:25 2010 -0500
@@ -12,9 +12,11 @@
val feDeRatePath = Path.fromFile(".")
+ lazy val algebraicpattern = project("algebraicpattern", "algebraicpattern", new AlgebraicPattern(_))
lazy val rdb = project("rdb", "rdb", new RDB(_))
lazy val sql = project("sql", "sql", new SQL(_), rdb)
lazy val rdf = project("rdf", "rdf", new RDF(_))
+ lazy val rdfdsl = project("rdfdsl", "rdfdsl", new RDFDSL(_), rdf)
lazy val turtle = project("turtle", "turtle", new Turtle(_), rdf)
lazy val rdfxml = project("rdfxml", "rdfxml", new RDFXML(_), rdf)
lazy val sharedtestdata = project("sharedtestdata", "sharedtestdata", new SharedTestData(_), rdb, rdf, sql, turtle)
@@ -26,12 +28,16 @@
lazy val sparql2sqlendpoint = project("sparql2sqlendpoint", "sparql2sqlendpoint", new SPARQL2SQLEndPoint(_), sparql2sql)
lazy val sparql2sqlendpointJar = project("sparql2sqlendpointjar", "sparql2sqlendpointjar", new SPARQL2SQLEndPointJar(_), sparql2sqlendpoint)
+ class AlgebraicPattern(info: ProjectInfo) extends DefaultProject(info) with Common
+
class RDB(info: ProjectInfo) extends DefaultProject(info) with Common
class SQL(info: ProjectInfo) extends DefaultProject(info) with Common
class RDF(info: ProjectInfo) extends DefaultProject(info) with Common
+ class RDFDSL(info: ProjectInfo) extends DefaultProject(info) with Common
+
class Turtle(info: ProjectInfo) extends DefaultProject(info) with Common
class RDFXML(info: ProjectInfo) extends DefaultProject(info) with Common {