convertExportedSharedOntologyIntoBundleOntology(input, output);
}
- public static void createPGraph(Path input) throws Exception {
+ public static void createTGAndPGraph(Path input) throws Exception {
Path output1 = input.getParent().resolve("graph.tg");
TransferableGraph1 tg = convertExportedSharedOntologyIntoBundleOntology(input, output1);
String listing = PrettyPrintTG.print(tg, false);
String newName = input.getFileName().toString();
- if (newName.contains("\\."))
+ if (newName.contains("."))
newName = newName.split("\\.")[0];
Path output2 = input.getParent().resolve(newName + ".pgraph");
Files.write(output2, listing.getBytes(),StandardOpenOption.CREATE);
System.out.println("Required arguments: <input .sharedLibrary file> [<output .tg file>]");
} else if (args.length == 1) {
Path input = Paths.get(args[0]);
- createPGraph(input);
+ createTGAndPGraph(input);
} else {
convertExportedSharedOntologyIntoBundleOntology(Paths.get(args[0]), Paths.get(args[1]));
}
if (pgraphAndTg) {
try {
Path input = Paths.get(location.toURI());
- FixExportedOntology.createTg(input);
- FixExportedOntology.createPGraph(input);
+ FixExportedOntology.createTGAndPGraph(input);
} catch (Exception e) {
LOGGER.error("Could not generate TG and Pgraph", e);
}