|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.embl.ebi.escience.scuflworkers.ProcessorHelper
public class ProcessorHelper
Provides rendering and other hints for different processor implementations, including preferred colours and icons. The data used by this class is loaded at classload time from all 'taverna.properties' files found by the system classloader, these files contain the processor specific configuration that this class acts as an interface to. An example for the Soaplab processor type is shown below :
taverna.processor.soaplabwsdl.class = org.embl.ebi.escience.scuflworkers.soaplab.SoaplabProcessor taverna.processor.soaplabwsdl.xml = org.embl.ebi.escience.scuflworkers.soaplab.SoaplabXMLHandler taverna.processor.soaplabwsdl.colour = lightgoldenrodyellow taverna.processor.soaplabwsdl.icon = org/embl/ebi/escience/scuflui/soaplab.gif taverna.processor.soaplabwsdl.taskclass = uk.ac.soton.itinnovation.taverna.enactor.entities.SoaplabTaskTo load additional processor types for enactment and display within the workbench, you will need to create the appropriate helper classes such as the XML handler and then point to the class names in a 'taverna.properties' file. I suggest you package all these items into a single .jar file, in which case simply ensuring that the classpath contains your .jar should allow everything to work.
Constructor Summary | |
---|---|
ProcessorHelper()
|
Method Summary | |
---|---|
static org.jdom.Element |
elementForProcessor(Processor p)
Given a processor instance, return the 'spec' block of XML that represents the processor in the XScufl language. |
static org.jdom.Element |
elementForProcessor(Processor p,
boolean decorations)
Given a processor instance, return the 'spec' block of XML that represents the processor in the XScufl language. |
static ProcessorEditor |
getEditorForTagName(java.lang.String tagName)
Given a tag name, return the in place editor for the processor |
static javax.swing.ImageIcon |
getIconForTagName(java.lang.String tagName)
Given a tag name, return the preferred image icon for that tag. |
static java.lang.String |
getPreferredColour(Processor p)
Given a processor instance, return the preferred colour to be used for UI representations. |
static javax.swing.ImageIcon |
getPreferredIcon(Processor p)
Given a processor instance, return an image icon to be used in, for example, tree renderer objects. |
static java.lang.String |
getTagNameForClassName(java.lang.String className)
Given a class name, return the tag name used by this helper class as an index for the other categories such as icons. |
static java.lang.String |
getTaskClassName(Processor p)
Given a processor instance, return the fully qualified class name of a TavernaTask for the myGrid enactor to invoke the operation represented by the processor |
static ProcessorTaskWorker |
getTaskWorker(Processor p)
Given a processor instance, return a concrete task worker for that instance. |
static XMLHandler |
getXMLHandlerForTagName(java.lang.String tagname)
Get the xml handler for a given tag name |
static ProcessorFactory |
loadFactoryFromXML(org.jdom.Element specNode)
Return a factory capable of producing the supplied spec of processor. |
static Processor |
loadProcessorFromXML(org.jdom.Element processorNode,
ScuflModel model,
java.lang.String name)
Spit back a processor given a chunk of xml, the element passed in being the 'processor' tag return null if we can't handle it |
static void |
populateMaps()
Populates the class level maps and lists with details about the processors and their scavengers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProcessorHelper()
Method Detail |
---|
public static void populateMaps()
public static java.lang.String getTaskClassName(Processor p)
public static ProcessorTaskWorker getTaskWorker(Processor p)
public static java.lang.String getTagNameForClassName(java.lang.String className)
public static ProcessorEditor getEditorForTagName(java.lang.String tagName)
public static XMLHandler getXMLHandlerForTagName(java.lang.String tagname)
public static javax.swing.ImageIcon getIconForTagName(java.lang.String tagName)
public static java.lang.String getPreferredColour(Processor p)
public static javax.swing.ImageIcon getPreferredIcon(Processor p)
public static org.jdom.Element elementForProcessor(Processor p)
public static org.jdom.Element elementForProcessor(Processor p, boolean decorations)
If the decorations flag is set to true this will set the various attributes (maxretries, retrydelay, retrybackoff, critical, breakpoint), otherwise these will not be set. We need to be able to turn this off to allow the comparison to nodes in the services panel to function correctly - this is a textual comparison and these nodes never have these attributes.
public static ProcessorFactory loadFactoryFromXML(org.jdom.Element specNode)
public static Processor loadProcessorFromXML(org.jdom.Element processorNode, ScuflModel model, java.lang.String name) throws ProcessorCreationException, DuplicateProcessorNameException, XScuflFormatException
ProcessorCreationException
DuplicateProcessorNameException
XScuflFormatException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |