]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.graphfile/scl/Simantics/GraphFile.scl
SCL API for GraphFile plug-in.
[simantics/platform.git] / bundles / org.simantics.graphfile / scl / Simantics / GraphFile.scl
1 import "Simantics/DB"
2 import "File"
3
4     
5 importJava "org.simantics.graphfile.util.GraphFileUtil" where
6     "Writes contents of a file to DB, including the timestamp"
7     @JavaName writeDataToGraphSCLhack
8     writeDataToGraph:: File -> Resource -> <WriteGraph>()
9     
10     "Writes contents of a byte array to DB"
11     @JavaName writeDataToGraph
12     writeDataToGraphBytes:: ByteArray -> Resource -> <WriteGraph>()
13     
14     "Creates a temp file of a GraphFile resource"
15     @JavaName toTempFileSCLhack
16     toTempFile :: Resource -> <ReadGraph> File
17     
18     "Writes contents of a GraphFile into a regular File"
19     @JavaName writeDataToFileSCLhack
20     writeDataToFile :: Resource -> File -> <ReadGraph>()
21     
22     "Writes contents of a file to DB, including the filename and timestamp"
23     @JavaName toGraphSCLhack
24     toGraphWithPath :: String -> Resource -> <WriteGraph>()
25     
26     "Writes contents of a file to DB, including the filename and timestamp"
27     @JavaName toGraph
28     toGraph :: File -> Resource -> <WriteGraph>()
29     
30     "Returns contents of a GraphFile as a byte array"
31     @JavaName getData
32     getData :: Resource -> <ReadGraph> ByteArray
33     
34     "Returns contents of a GraphFile as a String"
35     @JavaName getDataAsString
36     getDataAsString :: Resource -> <ReadGraph> String
37     
38     
39     
40     
41