org.embl.ebi.escience.scuflworkers
Class ProcessorFactory

java.lang.Object
  extended by org.embl.ebi.escience.scuflworkers.ProcessorFactory
Direct Known Subclasses:
APIConsumerProcessorFactory, APProcessorFactory, BeanshellProcessorFactory, BiomartProcessorFactory, BiomobyObjectProcessorFactory, BiomobyProcessorFactory, BiomobyProcessorFactory, BSFProcessorFactory, InfernoProcessorFactory, LocalServiceProcessorFactory, MobyParseDatatypeProcessorFactory, NotificationProcessorFactory, RDFGeneratorProcessorFactory, RservProcessorFactory, RshellProcessorFactory, SoaplabProcessorFactory, StringConstantProcessorFactory, TalismanProcessorFactory, WorkflowProcessorFactory, WSDLBasedProcessorFactory

public abstract class ProcessorFactory
extends java.lang.Object

Implementing classes are capable of creating a new processor and attaching it to a model when supplied with the new processor name and a reference to the model. The intention is that service scavengers should create an implementation of this for each service they find and that these should then be used as the user objects inside a default tree model to allow simple service selection and addition to a ScuflModel

Author:
Tom Oinn

Constructor Summary
ProcessorFactory()
           
 
Method Summary
 Processor createProcessor(java.lang.String name, ScuflModel model)
          Instantiate a new processor with the supplied name and bind it to the specified model.
 java.lang.String getDescription()
          Get a description for the factory
 java.lang.String getName()
          Get a name for this factory
abstract  java.lang.Class getProcessorClass()
          Return the Class object describing the processor this factory would build
abstract  java.lang.String getProcessorDescription()
          Describe the processor that would be created by this factory were the createProcessor method invoked
 org.jdom.Element getXMLFragment()
          Return the XML 'spec' element that this factory will use to build its processor instances
 void setDescription(java.lang.String newDescription)
          Set the description
 void setName(java.lang.String newName)
          Set the name
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessorFactory

public ProcessorFactory()
Method Detail

createProcessor

public final Processor createProcessor(java.lang.String name,
                                       ScuflModel model)
                                throws ProcessorCreationException,
                                       DuplicateProcessorNameException
Instantiate a new processor with the supplied name and bind it to the specified model. This in turn uses the XML handling code defined by the XMLHandler and the fragment generated by the getXMLFragment() method.

Throws:
ProcessorCreationException
DuplicateProcessorNameException

getProcessorDescription

public abstract java.lang.String getProcessorDescription()
Describe the processor that would be created by this factory were the createProcessor method invoked


getProcessorClass

public abstract java.lang.Class getProcessorClass()
Return the Class object describing the processor this factory would build


getXMLFragment

public final org.jdom.Element getXMLFragment()
Return the XML 'spec' element that this factory will use to build its processor instances


getName

public final java.lang.String getName()
Get a name for this factory


setName

public final void setName(java.lang.String newName)
Set the name


setDescription

public final void setDescription(java.lang.String newDescription)
Set the description


getDescription

public final java.lang.String getDescription()
Get a description for the factory


toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object