I have created a blazegraph RDF4J repository and connection in Scala:
val props = new Properties()
props.put(Options.BUFFER_MODE, BufferMode.DiskRW)
props.put(Options.FILE, "embedded.jnl")
var sail = new BigdataSail(props)
var repo = new BigdataSailRepository(sail)
repo.initialize()
var cxn = repo.getConnection()
I can add statements, retrieve SPARQL results, etc.
Now I'd like to dump the contents of the repository to an RDF file, like this:
Rio.write(model, System.out, RDFFormat.RDFXML);
But if I try to substitute my cxn
or repo
for the expected model argument, Eclipse complains:
overloaded method value write with alternatives: (x$1: Iterable[org.openrdf.model.Statement],x$2: java.io.Writer,x$3: org.openrdf.rio.RDFFormat)Unit (x$1: Iterable[org.openrdf.model.Statement],x$2: java.io.OutputStream,x$3: org.openrdf.rio.RDFFormat)Unit cannot be applied to (com.bigdata.rdf.sail.BigdataSailRepository, java.io.FileOutputStream, org.openrdf.rio.RDFFormat).
How do I get from the repo and connection that I have to a model expected by Rio.write()
? Or can I dump the triples in some other way?