+ public static String prettyPrintResource(ReadGraph graph, Resource resource, boolean ignoreIdentifiers) throws Exception {
+ TransferableGraphSource source = makeTGSource(graph, resource);
+ TransferableGraph1 tg = TransferableGraphs.create(graph, source);
+ GraphRefactoringUtils.fixOntologyExport(tg);
+ System.out.println("Printing resoure " + graph.getURI(resource));
+ return PrettyPrintTG.print(tg, ignoreIdentifiers);
+ }
+
+ /**
+ * Adds a random {@link GUID} as a value for <code>L0.identifier</code>
+ *
+ * @param graph
+ * @param component
+ * for which the identifier is added
+ * @throws DatabaseException
+ */
+ public static void addL0Identifier(WriteGraph graph, Resource component) throws DatabaseException {
+ Layer0 L0 = Layer0.getInstance(graph);
+ graph.addLiteral(component, L0.identifier, L0.identifier_Inverse, L0.GUID, GUID.random(), GUID.BINDING);
+ }