1 package org.simantics.sysdyn.modelImport.model.expression;
\r
3 import java.util.Arrays;
\r
5 import org.simantics.db.Resource;
\r
6 import org.simantics.db.WriteGraph;
\r
7 import org.simantics.db.common.utils.ListUtils;
\r
8 import org.simantics.db.exception.DatabaseException;
\r
9 import org.simantics.layer0.Layer0;
\r
10 import org.simantics.layer0.utils.direct.GraphUtils;
\r
11 import org.simantics.sysdyn.SysdynResource;
\r
12 import org.simantics.sysdyn.modelImport.model.WriteContext;
\r
14 public class DelayExpression implements IExpression {
\r
17 public void write(WriteGraph graph, Resource parent, WriteContext context) throws DatabaseException {
\r
18 Layer0 l0 = Layer0.getInstance(graph);
\r
19 SysdynResource sr = SysdynResource.getInstance(graph);
\r
21 // Resource expression = GraphUtils.create2(graph, sr.DelayExpression,
\r
22 // sr.StockExpression_integralEquation, integral,
\r
23 // sr.StockExpression_initialEquation, initial,
\r
24 // l0.PartOf, parent);
\r
25 // // TODO: why is the expression stored in two places?
\r
26 // graph.claim(parent, sr.Variable_expressionList, ListUtils.create(graph, Arrays.asList(expression)));
\r