public static Edit<?> getRemoveProcessorInputPortEdit( ProcessorInputPort port) { List<Edit<?>> editList = new ArrayList<Edit<?>>(); Processor processor = port.getProcessor(); editList.add(edits.getRemoveProcessorInputPortEdit(port.getProcessor(), port)); for (Activity<?> activity : processor.getActivityList()) { editList.add(edits.getRemoveActivityInputPortMappingEdit(activity, port.getName())); } return new CompoundEdit(editList); }
private Element processorInputPortsToXML(Processor processor) { Element inputPorts = new Element(PROCESSOR_INPUT_PORTS, T2_WORKFLOW_NAMESPACE); for (ProcessorInputPort port : processor.getInputPorts()) { Element portElement = new Element(PROCESSOR_PORT, T2_WORKFLOW_NAMESPACE); Element name = new Element(NAME, T2_WORKFLOW_NAMESPACE); Element depth = new Element(DEPTH, T2_WORKFLOW_NAMESPACE); name.setText(port.getName()); depth.setText(String.valueOf(port.getDepth())); portElement.addContent(name); portElement.addContent(depth); inputPorts.addContent(portElement); } return inputPorts; } }
+ "<th>Size of data</th>" + "</tr>"; for (ProcessorInputPort ip : inputs) { html += "<tr><td>" + ip.getName() + "</td><td>"; Datalink incoming = ip.getIncomingLink(); if (incoming == null) { html += "No value";
inputVar.setProcessorName(pName); inputVar.setWorkflowId(dataflowID); inputVar.setPortName(ip.getName()); inputVar.setDepth(ip.getDepth()); inputVar.setInputPort(true); .getProcessor().getLocalName(); destinationPort = lookupPort(sinkPname, l.getSink().getName(), true); } else if (l.getSink() instanceof MergeInputPort) {
if (sink instanceof ProcessorInputPort) { Processor downstreamProcc = ((ProcessorInputPort) sink) .getProcessor(); if (!downStream.contains(downstreamProcc)) { downStream.add(downstreamProcc);
List<Edit<?>> editList = new ArrayList<Edit<?>>(); for (ProcessorInputPort inputPort : inputPorts) { Datalink datalink = inputPort.getIncomingLink(); if (datalink != null) { editList.add(Tools.getDisconnectDatalinkAndRemovePortsEdit(datalink));
if (ip.getIncomingLink()!=null) { edits.add(editsImpl.getDisconnectDatalinkEdit(ip.getIncomingLink())); if (a.getInputPortMapping().containsKey(ip.getName())) { edits.add(new RemoveActivityInputPortMappingEdit(a,ip.getName()));
EventHandlingInputPort sink = datalink.getSink(); if (sink instanceof ProcessorInputPort) { Processor sinkProcessor = ((ProcessorInputPort) sink).getProcessor(); if (sinkProcessor != null) { Processor sourceProcessor = null;
@Override protected void doEditAction(ProcessorImpl processor) throws EditException { if (processor.getInputPortWithName(port.getName())==null) throw new EditException("The processor doesn't have a port named:"+port.getName()); for (IterationStrategyImpl is : processor.iterationStack.getStrategies()) { is.removeInputByName(port.getName()); } processor.inputPorts.remove(port); }
private Element processorInputPortsToXML(Processor processor) { Element inputPorts = new Element(PROCESSOR_INPUT_PORTS, T2_WORKFLOW_NAMESPACE); for (ProcessorInputPort port : processor.getInputPorts()) { Element portElement = new Element(PROCESSOR_PORT, T2_WORKFLOW_NAMESPACE); Element name = new Element(NAME, T2_WORKFLOW_NAMESPACE); Element depth = new Element(DEPTH, T2_WORKFLOW_NAMESPACE); name.setText(port.getName()); depth.setText(String.valueOf(port.getDepth())); portElement.addContent(name); portElement.addContent(depth); inputPorts.addContent(portElement); } return inputPorts; } }
if (ip.getIncomingLink()!=null) { edits.add(editsImpl.getDisconnectDatalinkEdit(ip.getIncomingLink())); if (a.getInputPortMapping().containsKey(ip.getName())) { edits.add(new RemoveActivityInputPortMappingEdit(a,ip.getName()));
public static Edit<?> getRemoveProcessorInputPortEdit( ProcessorInputPort port, Edits edits) { List<Edit<?>> editList = new ArrayList<Edit<?>>(); Processor processor = port.getProcessor(); editList.add(edits.getRemoveProcessorInputPortEdit(port.getProcessor(), port)); for (Activity<?> activity : processor.getActivityList()) { editList.add(edits.getRemoveActivityInputPortMappingEdit(activity, port.getName())); } return new CompoundEdit(editList); }
ProcessorInputPort processorInputPort = (ProcessorInputPort) sinkPort; List<? extends Activity<?>> activities = processorInputPort .getProcessor().getActivityList(); if (activities.size() > 0) { String activityPortName = activities.get(0)
@Override protected void doEditAction(ProcessorImpl processor) throws EditException { if (processor.getInputPortWithName(port.getName())==null) throw new EditException("The processor doesn't have a port named:"+port.getName()); for (IterationStrategyImpl is : processor.iterationStack.getStrategies()) { is.removeInputByName(port.getName()); } processor.inputPorts.remove(port); }
private List<ProcessorInputPort> determineInputPortsForRemoval(Processor p,Activity<?>a) { List<ProcessorInputPort> result = new ArrayList<ProcessorInputPort>(); for (ProcessorInputPort pPort : p.getInputPorts()) { boolean found=false; for (ActivityInputPort aPort : a.getInputPorts()) { if (aPort.getName().equals(pPort.getName())) { if (pPort.getDepth() == aPort.getDepth()) { found=true; } break; } } if (!found) { result.add(pPort); } } return result; }
private void considerNearestDownstream(TokenProcessingEntity investigate) { if (investigate instanceof Processor) for (Condition condition : ((Processor) investigate) .getControlledPreconditionList()) considerInclusion(condition.getTarget()); for (EventForwardingOutputPort outputPort : investigate .getOutputPorts()) for (Datalink datalink : outputPort.getOutgoingLinks()) { EventHandlingInputPort sink = datalink.getSink(); if (sink instanceof ProcessorInputPort) considerInclusion(((ProcessorInputPort) sink) .getProcessor()); else if (sink instanceof MergeInputPort) considerInclusion(((MergeInputPort) sink).getMerge()); // The merge it self doesn't count as a processor else { // Ignore dataflow ports } } }
private EventHandlingInputPort findProcessorInputPort( Map<String, Processor> createdProcessors, String portName, String processorName) throws DeserializationException { EventHandlingInputPort result = null; Processor p = createdProcessors.get(processorName); if (p == null) throw new DeserializationException( "Unable to find processor named:" + processorName); for (ProcessorInputPort port : p.getInputPorts()) { if (port.getName().equals(portName)) { result = port; break; } } return result; }
private List<ProcessorInputPort> determineInputPortsForRemoval(Processor p,Activity<?>a) { List<ProcessorInputPort> result = new ArrayList<ProcessorInputPort>(); for (ProcessorInputPort pPort : p.getInputPorts()) { boolean found=false; for (ActivityInputPort aPort : a.getInputPorts()) { if (aPort.getName().equals(pPort.getName())) { if (pPort.getDepth() == aPort.getDepth()) { found=true; } break; } } if (!found) { result.add(pPort); } } return result; }
private EventHandlingInputPort findProcessorInputPort( Map<String, Processor> createdProcessors, String portName, String processorName) throws DeserializationException { EventHandlingInputPort result = null; Processor p = createdProcessors.get(processorName); if (p == null) throw new DeserializationException( "Unable to find processor named:" + processorName); for (ProcessorInputPort port : p.getInputPorts()) { if (port.getName().equals(portName)) { result = port; break; } } return result; }