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