public List<InputPort> inputPorts(LocalServiceProcessor processor) throws DuplicatePortNameException, PortCreationException { InputPort port = new InputPort(processor, INPUTLIST); port.setSyntacticType(getSyntacticType()); List<InputPort> ports = new ArrayList<InputPort>(); ports.add(port); InputPort fromIndexPort = new InputPort(processor, FROMINDEX); fromIndexPort.setSyntacticType(LocalWorker.STRING); ports.add(fromIndexPort); InputPort toIndexPort = new InputPort(processor, TOINDEX); toIndexPort.setSyntacticType(LocalWorker.STRING); ports.add(toIndexPort); return ports; }
public NotificationProcessor(ScuflModel model, String name) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); try { Port inputPort1 = new InputPort(this, "publishMessage"); Port inputPort2 = new InputPort(this, "Topic"); addPort(inputPort1); addPort(inputPort2); } catch (Exception e) { throw new ProcessorCreationException("Couldn't create NotificationProcessor"); } }
public List<InputPort> inputPorts(LocalServiceProcessor processor) throws DuplicatePortNameException, PortCreationException { InputPort port = new InputPort(processor, INPUTLIST); port.setSyntacticType(getSyntacticType()); List<InputPort> ports = new ArrayList<InputPort>(); ports.add(port); return ports; }
public void actionPerformed(ActionEvent ae) { // Add a port to the input model! String portName = addInputField.getText(); try { InputPort ip = new InputPort(processor, portName); ip.setSyntacticType("'text/plain'"); processor.addPort(ip); addInputField.setText(""); inputTable.revalidate(); inputTable.repaint(); } catch (PortCreationException ex) { logger.warn("Could not create port " + portName, ex); } catch (DuplicatePortNameException ex) { logger.warn("Duplicate port " + portName, ex); } } };
/** * Method for creating a new input port */ private void createInputPort() { String portName = JOptionPane.showInputDialog(this, "Enter the name of the input port to be created", "Create a new input port", JOptionPane.QUESTION_MESSAGE); if (portName != null) { try { InputPort inputPort = new InputPort(processor, portName); inputPort.setSyntacticType("'text/plain'"); processor.addPort(inputPort); } catch (PortCreationException pce) { JOptionPane.showMessageDialog(null, "Can not create port: " + pce.getMessage(), "Error creating port", JOptionPane.ERROR_MESSAGE); } catch (DuplicatePortNameException dpne) { JOptionPane.showMessageDialog(null, "A port with the name '" + portName + "' already exists, specify different name", "Error creating port", JOptionPane.ERROR_MESSAGE); } } }
public void actionPerformed(ActionEvent ae) { // Add a port to the input model! try { InputPort ip = new InputPort(processor, addInputField.getText()); ip.setSyntacticType("'text/plain'"); processor.addPort(ip); addInputField.setText(""); inputTable.revalidate(); inputTable.repaint(); } catch (PortCreationException pce) { // } catch (DuplicatePortNameException dpne) { // } } };
|| serviceName.equalsIgnoreCase("Integer") || serviceName.equalsIgnoreCase("float")) { input_port = new InputPort(this, "value"); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port);
Port input_port = new InputPort(this, "namespace"); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port); input_port = new InputPort(this, "id"); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port); input_port = new InputPort(this, "article name"); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port); || serviceName.equalsIgnoreCase("float") || serviceName.equalsIgnoreCase("DateTime")) { input_port = new InputPort(this, "value"); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port);
/** * Construct a new processor with the given model and * name, delegates to the superclass. */ public RDFGeneratorProcessor(ScuflModel model, String name) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); // Create the subject, verb, object ports try { Port newSubjectPort = new InputPort(this, "subject"); Port newVerbPort = new InputPort(this, "verb"); Port newObjectPort = new InputPort(this, "object"); newSubjectPort.setSyntacticType("'text/plain'"); newVerbPort.setSyntacticType("'text/plain'"); newObjectPort.setSyntacticType("'text/plain'"); this.addPort(newSubjectPort); this.addPort(newVerbPort); this.addPort(newObjectPort); Port newPort = new OutputPort(this, "statement"); newPort.setSyntacticType("'text/xml'"); this.addPort(newPort); } catch (Exception ex) { // should never happen } }
public void actionPerformed(ActionEvent e) { Component parent = UIUtils.getActionEventParentWindow(e); String name = (String) JOptionPane.showInputDialog(parent, "Name for the new workflow output?", "Name required", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name != null) { try { model.getWorkflowSinkProcessor().addPort( new InputPort(model.getWorkflowSinkProcessor(), name)); model.forceUpdate(); } catch (PortCreationException pce) { JOptionPane.showMessageDialog(parent, "Port creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } catch (DuplicatePortNameException dpne) { JOptionPane.showMessageDialog(parent, "Duplicate name : \n" + dpne.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } }
public void testCreationDuplicateOtherType() throws Exception { // Duplicates are OK if they are different classes. // (But what if they are subclassing each other?) proc.addPort(new InputPort(proc, "sillyport")); new DummyPort(proc, "sillyport"); }
locatePort(name + "_filter"); } catch (UnknownPortException upe) { Port newPort = new InputPort(this, name + "_filter"); if (filter.isList()) { newPort.setSyntacticType("l('text/plain')");
String syntacticType = inputElement.getAttributeValue("syntactictype", XScufl.XScuflNS); try { InputPort p = new InputPort(bp, inputName); if (syntacticType != null) p.setSyntacticType(syntacticType);
void addOutputPort(String name) throws DuplicatePortNameException, PortCreationException { model.getWorkflowSinkProcessor().addPort( new InputPort(model.getWorkflowSinkProcessor(), name)); model.forceUpdate(); }
InputPort inputRef = new InputPort(this, "refIn"); inputRef.setSyntacticType("'text/plain'"); addPort(inputRef); InputPort inputString = new InputPort(this, "stringIn"); inputString.setSyntacticType("'text/plain'"); addPort(inputString); InputPort inputBinary = new InputPort(this, "binaryIn"); inputBinary.setSyntacticType("'application/octet-stream'"); addPort(inputBinary); InputPort params = new InputPort(this, "params"); params.setSyntacticType("'text/plain'"); addPort(params);
Port p = new InputPort(this, inputs[i]); p.setSyntacticType("'text/plain'"); addPort(p);
Port p = new InputPort(this, inputs[i]); p.setSyntacticType("'text/plain'"); addPort(p);
for (int i = 0; i < op.length; i++) { String portName = op[i].getName(); InputPort port = new InputPort(m.getWorkflowSinkProcessor(), portName); m.getWorkflowSinkProcessor().addPort(port); m.addDataConstraint(new DataConstraint(m, op[i], port));
locatePort(inputs[i].getName()).setSyntacticType(inputs[i].getSyntacticType()); } catch (UnknownPortException upe) { Port newPort = new InputPort(this, inputs[i].getName()); newPort.setSyntacticType(inputs[i].getSyntacticType());