}
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("."))
newName = newName.split("\\.")[0];
- Path output2 = input.getParent().resolve(newName + ".pgraph");
+ Path parent = input.getParent();
+ Path output1 = parent.resolve(newName + ".tg");
+ TransferableGraph1 tg = convertExportedSharedOntologyIntoBundleOntology(input, output1);
+ String listing = PrettyPrintTG.print(tg, false);
+ Path output2 = parent.resolve(newName + ".pgraph");
Files.write(output2, listing.getBytes(),StandardOpenOption.CREATE);
}