@Override protected void cloneInto(WorkflowBean clone, Cloning cloning) { super.cloneInto(clone, cloning); AbstractGranularDepthPort clonePort = (AbstractGranularDepthPort) clone; clonePort.setGranularDepth(getGranularDepth()); } }
public void createProcessorPortsFromActivity(Processor processor, Activity activity) { for (InputActivityPort activityPort : activity.getInputPorts()) new InputProcessorPort(processor, activityPort.getName()) .setDepth(activityPort.getDepth()); for (OutputActivityPort activityPort : activity.getOutputPorts()) { OutputProcessorPort procPort = new OutputProcessorPort(processor, activityPort.getName()); procPort.setDepth(activityPort.getDepth()); procPort.setGranularDepth(activityPort.getGranularDepth()); } }
public void createActivityPortsFromProcessor(Activity activity, Processor processor) { for (InputProcessorPort processorPort : processor.getInputPorts()) new InputActivityPort(activity, processorPort.getName()) .setDepth(processorPort.getDepth()); for (OutputProcessorPort processorPort : processor.getOutputPorts()) { OutputActivityPort activityPort = new OutputActivityPort(activity, processorPort.getName()); activityPort.setDepth(processorPort.getDepth()); activityPort.setGranularDepth(processorPort.getGranularDepth()); } }
public Activity makeActivity() { activity = new Activity(); activity.setName("HelloScript"); activity.setType(URI .create("http://ns.taverna.org.uk/2010/activity/beanshell")); personName = new InputActivityPort(activity, "personName"); personName.setDepth(0); hello = new OutputActivityPort(activity, "hello"); hello.setDepth(0); hello.setGranularDepth(0); return activity; }
public Processor makeProcessor() { processor = new Processor(workflow, "Hello"); processorName = new InputProcessorPort(processor, "name"); processorName.setDepth(0); processorGreeting = new OutputProcessorPort(processor, "greeting"); processorGreeting.setDepth(0); processorGreeting.setGranularDepth(0); // FIXME: Should not need to make default iteration stack makeIterationStrategyStack(processorName).setParent(processor); return processor; }
/** * Constructs an <code>InputPort</code> for the specified * <code>Activity</code> with the specified name. * <p> * The <code>InputPort</code> is added to the <code>Activity</code> (if the * <code>Activity</code> is not <code>null</code>). * * @param activity * the <code>Activity</code> to add this <code>Port</code> to. * Can be <code>null</code> * @param name * the name of the <code>Port</code>. <strong>Must not</strong> * be <code>null</code> or an empty String. */ public InputActivityPort(Activity activity, String name) { super(name); setParent(activity); }
/** * Constructs an <code>InputProcessorPort</code> for the specified * <code>Processor</code> with the specified name. * <p> * The <code>InputPort</code> is added to the <code>Processor</code> (if the * <code>Processor</code> is not <code>null</code>). * * @param parent * the <code>Processor</code> to add this <code>Port</code> to. * Can be <code>null</code> * @param name * the name of the <code>Port</code>. <strong>Must not</strong> * be <code>null</code> or an empty String. */ public InputProcessorPort(Processor parent, String name) { super(name); setParent(parent); }
/** * Constructs an <code>OutputProcessorPort</code> for the specified * <code>Processor</code> with the specified name. * <p> * The <code>OutputPort</code> is added to the <code>Processor</code> (if * the <code>Processor</code> is not <code>null</code>). * * @param parent * the <code>Processor</code> to add this <code>Port</code> to. * Can be <code>null</code> * @param name * the name of the <code>Port</code>. <strong>Must not</strong> * be <code>null</code> or an empty String. */ public OutputProcessorPort(Processor parent, String name) { super(name); setParent(parent); }
/** * Constructs an <code>OutputPort</code> for the specified * <code>Activity</code> with the specified name. * <p> * The <code>OutputPort</code> is added to the <code>Activity</code> (if the * <code>Activity</code> is not <code>null</code>). * * @param activity * the <code>Activity</code> to add this <code>Port</code> to. * Can be <code>null</code> * @param name * the name of the <code>Port</code>. <strong>Must not</strong> * be <code>null</code> or an empty String. */ public OutputActivityPort(Activity activity, String name) { super(name); setParent(activity); }
/** * Constructs an <code>OutputWorkflowPort</code> for the specified * <code>Workflow</code> with the specified name. * <p> * The <code>OutputPort</code> is added to the <code>Workflow</code> (if the * <code>Workflow</code> is not <code>null</code>). * * @param parent * the <code>Workflow</code> to add this <code>Port</code> to. * Can be <code>null</code> * @param name * the name of the <code>Port</code>. <strong>Must not</strong> * be <code>null</code> or an empty String. */ public OutputWorkflowPort(Workflow parent, String name) { super(name); setParent(parent); }
/** * Constructs an <code>InputWorkflowPort</code> for the specified * <code>Workflow</code> with the specified name. * <p> * The <code>InputPort</code> is added to the <code>Workflow</code> (if the * <code>Workflow</code> is not <code>null</code>). * * @param parent * the <code>Workflow</code> to add this <code>Port</code> to. * Can be <code>null</code> * @param name * the name of the <code>Port</code>. <strong>Must not</strong> * be <code>null</code> or an empty String. */ public InputWorkflowPort(Workflow parent, String name) { super(name); setParent(parent); }
private String datalink(Port port) { StringBuilder s = new StringBuilder(); s.append("'"); if (port instanceof ProcessorPort) { ProcessorPort processorPort = (ProcessorPort) port; s.append(escapeName(processorPort.getParent().getName())); s.append(":"); } s.append(escapeName(port.getName())); s.append("'"); return s.toString(); }
@Override public void visitAbstractGranularDepthPort(AbstractGranularDepthPort bean) { Integer granularDepth = bean.getGranularDepth(); if (granularDepth != null) { if (granularDepth < 0) listener.negativeValue(bean, "granularDepth", granularDepth); Integer depth = bean.getDepth(); if (depth != null) if (granularDepth > depth) listener.incompatibleGranularDepth(bean, depth, granularDepth); } if (checkComplete && granularDepth == null) listener.nullField(bean, "granularDepth"); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((desiredDepth == null) ? 0 : desiredDepth.hashCode()); result = prime * result + ((inputProcessorPort == null) ? 0 : inputProcessorPort .hashCode()); return result; }
/** * Get the datalinks leading from this port. * * @return the collection of links. * @see Scufl2Tools#datalinksFrom(SenderPort) */ public List<DataLink> getDatalinksFrom() { return getTools().datalinksFrom(this); } }
/** * Get the datalinks leading to this port. * * @return the collection of links. * @see Scufl2Tools#datalinksFrom(ReceiverPort) */ public List<DataLink> getDatalinksTo() { return getTools().datalinksTo(this); } }
/** * Get the datalinks leading to this port. * * @return the collection of links. * @see Scufl2Tools#datalinksFrom(ReceiverPort) */ public List<DataLink> getDatalinksTo() { return getTools().datalinksTo(this); } }
/** * Get the datalinks leading from this port. * * @return the collection of links. * @see Scufl2Tools#datalinksFrom(SenderPort) */ public List<DataLink> getDatalinksFrom() { return getTools().datalinksFrom(this); } }
@Override public void visitAbstractDepthPort(AbstractDepthPort bean) { Integer depth = bean.getDepth(); if (depth != null && depth < 0) listener.negativeValue(bean, "depth", depth); if (checkComplete && depth == null) listener.nullField(bean, "depth"); }