Module Simantics/DocumentLinking

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

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

exportDocumentToPDF model fileName writes the document structure report of the model to the given file. Despite the name, the format follows the file name extension: .pdf produces PDF and .html or .htm produces HTML.

Any other extension, and any other failure during the export, raises an error.

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

The source links in the model of the given document that still refer to it although a newer version exists. The result is a Java null, not an empty list, when the document has no newer version or is not part of a model.

fixDocumentReferences :: [Resource] -> <Proc> ()

Moves the given source links to the newest version of the documents they refer to, in one write transaction. It is meant to be given what findDocumentReferences returned.

updateToLatest :: Resource -> <WriteGraph> ()

Moves a source link to the newest version of the document it refers to, following the chain of newer versions to its end. Does nothing if the link already points at the newest version.