Commit 71cb160d authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

create tdb in the right folder

parent b3a6569b
......@@ -172,8 +172,9 @@ public class Main {
private static Dataset createFreshDataset() throws IOException {
FileUtils.forceMkdir(new File(directory, Constants.DATASET_DIR));
dataset = TDBFactory.createDataset(Constants.DATASET_DIR);
File datasetDir = new File(directory, Constants.DATASET_DIR);
FileUtils.forceMkdir(datasetDir);
dataset = TDBFactory.createDataset(datasetDir.getAbsolutePath());
dataset.begin(ReadWrite.WRITE);
dataset.getDefaultModel().removeAll();
List<String> toRemove = new ArrayList<>();
......@@ -293,13 +294,11 @@ public class Main {
Files.walk(dirPath).forEach((p) -> {
String relativePath = dirPath.relativize(p).toString().replace("\\", "/");
String fileurl = Constants.BASE_DOC + relativePath;
System.out.println("add alt entry " + fileurl + " -> " + p.toString());
if(uri.getScheme().equals("jar")) {
mapper.addAltEntry(fileurl, p.toString().substring(1));
} else {
mapper.addAltEntry(fileurl, p.toString());
}
// mapper.addAltEntry(fileurl, relativePath);
});
return sm;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment