This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2012 Henry Story (bblfish.net) | |
* under the MIT licence defined at | |
* http://www.opensource.org/licenses/mit-license.html | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of | |
* this software and associated documentation files (the "Software"), to deal in the | |
* Software without restriction, including without limitation the rights to use, copy, | |
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | |
* and to permit persons to whom the Software is furnished to do so, subject to the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.dispatch.Future | |
object Contexts { | |
type SingleThreaded[X] = X | |
type Concurrent[X] = Future[X] | |
} | |
trait AsyncGraphStore[Rdf <: RDF] extends GenericGraphStore[Rdf,Contexts.Concurrent] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name:= "Sbt+ScalaTest" | |
libraryDependencies += "org.scalatest" %% "scalatest" % "1.8" % "test" | |
testOptions in Test += Tests.Argument("-l", "com.mycompany.tags.BadTest") | |
scalaSource in Test <<= baseDirectory(_ / "test") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import PlayProject._ | |
object ApplicationBuild extends Build { | |
val appName = "test" | |
val appVersion = "1.0-SNAPSHOT" | |
val appDependencies = Seq( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def addNamedGraph(uri: Jena#URI, graph: Jena#Graph): Unit = writeTransaction { | |
dg.addGraph(uri, graph) | |
} | |
def appendToNamedGraph(uri: Jena#URI, graph: Jena#Graph): Unit = writeTransaction { | |
graph.toIterable foreach { case Triple(s, p, o) => | |
dg.add(uri, s, p, o) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] TDBJenaGraphStore: | |
[info] - getNamedGraph should retrieve the graph added with addNamedGraph | |
[info] - appendToNamedGraph should be equivalent to graph union | |
[info] - addNamedGraph should drop the existing graph *** FAILED *** | |
[info] org.scalatest.TestFailedException was thrown. (GraphStoreTest.scala:65) | |
[info] - adding a named graph should not pollute the default graph *** FAILED *** | |
[info] com.hp.hpl.jena.tdb.TDBException: GraphNamedTDB: Null graph name | |
[info] at com.hp.hpl.jena.tdb.store.GraphNamedTDB.<init>(GraphNamedTDB.java:62) | |
[info] at com.hp.hpl.jena.tdb.store.DatasetGraphTDB._createNamedGraph(DatasetGraphTDB.java:219) | |
[info] at com.hp.hpl.jena.sparql.core.DatasetGraphCaching.getGraph(DatasetGraphCaching.java:99) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] Resolving org.scalaz#scalaz-core_2.10.0-M4;7.0-SNAPSHOT ... | |
[info] Resolving joda-time#joda-time;2.1 ... | |
[info] Resolving org.joda#joda-convert;1.2 ... | |
[info] Resolving com.novocode#junit-interface;0.8 ... | |
[info] Resolving junit#junit;4.8.2 ... | |
[info] Resolving org.scala-tools.testing#test-interface;0.5 ... | |
[info] Resolving org.scalatest#scalatest_2.10.0-M2;1.8-SNAPSHOT ... | |
[info] Done updating. | |
[info] Compiling 58 Scala sources to /Users/jon/Projects/banana-rdf/rdf/target/scala-2.10.0-M4/classes... | |
[error] /Users/jon/Projects/banana-rdf/rdf/src/main/scala/util/package.scala:14: not found: type Id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import scalaz._ | |
import Scalaz._ | |
trait Claim[+S] { | |
protected val statement: S | |
def verify(implicit fn: S=> Boolean ): Option[S] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val log = new {def warn(a:Any) {}} | |
val timeoutWarn = () => log.warn("Actor ask timed-out while calling HttpClient") | |
def handleTimeouts[A](response : Option[(Int, Option[String])], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Page | |
trait PageData | |
trait PageOperation { | |
type P <: Page | |
} | |
trait PageComponent { | |
self: PageOperation => |