@Override public void setDefaultContext(Context context) { getCompositeNode().setDefaultContext(context); ((AbstractContext) context).setContextContainer(getCompositeNode()); }
@Override public void addContext(Context context) { getCompositeNode().addContext(context); ((AbstractContext) context).setContextContainer(getCompositeNode()); }
@Override public ContextContainer getContextContainer() { return (ContextContainer) getForEachNode().getCompositeNode(); }
protected List<Connection> getSubConnections(CompositeNode compositeNode) { return super.getSubConnections(((ForEachNode) compositeNode).getCompositeNode()); }
public void addNode(Node node) { getCompositeNode().addNode(node); }
public void removeNode(Node node) { getCompositeNode().removeNode(node); }
public CompositeNode.NodeAndType getLinkedIncomingNode(String inType) { return getCompositeNode().getLinkedIncomingNode(inType); }
public CompositeNode.NodeAndType getLinkedOutgoingNode(String inType) { return getCompositeNode().getLinkedOutgoingNode(inType); }
protected Map<String, CompositeNode.NodeAndType> getInPorts(CompositeNode compositeNode) { return ((ForEachNode) compositeNode).getCompositeNode().getLinkedIncomingNodes(); }
public void linkIncomingConnections(String inType, long inNodeId, String inNodeType) { getCompositeNode().linkIncomingConnections(inType, inNodeId, inNodeType); }
protected List<Node> getSubNodes(CompositeNode compositeNode) { return super.getSubNodes(((ForEachNode) compositeNode).getCompositeNode()); }
protected Map<String, CompositeNode.NodeAndType> getOutPorts(CompositeNode compositeNode) { return ((ForEachNode) compositeNode).getCompositeNode().getLinkedOutgoingNodes(); }
public void linkOutgoingConnections(long outNodeId, String outNodeType, String outType) { getCompositeNode().linkOutgoingConnections(outNodeId, outNodeType, outType); }
public Node getNode(long id) { return getCompositeNode().getNode(id); }
@Override public Context getContext(String contextType) { Context context = getCompositeNode().getDefaultContext(contextType); if (context != null) { return context; } return super.getContext(contextType); }
@Override public Context getContext(String contextType, long id) { Context ctx = super.getContext(contextType, id); if (ctx == null) { ctx = getCompositeNode().getContext(contextType, id); } return ctx; }
@Override public List<Context> getContexts(String contextType) { List<Context> contexts = super.getContexts(contextType); if (contexts == null) { contexts = getCompositeNode().getContexts(contextType); } return contexts; }
public DataType getVariableType() { if (variableName == null) { return null; } for (Variable variable: ((VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE)).getVariables()) { if (variableName.equals(variable.getName())) { return variable.getType(); } } return null; }
public DataType getOutputVariableType() { if (outputVariableName == null) { return null; } for (Variable variable: ((VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE)).getVariables()) { if (outputVariableName.equals(variable.getName())) { return variable.getType(); } } return null; }
public void setVariable(String variableName, DataType type) { this.variableName = variableName; VariableScope variableScope = (VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE); List<Variable> variables = variableScope.getVariables(); if (variables == null) { variables = new ArrayList<Variable>(); variableScope.setVariables(variables); } Variable variable = new Variable(); variable.setName(variableName); variable.setType(type); variables.add(variable); }