--- a/src/net/timbusproject/context/converter/OWLExportCLI.java
+++ b/src/net/timbusproject/context/converter/OWLExportCLI.java
@@ -113,16 +113,19 @@
Option optionInput = new Option("i", "input", true, "The Archi archimate model to convert");
optionInput.setType(new String());
optionInput.setRequired(true);
+ options.addOption(optionInput);
Option optionOutput = new Option("o", "output", true, "The name of the OWL output file");
optionOutput.setType(new String());
optionOutput.setRequired(true);
-
- options.addOption(optionInput);
options.addOption(optionOutput);
options.addOption(new Option("v", "view", true,
- "The layout of the view to be exported. If ommitted, the layered view will be tried."));
+ "The layout of the view to be exported. If ommitted, the layered view will be tried next. "
+ + "If the layered view is not found, and there is only one view, that view will be used."));
+
+ options.addOption(new Option(null, "iri", true,
+ "The IRI of the generated ontology. If not specified, a default IRI will be generated"));
// parse options
CommandLineParser parser = new BasicParser();
@@ -138,6 +141,7 @@
String inputFilename = cmd.getOptionValue("input");
String outputFilename = cmd.getOptionValue("output");
+ String ontologyIRI = cmd.getOptionValue("iri");
// load model
File archiFile = new File(inputFilename);
@@ -146,7 +150,7 @@
// convert model
File outputFile = new File(outputFilename);
- OWLExport.exportToOwl(model, outputFile);
+ OWLExport.exportToOwl(model, outputFile, ontologyIRI);
System.out.println("Wrote converted file to " + outputFile.getAbsolutePath());
// also export the layout