public List<OutputPort> outputPorts(LocalServiceProcessor processor) throws DuplicatePortNameException, PortCreationException { OutputPort port = new OutputPort(processor, OUTPUTLIST); port.setSyntacticType(getSyntacticType()); List<OutputPort> ports = new ArrayList<OutputPort>(); ports.add(port); return ports; }
public List<OutputPort> outputPorts(LocalServiceProcessor processor) throws DuplicatePortNameException, PortCreationException { OutputPort port = new OutputPort(processor, OUTPUTLIST); port.setSyntacticType(LIST_TYPE); SemanticMarkup metaData = port.getMetadata(); // Is this useful? metaData.addMIMEType(""); List<OutputPort> ports = new ArrayList<OutputPort>(); ports.add(port); return ports; }
public void actionPerformed(ActionEvent ae) { // Add a port to the input model! String portName = addOutputField.getText(); try { OutputPort op = new OutputPort(processor, portName); op.setSyntacticType("'text/plain'"); processor.addPort(op); addOutputField.setText(""); outputTable.revalidate(); outputTable.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 createOutputPort() { String portName = JOptionPane.showInputDialog(this, "Enter the name of the output port to be created", "Create a new output port", JOptionPane.QUESTION_MESSAGE); if (portName != null) { try { OutputPort outputPort = new OutputPort(processor, portName); outputPort.setSyntacticType("'text/plain'"); processor.addPort(outputPort); } 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 { OutputPort op = new OutputPort(processor, addOutputField.getText()); op.setSyntacticType("'text/plain'"); processor.addPort(op); addOutputField.setText(""); outputTable.revalidate(); outputTable.repaint(); } catch (PortCreationException pce) { // } catch (DuplicatePortNameException dpne) { // } } };
/** * Construct a new processor with the given model and * name, delegates to the superclass. */ public StringConstantProcessor(ScuflModel model, String name, String value) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); setBoring(true); theStringValue = value; // Create a single output port try { Port newPort = new OutputPort(this, "value"); newPort.setSyntacticType("'text/plain'"); 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 input?", "Name required", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name != null) { try { model.getWorkflowSourceProcessor() .addPort( new OutputPort(model .getWorkflowSourceProcessor(), 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); } } } }
String syntacticType = outputElement.getAttributeValue("syntactictype", XScufl.XScuflNS); try { OutputPort p = new OutputPort(bp, outputName); if (syntacticType != null) p.setSyntacticType(syntacticType);
Port output_port = new OutputPort(this, "mobyData"); output_port.setSyntacticType("'text/xml'"); this.addPort(output_port);
this.addPort(inPort); Port ns = new OutputPort(this, "namespace"); ns.setSyntacticType("l('text/plain')"); this.addPort(ns); Port id = new OutputPort(this, "id"); id.setSyntacticType("l('text/plain')"); this.addPort(id); if (portName.equals(this.articleNameUsedByService+"_id") || portName.equals(this.articleNameUsedByService+"_ns")) continue; Port outputPort = new OutputPort(this, portName); outputPort.setSyntacticType("l('text/plain')"); this.addPort(outputPort);
locatePort(name); } catch (UnknownPortException upe) { Port newPort = new OutputPort(this, name); if (attribute.getAttributes() != null) { newPort.setSyntacticType("l(l('text/plain'))"); locatePort(name); } catch (UnknownPortException upe) { Port newPort = new OutputPort(this, name); newPort.setSyntacticType(MartServiceUtils.getMimeTypeForFormatter(formatter)); addPort(newPort);
OutputPort subjectOutput = new OutputPort(this, "object"); subjectOutput.setSyntacticType(definition.getTavernaObjectTypeString()); addPort(subjectOutput); OutputPort resultPort = new OutputPort(this, "result"); resultPort.setSyntacticType(definition.getTavernaOutputTypeString()); addPort(resultPort);
OutputPort baseURL = new OutputPort(this, "baseURL"); baseURL.setSyntacticType("'text/plain'"); addPort(baseURL); OutputPort outputRef = new OutputPort(this, "refStdOut"); outputRef.setSyntacticType("'text/plain'"); addPort(outputRef); OutputPort errorRef = new OutputPort(this, "refStdErr"); errorRef.setSyntacticType("'text/plain'"); addPort(errorRef); OutputPort outputString = new OutputPort(this, "stringOut"); outputString.setSyntacticType("'text/plain'"); addPort(outputString); OutputPort outputBinary = new OutputPort(this, "binaryOut"); outputBinary.setSyntacticType("'application/octet-stream'"); addPort(outputBinary);
void addInputPort(String name) throws DuplicatePortNameException, PortCreationException { model.getWorkflowSourceProcessor().addPort( new OutputPort(model.getWorkflowSourceProcessor(), name)); model.forceUpdate(); }
Port p = new OutputPort(this, outputs[i]); p.setSyntacticType("'text/plain'"); addPort(p);
addPort(p); Port p = new OutputPort(this, "value"); p.setSyntacticType("l('text/plain')"); addPort(p);
Port p = new OutputPort(this, outputs[i]); p.setSyntacticType("'text/plain'"); addPort(p);
/** * 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 } }
for (int i = 0; i < ip.length; i++) { String portName = ip[i].getName(); OutputPort port = new OutputPort(m.getWorkflowSourceProcessor(), portName); m.getWorkflowSourceProcessor().addPort(port); m.addDataConstraint(new DataConstraint(m, port, ip[i]));
locatePort(outputs[i].getName()).setSyntacticType(outputs[i].getSyntacticType()); } catch (UnknownPortException upe) { Port newPort = new OutputPort(this, outputs[i].getName()); newPort.setSyntacticType(outputs[i].getSyntacticType());