Skip to content

Dump repository to a ttl file #4000

Answered by naturzukunft
naturzukunft asked this question in Q&A
Discussion options

You must be logged in to vote

Found that:

public File dumpRepository(File file) {
        try (RepositoryConnection conn = getSparqlReadRepository().getConnection()) {
	TurtleWriter tw = new TurtleWriter(new FileWriter(file));
	conn.export(tw);
	return file;
  } catch (IOException e) {
       throw new RuntimeException("error creating repository dump.", e);
  }
}

i'l try it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by naturzukunft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant