X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.objmap2%2Fsrc%2Forg%2Fsimantics%2Fobjmap%2Fgraph%2Frules%2FValueRule.java;h=cbea3253a9135fd403d81c016eacd2cae8ad2377;hp=9ba9dba11274291b0dadb6664492542bd853951e;hb=d5db319fc2c400a8c76249e1ed7ffd9deb9f7609;hpb=9ad22e13e54566a293067b8708bff387682deb1b diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java index 9ba9dba11..cbea3253a 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java @@ -13,6 +13,9 @@ package org.simantics.objmap.graph.rules; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + +import java.util.Objects; + import org.simantics.db.ReadGraph; import org.simantics.db.WriteGraph; import org.simantics.objmap.backward.IBackwardMapping; @@ -57,7 +60,14 @@ public class ValueRule implements IBidirectionalMappingRule map, Domain domainElement, + Range rangeElement) throws MappingException { + Object value = rangeAccessor.get(rangeElement); + return Objects.equals(value, domainAccessor.get(g, domainElement)); + } public void createDomain(WriteGraph g, IBackwardMapping map, Domain domainElement, Range rangeElement) throws MappingException { updateDomain(g, map, domainElement, rangeElement);