Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
///**
// *
// */
//package fr.emse.gitlab.saref.tests;
//
//import static fr.emse.gitlab.saref.tests.CMDConfigurations.*;
//
//import java.io.File;
//import java.io.FileWriter;
//import java.io.IOException;
//import java.util.Arrays;
//import java.util.concurrent.TimeUnit;
//
//import org.apache.commons.cli.CommandLine;
//import org.apache.commons.cli.ParseException;
//import org.apache.log4j.Level;
//import org.apache.log4j.Logger;
//
//import fr.emse.gitlab.saref.testsuites.TestCase;
//import fr.emse.gitlab.saref.testsuites.TestSuite;
//
///**
// * @author Omar Qawasmeh
// *
// *
// */
//public class Main {
//
// private static TestCase c1 = new TestCase(); // check Ttl
// private static TestCase c2 = new TestCase(); // check prefix
// private static TestCase c3 = new TestCase(); // check shacl
//
// @SuppressWarnings("static-access")
// public static void main(String[] args) throws ParseException, IOException {
//
// Logger.getRootLogger().setLevel(Level.OFF);
//
// CommandLine cl = CMDConfigurations.parseArguments(args);
//
// // if (cl.getOptions().length == 0 || cl.hasOption(ARG_HELP)) {
// // CMDConfigurations.displayHelp();
// // return;
// // }
//
// // String[] fileNames = cl.getOptionValues(ARG_FILE);
// // if (fileNames != null) {
// // for (String fileName : fileNames) {
// // File file = new File(fileName);
// //
// // System.out.println(file+"omar");
// // }
// // }
//
// // String[] dataTtls = cl.getOptionValues(ARG_FILE);
// // File dataTtl = new File(dataTtls[0]);
//
// String dataTtlArgs = args[0];
// String CI_JOB_ID = args[1];
// String CI_PROJECT_NAME = args[2];
// String CI_COMMIT = args[3];
//
// // System.out.println(dataTtlArgs);
// File dataTtl = new File(dataTtlArgs);
// System.out.println("******************************************************************************");
// System.out.println("To view your report file please visit:\n\n"
// + "http://localhost:8080/report.html?q=http://saref.gitlab.emse.fr/-/" + args[2] + "/-/jobs/" + args[1]
// + "/artifacts/report_output.xml");
// System.out.println("******************************************************************************");
// // String dataTtl ="src/main/resources/saref.ttl";
//
// TestSuite ts = new TestSuite();
//
//// ts.setName("Report for commit number \"" + CI_COMMIT + "\" of project " + CI_PROJECT_NAME);
//
// PrefixesTest prefixTst = new PrefixesTest();
// boolean c2_Status = prefixTst.comparePrefixMap(dataTtl, c2, ts);
//
// CheckTurtleFormat checkTtl = new CheckTurtleFormat();
// boolean c1_Status = checkTtl.checkTtlFormat(dataTtl, c1, ts);
//
// ShaclTests shaclTst = new ShaclTests();
// boolean c3_Status = shaclTst.checkShaclShape(dataTtl, c3, ts, CI_JOB_ID, CI_PROJECT_NAME);
//
//// ts.setTestcase(Arrays.asList( c1, c2, c3 ));
//
//// if (c1_Status && c2_Status && c3_Status) {
//// ts.jaxbObjectToXML(ts);
//// } else {
//// ts.jaxbObjectToXML(ts);
//// System.exit(42);
////
//// }
//
// }
//
//}