]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.db/scl/Simantics/DB.scl
Use the same implementation to claim assertions in SCL and in Java
[simantics/platform.git] / bundles / org.simantics.scl.db / scl / Simantics / DB.scl
index af8c194762c50810150f49f7cc9dd4b029a54c38..b69119eae0e345b65f153961cb289f85c752d63a 100644 (file)
@@ -250,13 +250,6 @@ importJava "org.simantics.db.WriteGraph" where
     @JavaName denyValue
     denyValue :: Resource -> <WriteGraph> ()
 
-claimAssertion :: Resource -> Resource -> Resource -> <WriteGraph> ()
-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 -> <WriteGraph> ()
@@ -415,6 +408,9 @@ importJava "org.simantics.db.layer0.util.Layer0Utils" where
     addMetadataListener :: ChangeListener -> <Proc> ()
     removeMetadataListener :: ChangeListener -> <Proc> ()
 
+    @JavaName assert_
+    claimAssertion :: Resource -> Resource -> Resource -> <WriteGraph> ()
+
 copyTo :: Resource -> Resource -> <WriteGraph> Resource
 copyTo targetContainer source = do
     (collectionToList $ copyTo_ targetContainer source)!0