1 /*******************************************************************************
2 * Copyright (c) 2018 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 * Semantum Oy - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db;
14 import org.simantics.db.exception.DatabaseException;
15 import org.simantics.scl.runtime.function.Function1;
18 * @author Antti Villberg
21 public interface ConverterComputationalValue extends ComputationalValue {
24 * This computes the expression function that shall be called with given context
26 * {@link ReadGraph#getRelatedValue2(Resource, Resource, Object, org.simantics.databoard.binding.Binding)}.
29 * Context can be Resource (literal) or Variable. With Resource context this
30 * gets called with <code>(null, null, literal resource)</code>. With Variable
31 * property context this gets called with
32 * <code>(represents of parent, represents, predicate resource)</code>.
34 Function1<Object,Object> getFunction(ReadGraph graph, Resource s, Resource o, Resource p) throws DatabaseException;