本文整理了Java中org.embl.ebi.escience.scufl.Processor.getName()
方法的一些代码示例,展示了Processor.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Processor.getName()
方法的具体详情如下:
包路径:org.embl.ebi.escience.scufl.Processor
类名称:Processor
方法名:getName
暂无
代码示例来源:origin: uk.org.mygrid.taverna.scufl.scufl-ui-components/template-editor
public String getName() {
if (theProcessor == null) {
return "Template editor for unknown processor";
} else {
return "Template editor for " + theProcessor.getName();
}
}
代码示例来源:origin: org.biomoby/taverna-biomoby
public JComponent getComponent(Processor processor) {
return new JTree(new String[] { processor.getName() });
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
/**
* @param processor
*/
public void addOutputProcessor(Processor processor)
{
if (!processor.getName().equals("SCUFL_INTERNAL_SINKPORTS"))
{
outputProcessors.add(processor);
}
}
代码示例来源:origin: uk.org.mygrid.taverna/taverna-enactor
public String toString() {
StringBuffer sb = new StringBuffer();
sb
.append("Processor '" + processor.getName()
+ "' failed, cause :\n ");
sb.append(cause.toString());
sb.append("\n");
return sb.toString();
}
代码示例来源:origin: uk.org.mygrid.taverna/taverna-enactor
public String toString() {
StringBuffer sb = new StringBuffer();
sb
.append("Nested Workflow '" + processor.getName()
+ "' failed, cause :\n ");
sb.append(cause.toString());
sb.append("\n");
return sb.toString();
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public Object getValue(Object node)
{
if(node instanceof Processor)
{
return ((Processor)node).getName();
}
else if(node instanceof Port)
{
return ((Port)node).getName();
}
return "";
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public void actionPerformed(ActionEvent ae) {
String ccName = target.getName() + "_BLOCKON_" + controller.getName();
try {
// Constraints created by this menu are, for now,
// always
// of the form 'block scheduled to running until
// completed',
// as this is all the enactor can currently support.
ConcurrencyConstraint cc = new ConcurrencyConstraint(model, ccName, controller, target,
ConcurrencyConstraint.SCHEDULED, ConcurrencyConstraint.RUNNING,
ConcurrencyConstraint.COMPLETED);
model.addConcurrencyConstraint(cc);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Something wasn't happy : \n" + e.getMessage(),
"Exception!", JOptionPane.ERROR_MESSAGE);
}
}
});
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public void actionPerformed(ActionEvent ae) {
String ccName = target.getName() + "_BLOCKON_" + controller.getName();
try {
// Constraints created by this menu are, for now,
// always
// of the form 'block scheduled to running until
// completed',
// as this is all the enactor can currently support.
ConcurrencyConstraint cc = new ConcurrencyConstraint(model, ccName, controller, target,
ConcurrencyConstraint.SCHEDULED, ConcurrencyConstraint.RUNNING,
ConcurrencyConstraint.COMPLETED);
model.addConcurrencyConstraint(cc);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Something wasn't happy : \n" + e.getMessage(),
"Exception!", JOptionPane.ERROR_MESSAGE);
}
}
});
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public String toString()
{
if (sourcePort.getProcessor().getName().equals("SCUFL_INTERNAL_SOURCEPORTS"))
{
return sourcePort.getName();
}
return sourcePort.getProcessor().getName() + ":" + sourcePort.getName();
}
代码示例来源:origin: uk.org.mygrid.provenance/logbook
private Processor getProcessor(String name) throws Exception {
Processor processor;
for (int j = 0; j < processors.length; j++) {
if (processors[j].getName().equals(name)) {
processor = processors[j];
return processor;
}
}
throw new Exception("Processor not found");
}
代码示例来源:origin: uk.org.mygrid.taverna/taverna-enactor
/**
* Print a summary of the event details
*/
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("Process '" + processor.getName() + "' complete ");
if (isIterating) {
sb.append("(iterating)");
} else {
sb.append("(simple)");
}
sb.append("\n");
String prefix = "in ";
for (Iterator i = inputMap.keySet().iterator(); i.hasNext();) {
String inputKey = (String) i.next();
DataThing inputThing = (DataThing) inputMap.get(inputKey);
String mainLSID = inputThing.getLSID(inputThing.getDataObject());
sb.append(prefix + "'" + inputKey + "'->" + mainLSID + "\n");
prefix = " ";
}
prefix = "out ";
for (Iterator i = outputMap.keySet().iterator(); i.hasNext();) {
String outputKey = (String) i.next();
DataThing outputThing = (DataThing) outputMap.get(outputKey);
String mainLSID = outputThing.getLSID(outputThing.getDataObject());
sb.append(prefix + "" + mainLSID + "->'" + outputKey + "'\n");
prefix = " ";
}
return sb.toString();
}
代码示例来源:origin: uk.org.mygrid.taverna/taverna-enactor
/**
* Print a summary of the event details
*/
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("NestedWorkflow '" + processor.getName() + "' complete ");
if (isIterating) {
sb.append("(iterating)");
} else {
sb.append("(simple)");
}
sb.append("\n");
String prefix = "in ";
for (Iterator i = inputMap.keySet().iterator(); i.hasNext();) {
String inputKey = (String) i.next();
DataThing inputThing = (DataThing) inputMap.get(inputKey);
String mainLSID = inputThing.getLSID(inputThing.getDataObject());
sb.append(prefix + "'" + inputKey + "'->" + mainLSID + "\n");
prefix = " ";
}
prefix = "out ";
for (Iterator i = outputMap.keySet().iterator(); i.hasNext();) {
String outputKey = (String) i.next();
DataThing outputThing = (DataThing) outputMap.get(outputKey);
String mainLSID = outputThing.getLSID(outputThing.getDataObject());
sb.append(prefix + "" + mainLSID + "->'" + outputKey + "'\n");
prefix = " ";
}
return sb.toString();
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-workflow
private void doChildren(ScuflModel model) {
Processor[] processors = model.getProcessors();
for (int i = 0; i < processors.length; i++) {
// Create a new node for the factory corresponding to this processor
String tagName = ProcessorHelper.getTagNameForClassName(processors[i].getClass().getName());
XMLHandler xh = ProcessorHelper.getXMLHandlerForTagName(tagName);
logger.info(tagName + ":" + processors[i].getName());
if (xh != null) {
ProcessorFactory pf = xh.getFactory(xh.elementForProcessor(processors[i]));
pf.setName(processors[i].getName());
if (processors[i].getDescription().equals("") == false) {
pf.setDescription(processors[i].getDescription());
} else {
if (processors[i] instanceof WorkflowProcessor) {
// Nested workflow with no description, explicitly set
// it to say
// this otherwise a 'fetch descriptions' will attempt to
// load it
// in online mode, this could well fail.
pf.setDescription("<font color=\"red\">No description supplied for nested workflow</font>");
}
}
add(new DefaultMutableTreeNode(pf));
}
}
}
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public Object valueForCellChanged(Object cell, Object newValue)
{
if (cell instanceof Processor)
{
Processor processor = (Processor) cell;
processor.setName(newValue.toString());
return processor.getName();
}
if (cell instanceof Port) {
Port port = (Port) cell;
if (isPortOnWorkflowEdge(port)) {
for (Port p : port.getProcessor().getPorts()) { //prevent renaming if a port already has that name
if (p.getName().equals(newValue.toString())) {
return port.getName();
}
}
port.setName(newValue.toString());
return port.getName();
}
}
return null;
}
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl.scufl-ui-components/enactor-invocation
public EnactorStatusTableModel(ScuflModel scufl) {
this.scuflModel = scufl;
// One row for each processor.
Processor[] processors = scuflModel.getProcessors();
rows = processors.length;
data = new Object[rows][columnNames.length];
// Put appropriate content in the rows
for (int i = 0; i < rows; i++) {
Processor p = processors[i];
// do the icon
data[i][0] = org.embl.ebi.escience.scuflworkers.ProcessorHelper
.getPreferredIcon(p);
// do the name
data[i][1] = p.getName();
// do status
data[i][2] = "No data";
// do start time
data[i][3] = "--";
// do end time
data[i][4] = "--";
// do the breakpoint
if (p.hasBreakpoint())
data[i][5] = TavernaIcons.tickIcon;
else
data[i][5] = TavernaIcons.nullIcon;
}
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl.scufl-ui-components/enactor-invocation
public void mouseClicked(MouseEvent e) {
final Processor theProcessor = getPointedProcessor(e.getX(), e
.getY(), processorTable);
if (theProcessor != null) {
if (!theProcessor.hasBreakpoint()) {
theProcessor.addBreakpoint();
try {
statusTableModel.update(getStatusText());
} catch (InvalidStatusReportException isre) {
}
processorTable.repaint();
workflowInstance.pause(theProcessor.getName());
} else {
theProcessor.rmvBreakpoint();
try {
statusTableModel.update(getStatusText());
} catch (InvalidStatusReportException isre) {
}
processorTable.repaint();
workflowInstance.resume(theProcessor.getName());
}
}
}
代码示例来源:origin: net.sf.taverna.t2.compatibility/compatibility-impl
@Test
public void testBeanshellActivityTranslator() throws Exception {
ScuflModel model = loadScufl("beanshell.xml");
Processor p = model.getProcessorsOfType(BeanshellProcessor.class)[0];
assertEquals("beanshell", p.getName());
ActivityTranslator<?> translator = ActivityTranslatorFactory
.getTranslator(p);
Activity<?> s = translator.doTranslation(p);
assertEquals("net.sf.taverna.t2.activities.beanshell.BeanshellActivity", s.getClass().getName());
}
代码示例来源:origin: net.sf.taverna.t2/compatibility-impl
@Test
public void testBeanshellActivityTranslator() throws Exception {
ScuflModel model = loadScufl("beanshell.xml");
Processor p = model.getProcessorsOfType(BeanshellProcessor.class)[0];
assertEquals("beanshell", p.getName());
ActivityTranslator<?> translator = ActivityTranslatorFactory
.getTranslator(p);
Activity<?> s = translator.doTranslation(p);
assertEquals("net.sf.taverna.t2.activities.beanshell.BeanshellActivity", s.getClass().getName());
}
代码示例来源:origin: net.sf.taverna.t2/cyclone-impl
@Test
public void testBeanshellActivityTranslator() throws Exception {
setUpRavenRepository();
ScuflModel model = loadScufl("beanshell.xml");
Processor p = model.getProcessorsOfType(BeanshellProcessor.class)[0];
assertEquals("beanshell", p.getName());
ActivityTranslator<?> translator = ActivityTranslatorFactory
.getTranslator(p);
Activity<?> s = translator.doTranslation(p);
assertEquals("net.sf.taverna.t2.activities.beanshell.BeanshellActivity", s.getClass().getName());
}
代码示例来源:origin: net.sf.taverna.t2/compatibility-impl
if (!t1InputPort.isBound()
&& t1InputPort.getDefaultValue() != null) {
String processorName = t1Processor.getName() + "_"
+ sanitiseName(t1InputPort.getName())
+ "_defaultValue";
内容来源于网络,如有侵权,请联系作者删除!