1 package org.simantics.sysdyn.modelImport.model;
\r
3 import org.simantics.sysdyn.modelImport.MdlUtils.CommentIcon;
\r
5 public class ModelElementFactory {
\r
7 public static void getConnection() {
\r
11 public static void getDependency() {
\r
15 public static void getFlow() {
\r
19 public static Element2 getElement(SketchVariable variable) {
\r
20 if (variable.getVariable().getExpression() instanceof IntegralExpression) {
\r
21 return getStock(variable);
\r
24 return getAuxiliary(variable);
\r
28 public static Element2 getElement(SketchValve valve) {
\r
29 return getValve(valve);
\r
32 public static Element2 getElement(SketchComment comment) {
\r
33 if (comment.getIcon().equals(CommentIcon.CLOUD)) {
\r
34 return getCloud(comment);
\r
37 return getComment(comment);
\r
41 public static Auxiliary2 getAuxiliary(SketchVariable variable) {
\r
45 public static Stock2 getStock(SketchVariable variable) {
\r
46 assert variable.getVariable().getExpression() instanceof IntegralExpression;
\r
51 public static Valve2 getValve(SketchValve valve) {
\r
55 public static Cloud2 getCloud(SketchComment comment) {
\r
56 assert comment.getIcon().equals(CommentIcon.CLOUD);
\r
60 public static Comment2 getComment(SketchComment comment) {
\r
64 public static Shadow2 getShadow(SketchVariable variable) {
\r