}
protected static void saveRDF(List<Statement> stmts, String filename) {
try {
File file = new File(filename);
RDFWriter writer = Rio.createWriter(RDFFormat.TURTLE, new FileWriter(file));
writer.startRDF();
for (Statement stmt : stmts) {
writer.handleStatement(stmt);
}
writer.endRDF();
} catch (Exception e) {
throw new RuntimeException(e);
}
}