public Datalink createDatalink(EventForwardingOutputPort source, EventHandlingInputPort sink) { return new DatalinkImpl(source, sink); }
@Override protected void undoEditAction(DatalinkImpl datalink) { EventForwardingOutputPort source = datalink.getSource(); EventHandlingInputPort sink = datalink.getSink(); if (source instanceof BasicEventForwardingOutputPort) { ((BasicEventForwardingOutputPort) source).removeOutgoingLink(datalink); } if (sink instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort) sink).setIncomingLink(null); } }
if (dl instanceof DatalinkImpl) { DatalinkImpl dli = (DatalinkImpl) dl; dli.setResolvedDepth(-1); if (dl instanceof DatalinkImpl) { DatalinkImpl dli = (DatalinkImpl) dl; dli.setResolvedDepth(dip.getDepth());
if (dl instanceof DatalinkImpl) { DatalinkImpl dli = (DatalinkImpl) dl; dli.setResolvedDepth(-1); if (dl instanceof DatalinkImpl) { DatalinkImpl dli = (DatalinkImpl) dl; dli.setResolvedDepth(dip.getDepth());
@Override protected void doEditAction(DatalinkImpl datalink) throws EditException { EventForwardingOutputPort source = datalink.getSource(); EventHandlingInputPort sink = datalink.getSink(); if (source instanceof BasicEventForwardingOutputPort) { ((BasicEventForwardingOutputPort) source).addOutgoingLink(datalink); } if (sink instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort) sink).setIncomingLink(datalink); } }
public Datalink createDatalink(EventForwardingOutputPort source, EventHandlingInputPort sink) { return new DatalinkImpl(source, sink); }
if (dl instanceof DatalinkImpl) { DatalinkImpl dli = (DatalinkImpl) dl; dli.setResolvedDepth(-1); if (dl instanceof DatalinkImpl) { DatalinkImpl dli = (DatalinkImpl) dl; dli.setResolvedDepth(dip.getDepth());
@Override protected void undoEditAction(DatalinkImpl datalink) { EventForwardingOutputPort source = datalink.getSource(); EventHandlingInputPort sink = datalink.getSink(); if (source instanceof BasicEventForwardingOutputPort) { ((BasicEventForwardingOutputPort) source).removeOutgoingLink(datalink); } if (sink instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort) sink).setIncomingLink(null); } }
public Datalink createDatalink(EventForwardingOutputPort source, EventHandlingInputPort sink) { return new DatalinkImpl(source, sink); }
public boolean doTypeCheck() throws IterationTypeMismatchException { if (inputs.size() == 0) { // Arguable, but technically a merge with no inputs is valid, it may // make more sense to throw an exception here though as it has no // actual meaning. return true; } // Return false if we have unbound input ports or bound ports where the // resolved depth hasn't been calculated yet for (MergeInputPort ip : inputs) { if (ip.getIncomingLink() == null || ip.getIncomingLink().getResolvedDepth() == -1) { return false; } } // Got all input ports, now scan for input depths int inputDepth = inputs.get(0).getIncomingLink().getResolvedDepth(); for (MergeInputPort ip : inputs) { if (ip.getIncomingLink().getResolvedDepth() != inputDepth) { throw new IterationTypeMismatchException(); } } // Got to here so all the input resolved depths match, push depth+1 to // all outgoing links and return true for (DatalinkImpl dli : output.outgoingLinks) { dli.setResolvedDepth(inputDepth+1); } return true; } }
@Override protected void doEditAction(DatalinkImpl datalink) throws EditException { EventForwardingOutputPort source = datalink.getSource(); EventHandlingInputPort sink = datalink.getSink(); if (source instanceof BasicEventForwardingOutputPort) { ((BasicEventForwardingOutputPort) source).removeOutgoingLink(datalink); } if (sink instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort) sink).setIncomingLink(null); } }
@Before public void setUp() throws Exception { datalink = new DatalinkImpl(null, null); editDone = false; }
public boolean doTypeCheck() throws IterationTypeMismatchException { if (inputs.size() == 0) { // Arguable, but technically a merge with no inputs is valid, it may // make more sense to throw an exception here though as it has no // actual meaning. return true; } // Return false if we have unbound input ports or bound ports where the // resolved depth hasn't been calculated yet for (MergeInputPort ip : inputs) { if (ip.getIncomingLink() == null || ip.getIncomingLink().getResolvedDepth() == -1) { return false; } } // Got all input ports, now scan for input depths int inputDepth = inputs.get(0).getIncomingLink().getResolvedDepth(); for (MergeInputPort ip : inputs) { if (ip.getIncomingLink().getResolvedDepth() != inputDepth) { throw new IterationTypeMismatchException(); } } // Got to here so all the input resolved depths match, push depth+1 to // all outgoing links and return true for (DatalinkImpl dli : output.outgoingLinks) { dli.setResolvedDepth(inputDepth+1); } return true; } }
@Override protected void undoEditAction(DatalinkImpl datalink) { EventForwardingOutputPort source = datalink.getSource(); EventHandlingInputPort sink = datalink.getSink(); if (source instanceof BasicEventForwardingOutputPort) { ((BasicEventForwardingOutputPort) source).addOutgoingLink(datalink); } if (sink instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort) sink).setIncomingLink(datalink); } }
@Override protected void doEditAction(ProcessorImpl processor) throws EditException { for (BasicEventForwardingOutputPort popi : processor.outputPorts) { if (popi.getName().equals(outputName)) { newLink = new DatalinkImpl(popi, target); popi.addOutgoingLink(newLink); if (target instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort)target).setIncomingLink(newLink); } outputPort = popi; return; } } throw new EditException("Cannot locate output port with name '" + outputName + "'"); }
dli.setResolvedDepth(inputDepth+1);
@Override protected void doEditAction(DatalinkImpl datalink) throws EditException { EventForwardingOutputPort source = datalink.getSource(); EventHandlingInputPort sink = datalink.getSink(); if (source instanceof BasicEventForwardingOutputPort) { ((BasicEventForwardingOutputPort) source).addOutgoingLink(datalink); } if (sink instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort) sink).setIncomingLink(datalink); } }
@Override protected void doEditAction(ProcessorImpl processor) throws EditException { for (BasicEventForwardingOutputPort popi : processor.outputPorts) { if (popi.getName().equals(outputName)) { newLink = new DatalinkImpl(popi, target); popi.addOutgoingLink(newLink); if (target instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort)target).setIncomingLink(newLink); } outputPort = popi; return; } } throw new EditException("Cannot locate output port with name '" + outputName + "'"); }
for (DatalinkImpl outgoingLink : output.outgoingLinks) { outgoingLink.setResolvedDepth(this.resultWrappingDepth + output.getDepth());
@Override protected void doEditAction(DatalinkImpl datalink) throws EditException { EventForwardingOutputPort source = datalink.getSource(); EventHandlingInputPort sink = datalink.getSink(); if (source instanceof BasicEventForwardingOutputPort) { ((BasicEventForwardingOutputPort) source).addOutgoingLink(datalink); } if (sink instanceof AbstractEventHandlingInputPort) { ((AbstractEventHandlingInputPort) sink).setIncomingLink(datalink); } }