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

copy diagrams

parent 86258aa6
......@@ -85,8 +85,8 @@ public class GeneratePortal extends JobRunner {
for (ResIterator it = config.listResourcesWithProperty(RDF.type, EX.OntologyVersion); it.hasNext();) {
Resource resource = it.next();// https://saref.etsi.org/core/master/
String uri = resource.getURI();
String ontoDirPath = uri.substring(Constants.BASE.length(), uri.length() - 1); // core/master
try {
String ontoDirPath = uri.substring(Constants.BASE.length(), uri.length() - 1); // core/master
File ontoDir = new File(siteDir, ontoDirPath);
FileUtils.forceMkdir(ontoDir);
String repoName = resource.getRequiredProperty(EX.repositoryName).getString(); // saref-core
......@@ -108,6 +108,12 @@ public class GeneratePortal extends JobRunner {
} catch (Exception ex) {
logger.error(String.format("Unexpected exception while writing static files for %s", resource), ex);
}
try {
File diagramDir = new File(siteDir, ontoDirPath + File.separator + "diagrams");
FileUtils.copyDirectory(new File(directory, "diagrams"), diagramDir);
} catch (IOException ex) {
logger.warn("Could not copy diagrams directory", ex);
}
}
if(!ignoreTerms) {
......
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