1 /*******************************************************************************
2 * Copyright (c) 2010 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.databoard.binding.factory;
14 import org.simantics.databoard.binding.Binding;
15 import org.simantics.databoard.binding.error.BindingConstructionException;
16 import org.simantics.databoard.binding.error.RuntimeBindingConstructionException;
17 import org.simantics.databoard.type.Datatype;
19 public interface BindingScheme {
22 * Get binding of a data type
24 * @param type data type
26 * @throws BindingConstructionException if data type is not supported
28 Binding getBinding(Datatype type) throws BindingConstructionException;
31 * Get binding of a data type
33 * @param type data type
35 * @throws RuntimeBindingConstructionException if data type is not supported
37 Binding getBindingUnchecked(Datatype type) throws RuntimeBindingConstructionException;
40 * Tests if the scheme supports a type
43 * @return true if the type is supported by the scheme
45 boolean supportsType(Datatype type);