1 package org.simantics.plant3d.scenegraph;
3 import java.util.HashMap;
6 import org.simantics.g3d.scenegraph.base.ParentNode;
7 import org.simantics.objmap.graph.annotations.DynamicGraphType;
8 import org.simantics.objmap.graph.annotations.GetType;
9 import org.simantics.objmap.graph.annotations.SetType;
10 import org.simantics.plant3d.ontology.Plant3D;
11 import org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint;
12 import org.simantics.plant3d.scenegraph.controlpoint.ControlPointFactory;
14 @DynamicGraphType(Plant3D.URIs.EndComponent)
15 public class EndComponent extends PipelineComponent {
18 PipeControlPoint controlPoint;
20 @GetType(Plant3D.URIs.EndComponent)
21 public String getType() {
25 @SetType(Plant3D.URIs.EndComponent)
26 public void setType(String type) throws Exception {
28 controlPoint = ControlPointFactory.create(this);
36 public PipeControlPoint getControlPoint() {
41 public void setParent(ParentNode<?> parent, String name) {
42 super.setParent(parent, name);
43 setPipeRun((PipeRun)parent);
47 public Map<String, Object> updateParameterMap() {
48 Map<String,Object> map = new HashMap<String, Object>();
50 PipeRun pipeRun = getPipeRun();
51 if (pipeRun != null) {
52 map.put("radius", pipeRun.getPipeDiameter() * 0.5);