Module Simantics/Document

This module is undocumented. This is a list of its definitions.

addUrlDocumentWithDetailSCL :: Resource -> String -> String -> <WriteGraph> Resource

addUrlDocumentWithDetailSCL target name url creates a URL document of that name pointing at the given address, links it under target and returns it.

document :: Resource -> String -> <ReadGraph> [Resource]

document model name returns the documents of the model whose name is exactly name. The result is empty when nothing matches and has several elements when documents in different folders share a name.

documents :: Resource -> <ReadGraph> [Resource]

Every document in the model, found by descending through the children that are not themselves documents.

documentsFolders :: Resource -> <ReadGraph> [Resource]

The document libraries of the model, found by descending through its children. The search stops at each library, so a library nested inside another one is not listed.

exportDocument :: Resource -> String -> <Proc> ()

exportDocument document fileName writes the file contents stored in a document out to the given path, overwriting an existing file.

importDocumentWithDetailSCL :: Resource -> String -> <WriteGraph> Resource

importDocumentWithDetailSCL target fileName imports the file at the given path as a document under target, named after the file. Fails if the file does not exist.

importFolderWithName :: String -> Resource -> Resource -> Resource -> ProgressMonitor -> <WriteGraph> Resource

importFolderWithName folderName parent folderType relation monitor imports a file system folder and everything below it, recursively, building a matching hierarchy of folderType instances linked by relation. The imported root folder is attached to parent with the same relation, given a name unique among its siblings, and returned. The progress monitor reports one unit per file.

loadDocumentLibrarySynchronizer :: LifeCycleContext -> <Proc> ()

Starts keeping the document libraries that are configured for file system synchronization exported to their folders, and keeps doing so as the set of such libraries changes. Failures during an export are logged, not raised. The listener is registered under the given life cycle context, which unloadDocumentLibrarySynchronizer uses to find it again.

unloadDocumentLibrarySynchronizer :: LifeCycleContext -> <Proc> ()

The counterpart of loadDocumentLibrarySynchronizer in the life cycle contract. Removes the synchronization listener that was installed for the given life cycle context, and does nothing if that context has none.