Loading src/main/java/fr/emse/gitlab/saref/CLIExecution.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -86,8 +86,11 @@ public class CLIExecution implements SAREFCredentialsProvider { case "develop": case "develop": mode = Mode.DEVELOP; mode = Mode.DEVELOP; break; break; case "portal": case "prerelease-portal": mode = Mode.PORTAL; mode = Mode.PRERELEASE_PORTAL; break; case "release-portal": mode = Mode.RELEASE_PORTAL; break; break; case "release": case "release": mode = Mode.RELEASE; mode = Mode.RELEASE; Loading @@ -99,7 +102,7 @@ public class CLIExecution implements SAREFCredentialsProvider { displayHelp(0); displayHelp(0); throw new RuntimeException(); throw new RuntimeException(); default: default: LOG.error(String.format("<mode> %s is invalid. Valid modes are develop, portal, release, help.", args[0])); LOG.error(String.format("<mode> %s is invalid. Valid modes are develop, portal, prerelease-portal, release-portal, help.", args[0])); displayHelp(-1); displayHelp(-1); throw new RuntimeException(); throw new RuntimeException(); } } Loading src/main/java/fr/emse/gitlab/saref/SAREF.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -67,6 +67,9 @@ public class SAREF { public static final String LOGGER_BASE = "SAREF Pipeline: "; public static final String LOGGER_BASE = "SAREF Pipeline: "; public static final String NAME_SITE = "site"; public static final String NAME_SITE = "site"; public static final String NAME_SOURCES = "sources"; public static final String NAME_SOURCES_PORTAL = "portal"; // project acronym // project acronym public static final String REGEX_ACRONYM_VAR = "acronym"; public static final String REGEX_ACRONYM_VAR = "acronym"; Loading src/main/java/fr/emse/gitlab/saref/SAREFPipeline.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -56,7 +56,7 @@ public class SAREFPipeline { private static final String NAME_LOG_FILE = "output.log"; private static final String NAME_LOG_FILE = "output.log"; public static enum Mode { public static enum Mode { DEVELOP, RELEASE, PORTAL, CLEAN DEVELOP, RELEASE, PRERELEASE_PORTAL, RELEASE_PORTAL, CLEAN } } private final TestSuites testSuites = new TestSuites("SAREF pipeline"); private final TestSuites testSuites = new TestSuites("SAREF pipeline"); Loading Loading @@ -131,7 +131,7 @@ public class SAREFPipeline { sourcesManager.checkTerms(); sourcesManager.checkTerms(); sourcesManager.generateSite(); sourcesManager.generateSite(); sourcesManager.resetCheckout(); sourcesManager.resetCheckout(); if(mode == Mode.PORTAL) { if(mode == Mode.PRERELEASE_PORTAL || mode == Mode.RELEASE_PORTAL) { datasetManager = new DatasetManager(this, logger); datasetManager = new DatasetManager(this, logger); datasetManager.createDataset(); datasetManager.createDataset(); } } Loading src/main/java/fr/emse/gitlab/saref/checkers/Clause_9_4_5_Checker.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -118,10 +118,14 @@ public class Clause_9_4_5_Checker extends AbstractClauseChecker { } } }); }); } } try { checkOops(); checkOops(); } catch (Exception ex) { logWarning(getMessage(MESSAGE.oopsError), ex); } } } public void checkOops() throws SAREFPipelineException { public void checkOops() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); String onto = ""; String onto = ""; Loading src/main/java/fr/emse/gitlab/saref/checkers/Clause_9_5_Checker.java +13 −3 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,11 @@ */ */ package fr.emse.gitlab.saref.checkers; package fr.emse.gitlab.saref.checkers; import java.io.*; import java.io.File; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.StringWriter; import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets; import java.nio.file.FileSystems; import java.nio.file.FileSystems; import java.nio.file.PathMatcher; import java.nio.file.PathMatcher; Loading Loading @@ -97,8 +101,14 @@ public class Clause_9_5_Checker extends AbstractClauseChecker { return; return; } } readTests(); // generates the RDF model for the tests readTests(); // generates the RDF model for the tests try { callThemis(); // uses the RDF model for the tests and sends it to ThemisOWL profile, consistency, lack of pitfalls and class satisfiability 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. testsRDFaGenerator(); // this generates the html file with rdfa embedded. } catch (Exception ex) { logWarning(getMessage(MESSAGE.themis), ex); } } catch (IOException ex) { } catch (IOException ex) { logError(getMessage(MESSAGE.ioexception)); logError(getMessage(MESSAGE.ioexception)); } } Loading Loading
src/main/java/fr/emse/gitlab/saref/CLIExecution.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -86,8 +86,11 @@ public class CLIExecution implements SAREFCredentialsProvider { case "develop": case "develop": mode = Mode.DEVELOP; mode = Mode.DEVELOP; break; break; case "portal": case "prerelease-portal": mode = Mode.PORTAL; mode = Mode.PRERELEASE_PORTAL; break; case "release-portal": mode = Mode.RELEASE_PORTAL; break; break; case "release": case "release": mode = Mode.RELEASE; mode = Mode.RELEASE; Loading @@ -99,7 +102,7 @@ public class CLIExecution implements SAREFCredentialsProvider { displayHelp(0); displayHelp(0); throw new RuntimeException(); throw new RuntimeException(); default: default: LOG.error(String.format("<mode> %s is invalid. Valid modes are develop, portal, release, help.", args[0])); LOG.error(String.format("<mode> %s is invalid. Valid modes are develop, portal, prerelease-portal, release-portal, help.", args[0])); displayHelp(-1); displayHelp(-1); throw new RuntimeException(); throw new RuntimeException(); } } Loading
src/main/java/fr/emse/gitlab/saref/SAREF.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -67,6 +67,9 @@ public class SAREF { public static final String LOGGER_BASE = "SAREF Pipeline: "; public static final String LOGGER_BASE = "SAREF Pipeline: "; public static final String NAME_SITE = "site"; public static final String NAME_SITE = "site"; public static final String NAME_SOURCES = "sources"; public static final String NAME_SOURCES_PORTAL = "portal"; // project acronym // project acronym public static final String REGEX_ACRONYM_VAR = "acronym"; public static final String REGEX_ACRONYM_VAR = "acronym"; Loading
src/main/java/fr/emse/gitlab/saref/SAREFPipeline.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -56,7 +56,7 @@ public class SAREFPipeline { private static final String NAME_LOG_FILE = "output.log"; private static final String NAME_LOG_FILE = "output.log"; public static enum Mode { public static enum Mode { DEVELOP, RELEASE, PORTAL, CLEAN DEVELOP, RELEASE, PRERELEASE_PORTAL, RELEASE_PORTAL, CLEAN } } private final TestSuites testSuites = new TestSuites("SAREF pipeline"); private final TestSuites testSuites = new TestSuites("SAREF pipeline"); Loading Loading @@ -131,7 +131,7 @@ public class SAREFPipeline { sourcesManager.checkTerms(); sourcesManager.checkTerms(); sourcesManager.generateSite(); sourcesManager.generateSite(); sourcesManager.resetCheckout(); sourcesManager.resetCheckout(); if(mode == Mode.PORTAL) { if(mode == Mode.PRERELEASE_PORTAL || mode == Mode.RELEASE_PORTAL) { datasetManager = new DatasetManager(this, logger); datasetManager = new DatasetManager(this, logger); datasetManager.createDataset(); datasetManager.createDataset(); } } Loading
src/main/java/fr/emse/gitlab/saref/checkers/Clause_9_4_5_Checker.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -118,10 +118,14 @@ public class Clause_9_4_5_Checker extends AbstractClauseChecker { } } }); }); } } try { checkOops(); checkOops(); } catch (Exception ex) { logWarning(getMessage(MESSAGE.oopsError), ex); } } } public void checkOops() throws SAREFPipelineException { public void checkOops() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); String onto = ""; String onto = ""; Loading
src/main/java/fr/emse/gitlab/saref/checkers/Clause_9_5_Checker.java +13 −3 Original line number Original line Diff line number Diff line Loading @@ -25,7 +25,11 @@ */ */ package fr.emse.gitlab.saref.checkers; package fr.emse.gitlab.saref.checkers; import java.io.*; import java.io.File; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.StringWriter; import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets; import java.nio.file.FileSystems; import java.nio.file.FileSystems; import java.nio.file.PathMatcher; import java.nio.file.PathMatcher; Loading Loading @@ -97,8 +101,14 @@ public class Clause_9_5_Checker extends AbstractClauseChecker { return; return; } } readTests(); // generates the RDF model for the tests readTests(); // generates the RDF model for the tests try { callThemis(); // uses the RDF model for the tests and sends it to ThemisOWL profile, consistency, lack of pitfalls and class satisfiability 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. testsRDFaGenerator(); // this generates the html file with rdfa embedded. } catch (Exception ex) { logWarning(getMessage(MESSAGE.themis), ex); } } catch (IOException ex) { } catch (IOException ex) { logError(getMessage(MESSAGE.ioexception)); logError(getMessage(MESSAGE.ioexception)); } } Loading