From: Tuukka Lehtonen Date: Fri, 16 Jun 2017 07:43:04 +0000 (+0300) Subject: Merge "Revert "Default property editing restores assertions"" X-Git-Tag: v1.31.0~310 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=6573b29e111ea03c3fa88bf1565d47d0fc4faabd;p=simantics%2Fplatform.git Merge "Revert "Default property editing restores assertions"" --- 6573b29e111ea03c3fa88bf1565d47d0fc4faabd diff --cc bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/Layer0Utils.java index 5ccfcf325,08dd63ce0..198ee41b7 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/Layer0Utils.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/Layer0Utils.java @@@ -1383,22 -1383,7 +1383,8 @@@ public class Layer0Utils TransferableGraphSource source = makeTGSource(graph, resource); TransferableGraph1 tg = TransferableGraphs.create(graph, source); GraphRefactoringUtils.fixOntologyExport(tg); - return PrettyPrintTG.print(tg); + System.out.println("Printing resoure " + graph.getURI(resource)); + return PrettyPrintTG.print(tg, ignoreIdentifiers); } - public static Resource getPossibleAssertedObject(ReadGraph graph, Resource resource, Resource predicate) throws DatabaseException { - Resource result = null; - for(Resource type : graph.getPrincipalTypes(resource)) { - Collection rs = graph.getAssertedObjects(type, predicate); - if(rs.size() > 1) return null; - if(rs.size() == 1) { - Resource ass = rs.iterator().next(); - if (result != null && !result.equals(ass)) return null; - result = ass; - } - } - return result; - } - }