Skip to content

Instantly share code, notes, and snippets.

@ahoy-jon
Created June 27, 2012 13:06
Show Gist options
  • Save ahoy-jon/3003962 to your computer and use it in GitHub Desktop.
Save ahoy-jon/3003962 to your computer and use it in GitHub Desktop.
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)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment