Skip to content
Snippets Groups Projects
Commit e8c4ab0a authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

copy diagrams

parent 86258aa6
No related branches found
No related tags found
No related merge requests found
...@@ -85,8 +85,8 @@ public class GeneratePortal extends JobRunner { ...@@ -85,8 +85,8 @@ public class GeneratePortal extends JobRunner {
for (ResIterator it = config.listResourcesWithProperty(RDF.type, EX.OntologyVersion); it.hasNext();) { for (ResIterator it = config.listResourcesWithProperty(RDF.type, EX.OntologyVersion); it.hasNext();) {
Resource resource = it.next();// https://saref.etsi.org/core/master/ Resource resource = it.next();// https://saref.etsi.org/core/master/
String uri = resource.getURI(); String uri = resource.getURI();
String ontoDirPath = uri.substring(Constants.BASE.length(), uri.length() - 1); // core/master
try { try {
String ontoDirPath = uri.substring(Constants.BASE.length(), uri.length() - 1); // core/master
File ontoDir = new File(siteDir, ontoDirPath); File ontoDir = new File(siteDir, ontoDirPath);
FileUtils.forceMkdir(ontoDir); FileUtils.forceMkdir(ontoDir);
String repoName = resource.getRequiredProperty(EX.repositoryName).getString(); // saref-core String repoName = resource.getRequiredProperty(EX.repositoryName).getString(); // saref-core
...@@ -108,6 +108,12 @@ public class GeneratePortal extends JobRunner { ...@@ -108,6 +108,12 @@ public class GeneratePortal extends JobRunner {
} catch (Exception ex) { } catch (Exception ex) {
logger.error(String.format("Unexpected exception while writing static files for %s", resource), 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) { if(!ignoreTerms) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment