@JavaName getResourceId
resourceId :: Resource -> Long
+ isPersistent :: Resource -> Boolean
+
importJava "org.simantics.db.ReadGraph" where
data ReadGraphX
@JavaName getObject
objectOf :: Statement -> Resource
+ isAsserted :: Statement -> Resource -> <ReadGraph> Boolean
+
importJava "org.simantics.db.ReadGraph" where
"Converts an absolute URI to a resource or returns `Nothing` if there is no such resource."
@JavaName getPossibleResource
@private
@JavaName getURI
uriOfResource :: Resource -> <ReadGraph> String
+
+ @private
+ @JavaName getPossibleURI
+ possibleUriOfResource :: Resource -> <ReadGraph> Maybe String
@JavaName getObjects
objects_ :: Resource -> Resource -> <ReadGraph> Collection Resource
@JavaName getSingleStatement
singleStatement :: Resource -> Resource -> <ReadGraph> Statement
+ @JavaName getPossibleStatement
+ possibleStatement :: Resource -> Resource -> <ReadGraph> Maybe Statement
+
@JavaName getRelatedVariantValue
relatedVariantValue :: Resource -> Resource -> <ReadGraph> Variant
isInheritedFrom :: Resource -> Resource -> <ReadGraph> Boolean
getRootLibrary :: () -> <ReadGraph> Resource
+
+ @JavaName getPredicates
+ predicatesOf :: Resource -> <ReadGraph> [Resource]
importJava "org.simantics.db.layer0.util.ExtendedUris" where
"Converts an absolute URI to a resource"
"Returns the URI of the given value."
uriOf :: a -> <ReadGraph> String
-
+
+ "Returns the URI of the given value if it exists or Nothing."
+ possibleUriOf :: a -> <ReadGraph> Maybe String
+
"Reads the name of the value."
nameOf :: a -> <ReadGraph> String
possibleNameOf :: a -> <ReadGraph> Maybe String
instance Browsable Resource where
fromUri = resource
uriOf = uriOfResource
+ possibleUriOf = possibleUriOfResource
nameOf r = relatedValue r L0.HasName
possibleNameOf r = possibleRelatedValue r L0.HasName
@inline
@JavaName create
createList :: [Resource] -> <WriteGraph> Resource
+
+ @JavaName create
+ createListWithType :: Resource -> [Resource] -> <WriteGraph> Resource
@javaName insertBack
insertBack :: Resource -> [Resource] -> <WriteGraph> ()
listOntologies :: () -> <ReadGraph> [Resource]
emptyTrashBin :: () -> <Proc> ()
purgeDatabase :: () -> <Proc> ()
+ prettyPrintResource :: Resource -> Boolean -> <ReadGraph> String
@private
@JavaName copyTo
copyTo_ :: Resource -> Resource -> <WriteGraph> Collection Resource
@JavaName getPossiblePredicateByName
possiblePredicateByName :: Resource -> String -> <ReadGraph> Maybe Resource
+ @JavaName getPossiblePredicateByNameFromType
+ possiblePredicateByNameFromType :: Resource -> String -> <ReadGraph> Maybe Resource
copyTo :: Resource -> Resource -> <WriteGraph> Resource
copyTo targetContainer source = do
Just model -> model
Nothing -> fail "No active model."
+"Gives the current active model if it exists or Nothing otherwise."
+possibleCurrentModel :: <ReadGraph> Maybe Resource
+possibleCurrentModel = activeModel (currentProject ())
+
startUndoPoint :: String -> <WriteGraph> ()
startUndoPoint string = do
markUndoPoint ()
Just c -> possibleChild c name
Nothing -> Nothing
)
- (Just parent) path
+ (Just parent) path
\ No newline at end of file