Unverified Commit 8d95c6df authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

closes #3

parent 1f5ba1f1
......@@ -46,6 +46,8 @@ import org.semanticweb.owlapi.model.parameters.Imports;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.io.Files;
import fr.mines_stetienne.ci.saref.SAREF;
import fr.mines_stetienne.ci.saref.SAREFPipelineException;
import fr.mines_stetienne.ci.saref.SAREFRepositoryVersionErrorLogger;
......@@ -123,6 +125,9 @@ public class VersionSiteManager extends SAREFRepositoryVersionErrorLogger {
private void generateRDFFiles() throws SAREFPipelineException {
Model model = version.getModel();
for (Languages l : Languages.values()) {
if(l.equals(Languages.TEXT_TURTLE)) {
continue;
}
String ontologyFileName = repository.getOntologyFileName(l);
File file = new File(ontoDir, ontologyFileName);
try (FileOutputStream fos = new FileOutputStream(file)) {
......@@ -131,7 +136,17 @@ public class VersionSiteManager extends SAREFRepositoryVersionErrorLogger {
String msg = getMessage(MESSAGE.ontology_file, version, ontologyFileName);
errorLogger.warn(msg, ex);
}
}
}
String ontologyFileName = repository.getOntologyFileName(Languages.TEXT_TURTLE);
File dir = new File(repository.getDirectory(), "ontology");
File from = new File(dir, ontologyFileName);
File to = new File(ontoDir, ontologyFileName);
try {
Files.copy(from, to);
} catch (IOException ex) {
String msg = getMessage(MESSAGE.ontology_file, version, ontologyFileName);
errorLogger.warn(msg, ex);
}
}
private void generateHTMLFile() throws SAREFPipelineException {
......
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