]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/src/org/simantics/databoard/serialization/SerializerScheme.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / serialization / SerializerScheme.java
1 package org.simantics.databoard.serialization;\r
2 \r
3 import org.simantics.databoard.binding.Binding;\r
4 \r
5 /**\r
6  * Serialization scheme creates serializers for binding requests.\r
7  * \r
8  * {@link DefaultSerializerFactory} is a serialization scheme that follows\r
9  * Databoard serialization format specification. It can create serialization\r
10  * for any binding. \r
11  * \r
12  * @author Toni Kalajainen\r
13  */\r
14 public interface SerializerScheme {\r
15 \r
16         /**\r
17          * Get binding of a data type\r
18          * \r
19          * @param binding\r
20          * @return binding \r
21          * @throws SerializerConstructionException if data type is not supported\r
22          */\r
23         Serializer getSerializer(Binding binding) throws SerializerConstructionException;\r
24 \r
25         /**\r
26          * Get binding of a data type\r
27          * \r
28          * @param binding\r
29          * @return binding \r
30          * @throws RuntimeSerializerConstructionException if data type is not supported\r
31          */\r
32         Serializer getSerializerUnchecked(Binding binding) throws RuntimeSerializerConstructionException;\r
33 \r
34         /**\r
35          * Tests if the scheme supports a binding\r
36          * \r
37          * @param binding\r
38          * @return true if the binding is supported by the scheme\r
39          */\r
40         boolean supportsBinding(Binding binding);\r
41         \r
42 }\r