From: Jussi Koskela Date: Fri, 9 Aug 2019 05:24:17 +0000 (+0300) Subject: Use the same implementation to claim assertions in SCL and in Java X-Git-Tag: v1.43.0~136^2~122 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F3079%2F1;p=simantics%2Fplatform.git Use the same implementation to claim assertions in SCL and in Java SCL version of claimAssertion did not claim L0.InstanceOf L0.Assertion. gitlab #332 Change-Id: Ia61ba82435429a190e444d14e57c8e7782d206dc --- diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl index af8c19476..b69119eae 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl @@ -250,13 +250,6 @@ importJava "org.simantics.db.WriteGraph" where @JavaName denyValue denyValue :: Resource -> () -claimAssertion :: Resource -> Resource -> Resource -> () -claimAssertion type_ predicate object = do - ass = newResource () - claim ass L0.HasPredicate predicate - claim ass L0.HasObject object - claim type_ L0.Asserts ass - "Sets the value of the literal that is an object with the given subject and predicate." @inline claimRelatedValue :: Serializable a => Resource -> Resource -> a -> () @@ -415,6 +408,9 @@ importJava "org.simantics.db.layer0.util.Layer0Utils" where addMetadataListener :: ChangeListener -> () removeMetadataListener :: ChangeListener -> () + @JavaName assert_ + claimAssertion :: Resource -> Resource -> Resource -> () + copyTo :: Resource -> Resource -> Resource copyTo targetContainer source = do (collectionToList $ copyTo_ targetContainer source)!0