|
Simantics/Model module documentationmodel :: String -> <ReadGraph> Resource
Returns an existing model in the current project with the given configurationOf :: Resource -> <ReadGraph> Resource
Returns the configuration of the given allModels :: () -> <ReadGraph> [Resource] Returns the list of all models in the current project. getPossibleModel :: Resource -> <ReadGraph> Resource Returns the model the given resource belongs to. The resource itself is returned if it is a model. Note that despite the return type this function produces a null resource when the resource does not belong to a model. Undocumented entitiesactivateModel :: Resource -> <WriteGraph> Boolean Activates the specified model but does not wait for any of the effects caused by the activation to be completed. In most cases the blocking version syncActivateModel should be used instead of this function. activateModelAction :: Resource -> <Proc> () Activates the given model in a write transaction and discards the result. Like activateModel this does not wait for the effects of the activation to complete; use syncActivateModel when the completion matters. copyAnnotationTypes :: Resource -> Resource -> <WriteGraph> () Copies annotation types from one model to another. createGenericModel :: Resource -> String -> <WriteGraph> Resource
deleteIndex :: Resource -> <WriteGraph> () Deletes the dependency index of the given index root and invalidates the cached index queries that used it. The index is rebuilt from the contents of the index root when it is next needed. removeIndex does the same thing. listIndexEntries :: Resource -> String -> <ReadGraph> String
possibleIndexRoot :: Resource -> <ReadGraph> Maybe Resource Returns the index root the given resource belongs to, or releaseMemory :: () -> <WriteGraph> () Flushes the database client's cluster and query caches in order to release the memory they hold. removeIndex :: Resource -> <WriteGraph> () Removes the index associated with the model. resetIssueSources :: Resource -> <WriteGraph> () Updates all continuous issue sources of the model so that the issues they produce are recomputed against the current state of the database. searchByQuery :: Resource -> String -> <ReadGraph> [Resource]
searchByQueryShallow :: Resource -> String -> <ReadGraph> [Resource] As searchByQuery but consults only the index of the given index root. searchByType :: Resource -> Resource -> <ReadGraph> [Resource]
The links are followed recursively: the index roots linked to a linked index root are consulted as well, to any depth. Each index root is consulted once however many paths reach it, so links that form a cycle neither repeat the search nor make it fail. searchByTypeAndFilter :: Resource -> Resource -> (Resource -> <ReadGraph> Boolean) -> <ReadGraph> [Resource] As searchByType but keeps only the resources for which the
given filter returns searchByTypeAndName :: Resource -> Resource -> String -> <ReadGraph> [Resource] As searchByType but returns only the resources whose name
is the given searchByTypeAndNameShallow :: Resource -> Resource -> String -> <ReadGraph> [Resource] As searchByTypeAndName but consults only the index of the given index root. searchByTypeShallow :: Resource -> Resource -> <ReadGraph> [Resource] As searchByType but consults only the index of the given index root, not the indexes of linked index roots or global ontologies. syncActivateModel :: Resource -> <Proc> Boolean Activates the specified model and blocks until all effects caused by the activation have been completed. This function is a synchronous version of the older activateModel function that does not wait for activation completion, i.e. works asynchronously. In most cases it is recommended to use this functions instead of The effect completion waiting works based on the |