]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.server/src/org/simantics/document/server/SCLComputationalValue.java
Variable optimizations for documents (Simupedia)
[simantics/platform.git] / bundles / org.simantics.document.server / src / org / simantics / document / server / SCLComputationalValue.java
1 /*******************************************************************************
2  * Copyright (c) 2018 Association for Decentralized Information Management in
3  * Industry THTH ry.
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
8  *
9  * Contributors:
10  *     Semantum Oy - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.document.server;
13
14 import org.simantics.db.ReadGraph;
15 import org.simantics.db.Resource;
16 import org.simantics.db.exception.DatabaseException;
17 import org.simantics.db.layer0.adapter.ContextualRelatedValue;
18 import org.simantics.document.server.request.ServerSCLValueRequest;
19 import org.simantics.scl.runtime.function.Function1;
20
21 /**
22  * @author Antti Villberg
23  * @since 1.36.0
24  */
25 public class SCLComputationalValue extends ContextualRelatedValue {
26
27     @Override
28     public Function1<Object,Object> getFunction(ReadGraph graph, Resource s, Resource o, Resource p) throws DatabaseException {
29         return ServerSCLValueRequest.compile(graph, s, o, p);
30     }
31
32 }