From 03af11f722634e02f8741d14771833fc51de95f9 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Fri, 9 Aug 2019 08:24:17 +0300 Subject: [PATCH] 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 --- bundles/org.simantics.scl.db/scl/Simantics/DB.scl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 -- 2.47.1