--- a/src/main/java/net/timbusproject/extractors/modules/tavernaextractor/Main.java
+++ b/src/main/java/net/timbusproject/extractors/modules/tavernaextractor/Main.java
@@ -2,7 +2,6 @@
import java.io.BufferedReader;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -59,17 +58,15 @@
String archimateOutputPath = parse.getOptionValue("o");
String inputFileName = parse.getOptionValue("i");
- // setup the extractor
- TavernaExtractor extractor = null;
-
if (parse.hasOption("v"))
verbose = true;
- extractor = new TavernaExtractor(verbose);
- TavernaExtractor.setTavernaHome(Main.getTavernaHome(tavernaHome));
- TavernaExtractor.setArchimateOutputPath(Paths.get(archimateOutputPath));
- TavernaExtractor.setInputFileName(Paths.get(inputFileName));
- TavernaExtractor.setDotLocation(Paths.get(dotExeLocation));
+ // setup the extractor
+ TavernaExtractor extractor = new TavernaExtractor(verbose);
+ extractor.setTavernaHome(Main.getTavernaHome(tavernaHome));
+ extractor.setArchimateOutputPath(Paths.get(archimateOutputPath));
+ extractor.setInputFileName(Paths.get(inputFileName));
+ extractor.setDotLocation(Paths.get(dotExeLocation));
extractor.process(false); //false = local execution
}
@@ -101,23 +98,6 @@
}
}
- // Generate report out of DROID profile file
-// if (parse.hasOption("cr")) {
-//
-// String droidProfileFile = parse.getOptionValue("cr");
-//
-// if (droidProfileFile != null) {
-//
-// ProvenanceAccessClient pac;
-// if (tavernaT2DatabasePath != null && !tavernaT2DatabasePath.isEmpty()) {
-// pac = new ProvenanceAccessClient(tavernaT2DatabasePath);
-// } else {
-// pac = new ProvenanceAccessClient();
-// }
-// pac.generateReport(new File(droidProfileFile));
-// }
-// }
-
// Extend DSO with PRONOM information
if (parse.hasOption("ont") && parse.hasOption("r")) {
@@ -157,7 +137,6 @@
helpFormater.printHelp("TavernaExtractor", createOptions());
LOGGER.error("ERROR: Wrong usage:" + exp.getMessage());
exp.printStackTrace();
- return;
}
} catch (Exception e) {
LOGGER.error(e.getMessage());
@@ -181,24 +160,19 @@
OptionBuilder.withLongOpt("input-file");
options.addOption(OptionBuilder.create("i"));
- //TODO : rename
- OptionBuilder.withDescription("Fetching processed files from workflow");
+ OptionBuilder.withDescription("Fetching provenance information from a workflow execution");
+ OptionBuilder.withArgName("\\path\\to\\copy\\provenance-trace");
OptionBuilder.hasArg();
OptionBuilder.withLongOpt("provenance");
options.addOption(OptionBuilder.create("p"));
-// OptionBuilder.withDescription("Generate CSV Report out of DROID profile.");
-// OptionBuilder.hasArg();
-// OptionBuilder.withLongOpt("create-report");
-// options.addOption(OptionBuilder.create("cr"));
-
- OptionBuilder.withDescription("The ontology file");
+ OptionBuilder.withDescription("Ontology file");
OptionBuilder.withArgName("\\path\\to\\myOntology.owl");
OptionBuilder.hasArg();
OptionBuilder.withLongOpt("ontology-file");
options.addOption(OptionBuilder.create("ont"));
- OptionBuilder.withDescription("output file");
+ OptionBuilder.withDescription("DROID report file");
OptionBuilder.withArgName("\\path\\to\\myDroidCSVreportFile.droid.csv");
OptionBuilder.hasArg();
OptionBuilder.withLongOpt("reportFile");
@@ -234,12 +208,9 @@
private static Properties loadProperties() {
Properties prop = new Properties();
- InputStream input = null;
try {
-
- input = Main.class.getClassLoader().getResourceAsStream("TavernaExtractor.properties");
+ InputStream input = Main.class.getClassLoader().getResourceAsStream("TavernaExtractor.properties");
prop.load(input);
-
LOGGER.debug("Load properties successfully.");
} catch (IOException io) {