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

after meeting CTI 11/06/2020

parent 147bc843
Loading
Loading
Loading
Loading
+2 −16
Original line number Diff line number Diff line
@@ -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());
				}
@@ -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());
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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/";

+3 −3
Original line number Diff line number Diff line
@@ -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));
		}
+5 −4
Original line number Diff line number Diff line
@@ -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);
@@ -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)
@@ -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 
+2 −2
Original line number Diff line number Diff line
@@ -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 {
@@ -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>" , "" )