X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Futil%2FLayer0Utils.java;h=08dd63ce0e25c4bf11084bc8402eb802cd51a49d;hp=103c9bb0129259bd5dd0c2000410a95fc147bc53;hb=1aa531775d5221775a583fb13f35332dfff8aae8;hpb=c4c152bf639475b85efad1e8bd6ea007c08a9e1f diff --git 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 index 103c9bb01..08dd63ce0 100644 --- 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 @@ -1386,18 +1386,4 @@ public class Layer0Utils { return PrettyPrintTG.print(tg); } - 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; - } - }