X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.db%2Fscl%2FSimantics%2FDB.scl;h=a400659ee0c940b18b129fadf0f9a572e1ff643d;hb=refs%2Fchanges%2F25%2F1925%2F4;hp=a97d573a3c97950c42578d79bd5813ca3f277ec3;hpb=de6ca001c169e87055e8e66f450baf4f6119110e;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl index a97d573a3..a400659ee 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl @@ -133,6 +133,8 @@ importJava "org.simantics.db.ReadGraph" where @JavaName getInverse inverseOf :: Resource -> Resource + @JavaName getPossibleInverse + possibleInverseOf :: Resource -> Maybe Resource @JavaName getSingleType singleTypeOf :: Resource -> Resource -> Resource @@ -149,6 +151,8 @@ importJava "org.simantics.db.ReadGraph" where @JavaName getPredicates predicatesOf :: Resource -> [Resource] + + isImmutable :: Resource -> Boolean importJava "org.simantics.db.layer0.util.ExtendedUris" where "Converts an absolute URI to a resource" @@ -217,6 +221,8 @@ importJava "org.simantics.db.WriteGraph" where newResource :: () -> Resource "Adds a statement to the semantic graph." claim :: Resource -> Resource -> Resource -> () + @JavaName claim + claimWithInverse :: Resource -> Resource -> Maybe Resource -> Resource -> () @JavaName claimLiteral claimRelatedValue_ :: Resource -> Resource -> a -> Binding a -> () @JavaName claimLiteral @@ -327,8 +333,8 @@ importJava "org.simantics.scl.db.SCLFunctions" where "Begins a write transaction and immediately returns." asyncWrite :: (() -> a) -> () - virtualSyncWriteMem :: String -> (() -> a) -> a - virtualSyncWriteWS :: String -> (() -> a) -> a + virtualSyncWriteMem :: String -> (() -> a) -> a + virtualSyncWriteWS :: String -> (() -> a) -> a safeExec :: (() -> a) -> a activateOnce :: Resource -> () @@ -344,6 +350,8 @@ importJava "org.simantics.scl.db.SCLFunctions" where subquery :: ( a) -> a "Makes a new read request with given procedure for calculating the result. The request is always cached." subqueryC :: ( a) -> a + "Makes a new read asynchronous request with function to handle the request result. The last `isDisposed` function parameter is used to determine if the listener is still alive or not." + subqueryL :: ( a) -> (a -> ()) -> (Throwable -> ()) -> ( Boolean) -> () "Tries to convert the given Dynamic value to a value with the inferred type" possibleFromDynamic :: Typeable a => String -> Dynamic -> Maybe a @@ -368,6 +376,9 @@ importJava "org.simantics.db.layer0.util.Layer0Utils" where possiblePredicateByName :: Resource -> String -> Maybe Resource @JavaName getPossiblePredicateByNameFromType possiblePredicateByNameFromType :: Resource -> String -> Maybe Resource + + addMetadataListener :: ChangeListener -> () + removeMetadataListener :: ChangeListener -> () copyTo :: Resource -> Resource -> Resource copyTo targetContainer source = do @@ -496,4 +507,13 @@ possibleChildWithPath parent path = Just c -> possibleChild c name Nothing -> Nothing ) - (Just parent) path \ No newline at end of file + (Just parent) path + +importJava "org.simantics.db.MetadataI" where + data MetadataI + +importJava "org.simantics.db.event.ChangeListener" where + data ChangeListener + +importJava "org.simantics.db.layer0.genericrelation.DependencyChanges" where + data DependencyChanges