Skip to content
Adrian Wilke edited this page Jan 23, 2019 · 2 revisions

How to start

Set the environment variables listed in the file application.properties.

CRAWLER_TRIPLESTORE_URL
CRAWLER_TRIPLESTORE_USERNAME
CRAWLER_TRIPLESTORE_PASSWORD

OUTPUT_FOLDER_PATH
LOG_HOME

CIVET_TRIPLESTORE_URL

Execute the main method in de.upb.cs.dice.opal.conversion.ConversionToolApplication

Open the URL http://localhost:8080/convert in your browser.

How to write a model into a file

import org.apache.jena.rdf.model.Model;

[...]

writeToFile(model, new File("/tmp/opal-converter.ttl"));

[...]

private void writeToFile(Model model, File file) {
	try {
		FileOutputStream fileOutputStream = new FileOutputStream(file);
		model.write(fileOutputStream, "TURTLE");
		fileOutputStream.flush();
		fileOutputStream.close();
	} catch (IOException e) {
		logger.error("Error writing file. ", e);
	}
}

Clone this wiki locally