return new Document(currentText != null ? currentText : "");
} else {
Resource indexRoot = graph.syncRequest(new PossibleIndexRoot(resource));
- if(indexRoot != null && graph.isInstanceOf(indexRoot, L0.Ontology)) {
- TransferableGraph1 tg = ModelingUtils.exportSharedOntology(graph, indexRoot, null, Constants.SHARED_LIBRARY_FORMAT, Constants.SHARED_LIBRARY_CURRENT_VERSION);
- GraphRefactoringUtils.fixOntologyExport(tg);
- currentText = PrettyPrintTG.print(tg);
- errorHappened = false;
+ try {
+ if(indexRoot != null && graph.isInstanceOf(indexRoot, L0.Ontology)) {
+ TransferableGraph1 tg = ModelingUtils.exportSharedOntology(graph, indexRoot, null, Constants.SHARED_LIBRARY_FORMAT, Constants.SHARED_LIBRARY_CURRENT_VERSION);
+ GraphRefactoringUtils.fixOntologyExport(tg);
+ currentText = PrettyPrintTG.print(tg, false);
+ errorHappened = false;
+ }
return new Document(currentText != null ? currentText : "");
+ } catch (Exception e) {
+ throw new DatabaseException("Could not get PGraph from " + resource);
}
- throw new DatabaseException("Could not get PGraph from " + resource);
}
}
});