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

copy diagrams

parent 86258aa6
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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();
			try {
			String ontoDirPath = uri.substring(Constants.BASE.length(), uri.length() - 1); // core/master
			try {
				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) {