Loading src/main/java/fr/emse/gitlab/saref/Main.java +2 −16 Original line number Diff line number Diff line Loading @@ -77,11 +77,6 @@ public class Main { File report = new File(pipeline.targetDir, "report_output.xml"); if (isGitLabCI) { String CI_GROUP = CI_PROJECT_PATH.substring(0, CI_PROJECT_PATH.indexOf("/")); String CI_PATH = CI_PROJECT_PATH.substring(CI_PROJECT_PATH.indexOf("/"), CI_PROJECT_PATH.length()); String link = String.format("http://%s.%s/-%s/-/jobs/%s/artifacts/target/report_output.xml", CI_GROUP, CI_SERVER_HOST, CI_PATH, CI_JOB_ID); System.out.println("\n\n\nSAREF pipeline XML report:\n" + link); } else { System.out.println("\n\n\nSAREF Pipeline XML report:\n" + report.getCanonicalPath()); } Loading @@ -91,11 +86,7 @@ public class Main { if (CAN_BROWSE) Desktop.getDesktop().browse(reportHTML.toURI()); else if (isGitLabCI) { String CI_GROUP = CI_PROJECT_PATH.substring(0, CI_PROJECT_PATH.indexOf("/")); String CI_PATH = CI_PROJECT_PATH.substring(CI_PROJECT_PATH.indexOf("/"), CI_PROJECT_PATH.length()); String link = String.format("http://%s.%s/-%s/-/jobs/%s/artifacts/target/site/report.html", CI_GROUP, CI_SERVER_HOST, CI_PATH, CI_JOB_ID); String link = String.format("%sjobs/%s/report.html", SAREF.BASE, CI_JOB_ID); System.out.println("\n\n\nSAREF pipeline HTML report:\n" + link); } else { System.out.println("\n\n\nSAREF pipeline HTML report:\n" + reportHTML.getCanonicalPath()); Loading @@ -111,12 +102,7 @@ public class Main { if (CAN_BROWSE) { Desktop.getDesktop().browse(documentationHTML.toURI()); } else if (isGitLabCI) { String CI_GROUP = CI_PROJECT_PATH.substring(0, CI_PROJECT_PATH.indexOf("/")); String CI_PATH = CI_PROJECT_PATH.substring(CI_PROJECT_PATH.indexOf("/"), CI_PROJECT_PATH.length()); String link = String.format( "http://%s.%s/-%s/-/jobs/%s/artifacts/target/site/%s/%s/%s.html", CI_GROUP, CI_SERVER_HOST, CI_PATH, CI_JOB_ID, target.getRepository().getProject().getPath(), String link = String.format("%sjobs/%s/%s/%s/%s.html", SAREF.BASE, CI_JOB_ID, target.getRepository().getProject().getPath(), target.getCurrentVersionName(), target.getRepository().getProject().getOntologyFileName()); System.out.println("\n\n\nHTML documentation:\n" + link); Loading src/main/java/fr/emse/gitlab/saref/SAREF.java +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ public class SAREF { private final static ResourceBundle BUNDLE = ResourceBundle.getBundle("messages/SAREF"); public final static String BASE = "https://saref.etsi.org/"; public final static String FORGE = "https://forge.etsi.org/rep/SAREF/"; public final static String FORGE = "https://saref.etsi.org/sources/"; public final static String LICENSE = "https://forge.etsi.org/etsi-software-license"; public final static String PUBLISHER = "https://www.etsi.org/"; Loading src/main/java/fr/emse/gitlab/saref/checkers/Clause_9_5_Checker.java +3 −3 Original line number Diff line number Diff line Loading @@ -100,9 +100,9 @@ public class Clause_9_5_Checker extends AbstractClauseChecker { logError(getMessage(MESSAGE.line)); return; } readTests(); callThemis(); testsRDFaGenerator(); readTests(); // generates the RDF model for the tests callThemis(); // uses the RDF model for the tests and sends it to ThemisOWL profile, consistency, lack of pitfalls and class satisfiability testsRDFaGenerator(); // this generates the html file with rdfa embedded. } catch (IOException ex) { logError(getMessage(MESSAGE.ioexception)); } Loading src/main/java/fr/emse/gitlab/saref/managers/SiteManager.java +5 −4 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ public class SiteManager extends SAREFErrorLogger { File htaccess = new File(siteDir, ".htaccess"); try (FileWriter writer = new FileWriter(htaccess)) { writer.write("RewriteEngine on\nDirectorySlash Off\n\n"); writer.write("nRewriteRule ^sources/(.*)$ https://forge.etsi.org/rep/SAREF/$1 [R=302,NE]\\n"); // redirect the sources writer.write(HTACCESS_HTML); writer.write("\nRewriteRule ^(.*)\\.conneg$ /$1.html\n"); writer.write(HTACCESS_JSONLD); Loading @@ -207,9 +208,9 @@ public class SiteManager extends SAREFErrorLogger { SAREFProject project = repository.getProject(); SAREFVersion lastVersion = repository.getVersions().lastEntry().getValue(); // redirects core to core/v3.1.1 // redirects core/ to core/v3.1.1 writer.write(String.format("RewriteRule ^%s/?$ /%s\n", project.getPath(), lastVersion.getVersionPath())); // redirects core to core/v3.1.1/ // redirects core/ to core/v3.1.1/ writer.write(String.format("RewriteRule ^%s/?$ /%s/ [R=302,NE]\n", project.getPath(), lastVersion.getVersionPath())); // redirects core/Sensor to core/Sensor.conneg String choiceOfTerms = repository.getTerms().values().stream().map(SAREFTerm::getLocalName) Loading @@ -226,7 +227,7 @@ public class SiteManager extends SAREFErrorLogger { version.getVersionPath(), version.getVersionPath(), project.getOntologyFileName())); // redirects core/v1.1.1.ttl to core/v1.1.1/saref.ttl writer.write(String.format("RewriteRule ^%s\\.([^\\./]+)$ /%s/%s.$1\n", writer.write(String.format("RewriteRule ^%s\\.([^\\./]+)$ /%s/%s.$1 [R=302,NE]\n", version.getVersionPath(), version.getVersionPath(), project.getOntologyFileName())); // redirects core/v1.1.1/saref to core/v1.1.1/saref.conneg Loading src/main/resources/documentation/ontology/main.rqg +2 −2 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ TEMPLATE { "\n<li><a href='#introduction'>{ fun:property(<en.properties>, 'introduction') }</a></li>" IF( st:call-template(<ontology/examples.rqg> ) != "" , "<li><a href='#examples'>{ fun:property(<en.properties>, 'examples') }</a></li>" , "" ) "\n<li><a href='#namespacedeclarations'>{ fun:property(<en.properties>, 'namespaces') }</a></li>" TEMPLATE { Loading Loading @@ -158,8 +160,6 @@ TEMPLATE { } } LIMIT 1 . IF( st:call-template(<ontology/examples.rqg> ) != "" , "<li><a href='#examples'>{ fun:property(<en.properties>, 'examples') }</a></li>" , "" ) IF( st:call-template(<ontology/references.rqg> ) != "" , "<li><a href='#references'>{ fun:property(<en.properties>, 'references') }</a></li>" , "" ) IF( st:call-template(<ontology/acknowledgements.rqg> ) != "" , "<li><a href='#acknowledgements'>{ fun:property(<en.properties>, 'acknowledgements') }</a></li>" , "" ) Loading Loading
src/main/java/fr/emse/gitlab/saref/Main.java +2 −16 Original line number Diff line number Diff line Loading @@ -77,11 +77,6 @@ public class Main { File report = new File(pipeline.targetDir, "report_output.xml"); if (isGitLabCI) { String CI_GROUP = CI_PROJECT_PATH.substring(0, CI_PROJECT_PATH.indexOf("/")); String CI_PATH = CI_PROJECT_PATH.substring(CI_PROJECT_PATH.indexOf("/"), CI_PROJECT_PATH.length()); String link = String.format("http://%s.%s/-%s/-/jobs/%s/artifacts/target/report_output.xml", CI_GROUP, CI_SERVER_HOST, CI_PATH, CI_JOB_ID); System.out.println("\n\n\nSAREF pipeline XML report:\n" + link); } else { System.out.println("\n\n\nSAREF Pipeline XML report:\n" + report.getCanonicalPath()); } Loading @@ -91,11 +86,7 @@ public class Main { if (CAN_BROWSE) Desktop.getDesktop().browse(reportHTML.toURI()); else if (isGitLabCI) { String CI_GROUP = CI_PROJECT_PATH.substring(0, CI_PROJECT_PATH.indexOf("/")); String CI_PATH = CI_PROJECT_PATH.substring(CI_PROJECT_PATH.indexOf("/"), CI_PROJECT_PATH.length()); String link = String.format("http://%s.%s/-%s/-/jobs/%s/artifacts/target/site/report.html", CI_GROUP, CI_SERVER_HOST, CI_PATH, CI_JOB_ID); String link = String.format("%sjobs/%s/report.html", SAREF.BASE, CI_JOB_ID); System.out.println("\n\n\nSAREF pipeline HTML report:\n" + link); } else { System.out.println("\n\n\nSAREF pipeline HTML report:\n" + reportHTML.getCanonicalPath()); Loading @@ -111,12 +102,7 @@ public class Main { if (CAN_BROWSE) { Desktop.getDesktop().browse(documentationHTML.toURI()); } else if (isGitLabCI) { String CI_GROUP = CI_PROJECT_PATH.substring(0, CI_PROJECT_PATH.indexOf("/")); String CI_PATH = CI_PROJECT_PATH.substring(CI_PROJECT_PATH.indexOf("/"), CI_PROJECT_PATH.length()); String link = String.format( "http://%s.%s/-%s/-/jobs/%s/artifacts/target/site/%s/%s/%s.html", CI_GROUP, CI_SERVER_HOST, CI_PATH, CI_JOB_ID, target.getRepository().getProject().getPath(), String link = String.format("%sjobs/%s/%s/%s/%s.html", SAREF.BASE, CI_JOB_ID, target.getRepository().getProject().getPath(), target.getCurrentVersionName(), target.getRepository().getProject().getOntologyFileName()); System.out.println("\n\n\nHTML documentation:\n" + link); Loading
src/main/java/fr/emse/gitlab/saref/SAREF.java +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ public class SAREF { private final static ResourceBundle BUNDLE = ResourceBundle.getBundle("messages/SAREF"); public final static String BASE = "https://saref.etsi.org/"; public final static String FORGE = "https://forge.etsi.org/rep/SAREF/"; public final static String FORGE = "https://saref.etsi.org/sources/"; public final static String LICENSE = "https://forge.etsi.org/etsi-software-license"; public final static String PUBLISHER = "https://www.etsi.org/"; Loading
src/main/java/fr/emse/gitlab/saref/checkers/Clause_9_5_Checker.java +3 −3 Original line number Diff line number Diff line Loading @@ -100,9 +100,9 @@ public class Clause_9_5_Checker extends AbstractClauseChecker { logError(getMessage(MESSAGE.line)); return; } readTests(); callThemis(); testsRDFaGenerator(); readTests(); // generates the RDF model for the tests callThemis(); // uses the RDF model for the tests and sends it to ThemisOWL profile, consistency, lack of pitfalls and class satisfiability testsRDFaGenerator(); // this generates the html file with rdfa embedded. } catch (IOException ex) { logError(getMessage(MESSAGE.ioexception)); } Loading
src/main/java/fr/emse/gitlab/saref/managers/SiteManager.java +5 −4 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ public class SiteManager extends SAREFErrorLogger { File htaccess = new File(siteDir, ".htaccess"); try (FileWriter writer = new FileWriter(htaccess)) { writer.write("RewriteEngine on\nDirectorySlash Off\n\n"); writer.write("nRewriteRule ^sources/(.*)$ https://forge.etsi.org/rep/SAREF/$1 [R=302,NE]\\n"); // redirect the sources writer.write(HTACCESS_HTML); writer.write("\nRewriteRule ^(.*)\\.conneg$ /$1.html\n"); writer.write(HTACCESS_JSONLD); Loading @@ -207,9 +208,9 @@ public class SiteManager extends SAREFErrorLogger { SAREFProject project = repository.getProject(); SAREFVersion lastVersion = repository.getVersions().lastEntry().getValue(); // redirects core to core/v3.1.1 // redirects core/ to core/v3.1.1 writer.write(String.format("RewriteRule ^%s/?$ /%s\n", project.getPath(), lastVersion.getVersionPath())); // redirects core to core/v3.1.1/ // redirects core/ to core/v3.1.1/ writer.write(String.format("RewriteRule ^%s/?$ /%s/ [R=302,NE]\n", project.getPath(), lastVersion.getVersionPath())); // redirects core/Sensor to core/Sensor.conneg String choiceOfTerms = repository.getTerms().values().stream().map(SAREFTerm::getLocalName) Loading @@ -226,7 +227,7 @@ public class SiteManager extends SAREFErrorLogger { version.getVersionPath(), version.getVersionPath(), project.getOntologyFileName())); // redirects core/v1.1.1.ttl to core/v1.1.1/saref.ttl writer.write(String.format("RewriteRule ^%s\\.([^\\./]+)$ /%s/%s.$1\n", writer.write(String.format("RewriteRule ^%s\\.([^\\./]+)$ /%s/%s.$1 [R=302,NE]\n", version.getVersionPath(), version.getVersionPath(), project.getOntologyFileName())); // redirects core/v1.1.1/saref to core/v1.1.1/saref.conneg Loading
src/main/resources/documentation/ontology/main.rqg +2 −2 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ TEMPLATE { "\n<li><a href='#introduction'>{ fun:property(<en.properties>, 'introduction') }</a></li>" IF( st:call-template(<ontology/examples.rqg> ) != "" , "<li><a href='#examples'>{ fun:property(<en.properties>, 'examples') }</a></li>" , "" ) "\n<li><a href='#namespacedeclarations'>{ fun:property(<en.properties>, 'namespaces') }</a></li>" TEMPLATE { Loading Loading @@ -158,8 +160,6 @@ TEMPLATE { } } LIMIT 1 . IF( st:call-template(<ontology/examples.rqg> ) != "" , "<li><a href='#examples'>{ fun:property(<en.properties>, 'examples') }</a></li>" , "" ) IF( st:call-template(<ontology/references.rqg> ) != "" , "<li><a href='#references'>{ fun:property(<en.properties>, 'references') }</a></li>" , "" ) IF( st:call-template(<ontology/acknowledgements.rqg> ) != "" , "<li><a href='#acknowledgements'>{ fun:property(<en.properties>, 'acknowledgements') }</a></li>" , "" ) Loading