public void setValueAt(Object aValue, int rowIndex, int columnIndex) { if (columnIndex > 0) { int listCount = 0; String prettyMime = null; switch (columnIndex) { case 1: listCount = ((Integer) aValue).intValue(); prettyMime = (String) getValueAt(rowIndex, 2); break; case 2: listCount = ((Integer) getValueAt(rowIndex, 1)).intValue(); prettyMime = (String) aValue; break; } String mimeType = "bleh"; Iterator entryIterator = DataThing.mimeTypes.entrySet().iterator(); while (entryIterator.hasNext()) { Map.Entry entry = (Map.Entry) entryIterator.next(); if (entry.getValue().equals(prettyMime)) { mimeType = (String) entry.getKey(); } } getPorts()[rowIndex].setSyntacticType(getSyntacticType(listCount, mimeType)); } }
public void setValueAt(Object aValue, int rowIndex, int columnIndex) { if (columnIndex > 0) { int listCount = 0; String prettyMime = null; switch (columnIndex) { case 1: listCount = ((Integer) aValue).intValue(); prettyMime = (String) getValueAt(rowIndex, 2); break; case 2: listCount = ((Integer) getValueAt(rowIndex, 1)).intValue(); prettyMime = (String) aValue; break; } String mimeType = "bleh"; Iterator entryIterator = DataThing.mimeTypes.entrySet().iterator(); while (entryIterator.hasNext()) { Map.Entry entry = (Map.Entry) entryIterator.next(); if (entry.getValue().equals(prettyMime)) { mimeType = (String) entry.getKey(); } } getPorts()[rowIndex].setSyntacticType(getSyntacticType( listCount, mimeType)); } }
new_port.setSyntacticType("'text/plain'"); } else if (input_type.equals("string[]")) { new_port.setSyntacticType("l('text/plain')"); } else if (input_type.equals("byte[]")) { new_port.setSyntacticType("'application/octet-stream'"); } else if (input_type.equals("byte[][]")) { new_port.setSyntacticType("l('application/octet-stream')"); new_port.setSyntacticType("'text/plain'"); } else if (output_type.equals("string[]")) { new_port.setSyntacticType("l('text/plain')"); } else if (output_type.equals("byte[]")) { new_port.setSyntacticType("'application/octet-stream'"); } else if (output_type.equals("byte[][]")) { new_port.setSyntacticType("l('application/octet-stream')");
/** * 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 } }
input_port.setSyntacticType("'text/plain'"); this.addPort(input_port); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port); || serviceName.equalsIgnoreCase("DateTime")) { input_port = new InputPort(this, "value"); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port); } else { output_port.setSyntacticType("'text/xml'"); this.addPort(output_port);
|| serviceName.equalsIgnoreCase("float")) { input_port = new InputPort(this, "value"); input_port.setSyntacticType("'text/plain'"); this.addPort(input_port); } else {
input_port.setSyntacticType("'text/xml)"); this.addPort(input_port); break; input_port.setSyntacticType("'text/xml'"); this.addPort(input_port); break;
/** * 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 } }
Port newPort = new InputPort(this, name + "_filter"); if (filter.isList()) { newPort.setSyntacticType("l('text/plain')"); } else { newPort.setSyntacticType("'text/plain'");
inPort.setSyntacticType("'text/xml'"); this.addPort(inPort); ns.setSyntacticType("l('text/plain')"); this.addPort(ns); Port id = new OutputPort(this, "id"); id.setSyntacticType("l('text/plain')"); this.addPort(id); continue; Port outputPort = new OutputPort(this, portName); outputPort.setSyntacticType("l('text/plain')"); this.addPort(outputPort);
Port newPort = new OutputPort(this, name); if (attribute.getAttributes() != null) { newPort.setSyntacticType("l(l('text/plain'))"); } else { newPort.setSyntacticType("l('text/plain')"); } catch (UnknownPortException upe) { Port newPort = new OutputPort(this, name); newPort.setSyntacticType(MartServiceUtils.getMimeTypeForFormatter(formatter)); addPort(newPort);
p.setSyntacticType("'text/plain'"); addPort(p); p.setSyntacticType("'text/plain'"); addPort(p);
p.setSyntacticType("'text/plain'"); addPort(p); p.setSyntacticType("'text/plain'"); addPort(p);
p.setSyntacticType("l'text/plain')"); addPort(p); p.setSyntacticType("l('text/plain')"); addPort(p); } catch (DuplicatePortNameException dpne) {
inPort.setSyntacticType("'text/xml'"); this.addPort(inPort); } else { inPort.setSyntacticType("l('text/xml')"); this.addPort(inPort); input_port.setSyntacticType(isInputCollection ? "l('text/xml')" : "'text/xml'"); this.addPort(input_port); outPort.setSyntacticType("'text/xml'"); this.addPort(outPort); } else { Port outPort = new OutputPort(this, simples[y].getDataType().getName() + "(Collection - '" + collectionName + "')"); outPort.setSyntacticType("l('text/xml')"); this.addPort(outPort); outPort.setSyntacticType("l('text/xml')"); this.addPort(outPort); output_port.setSyntacticType(isOutputCollection ? "l('text/xml')" : "'text/xml'"); this.addPort(output_port);
locatePort(outputs[i].getName()).setSyntacticType(outputs[i].getSyntacticType()); } catch (UnknownPortException upe) { Port newPort = new OutputPort(this, outputs[i].getName()); newPort.setSyntacticType(outputs[i].getSyntacticType()); locatePort(inputs[i].getName()).setSyntacticType(inputs[i].getSyntacticType()); } catch (UnknownPortException upe) { Port newPort = new InputPort(this, inputs[i].getName()); newPort.setSyntacticType(inputs[i].getSyntacticType());