]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.export.core/src/org/simantics/export/core/intf/Format.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.export.core / src / org / simantics / export / core / intf / Format.java
1 package org.simantics.export.core.intf;\r
2 \r
3 import org.eclipse.jface.resource.ImageDescriptor;\r
4 import org.simantics.export.core.error.ExportException;\r
5 \r
6 /**\r
7  * Description of a file format.\r
8  *\r
9  * @author toni.kalajainen@semantum.fi\r
10  */\r
11 public interface Format extends FormatClass {\r
12         \r
13         /**\r
14          * Format identifier\r
15          * @return format identifier\r
16          */\r
17         String id();\r
18         \r
19         /**\r
20          * File extension of this format\r
21          * @return\r
22          */\r
23         String fileext();\r
24         \r
25         /**\r
26          * Defines the writer class that the exporter extension will use for writing the content of this format.\r
27          * @return\r
28          * @throws ClassNotFoundException \r
29          */\r
30         Class<?> writerClass() throws ClassNotFoundException;\r
31         \r
32         /**\r
33          * The class the importer will use for reading the associated content type.\r
34          * @return\r
35          * @throws ClassNotFoundException \r
36          */\r
37         Class<?> readerClass() throws ClassNotFoundException;\r
38         \r
39         /**\r
40          * Create action factory for the file format.\r
41          * \r
42          * @return action factory\r
43          * @throws ExportException \r
44          */\r
45         FormatClass formatActions() throws ExportException;\r
46         \r
47         /**\r
48          * The label\r
49          * @return\r
50          */\r
51         String label();\r
52         \r
53         /**\r
54          * The label in plural form\r
55          * @return\r
56          */\r
57         String plural();\r
58         \r
59         /**\r
60          * Image descriptor\r
61          * @return\r
62          */\r
63         ImageDescriptor icon();\r
64         \r
65         /**\r
66          * Set to true, if the format supports merging of multiple items of content of one type.\r
67          * @return true if this is group format\r
68          */\r
69         boolean isGroupFormat();\r
70         \r
71         /**\r
72          * Set to true, if the format can contain multiple content items of any types.\r
73          * @return true if this is container format\r
74          */\r
75         boolean isContainerFormat();\r
76         \r
77         /**\r
78          * This attribute determines if the format is attachable to another format of group type.\r
79          * \r
80          * @return true if this is attachable format.\r
81          */\r
82         boolean isAttachable();\r
83         \r
84         /**\r
85          * This property determines - if true - that the content must always be published and cannot be hidden inside container file.\r
86          * \r
87          * @return if, true that the content must always be published and cannot be hidden inside container file.\r
88          */\r
89         boolean isAlwaysPublished();\r
90         \r
91         /**\r
92          * If true, this format is can contain links to other files.\r
93          * @return true, this format is can contain links to other files.\r
94          */\r
95         boolean isLinkContainer();\r
96         \r
97         /**\r
98          * The default selection for merge the group.\r
99          * @return\r
100          */\r
101         boolean mergeGroupFormatDefault();\r
102                 \r
103 }\r