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

soon over ? getting tired

parent 95b2eae4
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -86,8 +86,11 @@ public class CLIExecution implements SAREFCredentialsProvider {
			case "develop":
				mode = Mode.DEVELOP;
				break;
			case "portal":
				mode = Mode.PORTAL;
			case "prerelease-portal":
				mode = Mode.PRERELEASE_PORTAL;
				break;
			case "release-portal":
				mode = Mode.RELEASE_PORTAL;
				break;
			case "release":
				mode = Mode.RELEASE;
@@ -99,7 +102,7 @@ public class CLIExecution implements SAREFCredentialsProvider {
				displayHelp(0);
				throw new RuntimeException();
			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);
				throw new RuntimeException();
			}
+3 −0
Original line number Diff line number Diff line
@@ -67,6 +67,9 @@ public class SAREF {
	public static final String LOGGER_BASE = "SAREF Pipeline: ";
	
	public static final String NAME_SITE = "site";
	public static final String NAME_SOURCES = "sources";
	public static final String NAME_SOURCES_PORTAL = "portal";

	
	// project acronym
	public static final String REGEX_ACRONYM_VAR = "acronym";
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public class SAREFPipeline {
	private static final String NAME_LOG_FILE = "output.log";

	public static enum Mode {
		DEVELOP, RELEASE, PORTAL, CLEAN
		DEVELOP, RELEASE, PRERELEASE_PORTAL, RELEASE_PORTAL, CLEAN
	}

	private final TestSuites testSuites = new TestSuites("SAREF pipeline");
@@ -131,7 +131,7 @@ public class SAREFPipeline {
			sourcesManager.checkTerms();
			sourcesManager.generateSite();
			sourcesManager.resetCheckout();
			if(mode == Mode.PORTAL) {
			if(mode == Mode.PRERELEASE_PORTAL || mode == Mode.RELEASE_PORTAL) {
				datasetManager = new DatasetManager(this, logger);
				datasetManager.createDataset();
			}
+6 −2
Original line number Diff line number Diff line
@@ -118,10 +118,14 @@ public class Clause_9_4_5_Checker extends AbstractClauseChecker {
				}
			});
		}
		try {
			checkOops();
		} catch (Exception ex) {
			logWarning(getMessage(MESSAGE.oopsError), ex);			
		}
	}

	public void checkOops() throws SAREFPipelineException {
	public void checkOops() throws Exception {

		ByteArrayOutputStream out = new ByteArrayOutputStream();
		String onto = "";
+13 −3
Original line number Diff line number Diff line
@@ -25,7 +25,11 @@
 */
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.file.FileSystems;
import java.nio.file.PathMatcher;
@@ -97,8 +101,14 @@ public class Clause_9_5_Checker extends AbstractClauseChecker {
				return;
			}
			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 
				testsRDFaGenerator(); // this generates the html file with  rdfa embedded.
			} catch (Exception ex) {
				logWarning(getMessage(MESSAGE.themis), ex);			
			}
			
		} catch (IOException ex) {
			logError(getMessage(MESSAGE.ioexception));
		}
Loading