]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/src/org/simantics/databoard/binding/factory/BindingScheme.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / binding / factory / BindingScheme.java
1 /*******************************************************************************\r
2  *  Copyright (c) 2010 Association for Decentralized Information Management in\r
3  *  Industry THTH ry.\r
4  *  All rights reserved. This program and the accompanying materials\r
5  *  are made available under the terms of the Eclipse Public License v1.0\r
6  *  which accompanies this distribution, and is available at\r
7  *  http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  *  Contributors:\r
10  *      VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.databoard.binding.factory;
13
14 import org.simantics.databoard.binding.Binding;\r
15 import org.simantics.databoard.binding.error.BindingConstructionException;\r
16 import org.simantics.databoard.binding.error.RuntimeBindingConstructionException;\r
17 import org.simantics.databoard.type.Datatype;\r
18
19 public interface BindingScheme {
20
21         /**
22          * Get binding of a data type
23          * 
24          * @param type data type
25          * @return binding 
26          * @throws BindingConstructionException if data type is not supported
27          */
28         Binding getBinding(Datatype type) throws BindingConstructionException;
29 \r
30         /**\r
31          * Get binding of a data type\r
32          * \r
33          * @param type data type\r
34          * @return binding \r
35          * @throws RuntimeBindingConstructionException if data type is not supported\r
36          */\r
37         Binding getBindingUnchecked(Datatype type) throws RuntimeBindingConstructionException;\r
38         
39         /**
40          * Tests if the scheme supports a type
41          * 
42          * @param type
43          * @return true if the type is supported by the scheme
44          */
45         boolean supportsType(Datatype type);
46         
47 }
48