1 package org.simantics.sysdyn.modelImport.model.element;
\r
3 import org.simantics.db.Resource;
\r
4 import org.simantics.db.WriteGraph;
\r
5 import org.simantics.db.exception.DatabaseException;
\r
6 import org.simantics.sysdyn.SysdynResource;
\r
7 import org.simantics.sysdyn.modelImport.model.WriteContext;
\r
8 import org.simantics.sysdyn.modelImport.model.expression.IExpression;
\r
9 import org.simantics.sysdyn.modelImport.model.support.Range;
\r
10 import org.simantics.sysdyn.modelImport.model.support.Variable2;
\r
12 public class Auxiliary2 extends ModelVariable {
\r
14 public Auxiliary2(double x, double y, double w, double h,
\r
15 String name, IExpression expression, Range range, String unit, String description) {
\r
16 super(x, y, w, h, name, expression, range, unit, description);
\r
19 public Auxiliary2(double x, double y, double w, double h, Variable2 variable) {
\r
20 super(x, y, w, h, variable);
\r
24 public void write(WriteGraph graph, Resource parent, WriteContext context) throws DatabaseException {
\r
25 SysdynResource sr = SysdynResource.getInstance(graph);
\r
27 Resource variable = createVariable(graph, sr.Auxiliary, parent, context);
\r
28 createSymbol(graph, sr.AuxiliarySymbol, variable, parent, context);
\r
30 setResource(variable);
\r
34 public boolean supportsDependencies() {
\r
39 public boolean supportsFlows() {
\r