org.embl.ebi.escience.scuflworkers.biomoby
Class BiomobyProcessor

java.lang.Object
  extended by org.embl.ebi.escience.scufl.Processor
      extended by org.embl.ebi.escience.scuflworkers.biomoby.BiomobyProcessor
All Implemented Interfaces:
java.io.Serializable, IProcessor, HTMLSummarisableProcessor

public class BiomobyProcessor
extends Processor
implements java.io.Serializable, HTMLSummarisableProcessor

A processor based on the Biomoby compliant web services. This processor implementation will contact Biomoby registry in order to find the list of extant ports at creation time.

Version:
$Id: BiomobyProcessor.java,v 1.2 2006/07/10 14:08:14 sowen70 Exp $
Author:
Martin Senger
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.embl.ebi.escience.scufl.IProcessor
ENACTOR
 
Constructor Summary
BiomobyProcessor(ScuflModel model, java.lang.String processorName, org.biomoby.shared.MobyService service, java.lang.String mobyEndpoint)
          Construct a new processor with the given model and name, delegates to the superclass.
BiomobyProcessor(ScuflModel model, java.lang.String processorName, java.lang.String authorityName, java.lang.String serviceName, java.lang.String mobyEndpoint)
          Construct a new processor with the given model and name, delegates to the superclass.
 
Method Summary
 void generatePorts()
          Use the endpoint data to create new ports and attach them to the processor.
 java.lang.String getAuthorityName()
          Get the authority of this Moby-compliant service
 void getDescriptionText()
          Set the description field
 java.net.URL getEndpoint()
          Get the URL for this endpoint.
 java.lang.String getHTMLSummary(java.util.List<HTMLSummarisableProcessor> processors, java.util.Map<java.lang.String,Processor> names)
          Generates the html tables for a list of processors, creating a table grouped by resource host.
 java.lang.String getMobyEndpoint()
          Get the moby central endpoint used to locate this processor
 java.util.Properties getProperties()
          Get the properties for this processor for display purposes
 java.lang.String getResourceHost()
          Get the host for this service
 java.lang.String getServiceName()
          Get the name of this Moby-compliant service
 int htmlTablePlacement()
          int indicating the placement for this type of processor in the order of tables displayed
 
Methods inherited from class org.embl.ebi.escience.scufl.Processor
addAlternate, addAnnotationTemplate, addBreakpoint, addPort, defaultAnnotationTemplates, fireModelEvent, getAlternatesArray, getAlternatesList, getAnnotationTemplates, getBackoff, getBoundInputPorts, getBoundOutputPorts, getCritical, getDefaultWorkers, getDescription, getInputPorts, getIterationStrategy, getLogLevel, getMaximumWorkers, getModel, getName, getOutputPorts, getPorts, getRealLogLevel, getRetries, getRetryDelay, getTimeout, getWorkers, hasBreakpoint, isBoring, isOffline, locatePort, locatePort, removeAlternate, removeAnnotationTemplate, removePort, rmvBreakpoint, setBackoff, setBoring, setCritical, setDescription, setIterationStrategy, setLogLevel, setName, setOffline, setOnline, setRetries, setRetryDelay, setTimeout, setWorkers, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BiomobyProcessor

public BiomobyProcessor(ScuflModel model,
                        java.lang.String processorName,
                        java.lang.String authorityName,
                        java.lang.String serviceName,
                        java.lang.String mobyEndpoint)
                 throws ProcessorCreationException,
                        DuplicateProcessorNameException
Construct a new processor with the given model and name, delegates to the superclass.

Throws:
ProcessorCreationException
DuplicateProcessorNameException

BiomobyProcessor

public BiomobyProcessor(ScuflModel model,
                        java.lang.String processorName,
                        org.biomoby.shared.MobyService service,
                        java.lang.String mobyEndpoint)
                 throws ProcessorCreationException,
                        DuplicateProcessorNameException
Construct a new processor with the given model and name, delegates to the superclass.

Throws:
ProcessorCreationException
DuplicateProcessorNameException
Method Detail

getResourceHost

public java.lang.String getResourceHost()
Get the host for this service

Specified by:
getResourceHost in interface IProcessor
Overrides:
getResourceHost in class Processor

getProperties

public java.util.Properties getProperties()
Get the properties for this processor for display purposes

Specified by:
getProperties in interface IProcessor
Specified by:
getProperties in class Processor
Returns:
a Properties instance containing all processor-specific properties, or optinally null if there are none

getMobyEndpoint

public java.lang.String getMobyEndpoint()
Get the moby central endpoint used to locate this processor


getDescriptionText

public void getDescriptionText()
                        throws ProcessorCreationException
Set the description field

Throws:
ProcessorCreationException

generatePorts

public void generatePorts()
                   throws ProcessorCreationException,
                          PortCreationException,
                          DuplicatePortNameException
Use the endpoint data to create new ports and attach them to the processor. TBD better - for now just take that every service eats a string and produces a string... (MS)

Throws:
ProcessorCreationException
PortCreationException
DuplicatePortNameException

getEndpoint

public java.net.URL getEndpoint()
Get the URL for this endpoint. This is the service endpoint NOT the BioMoby registry one!


getServiceName

public java.lang.String getServiceName()
Get the name of this Moby-compliant service


getAuthorityName

public java.lang.String getAuthorityName()
Get the authority of this Moby-compliant service


getHTMLSummary

public java.lang.String getHTMLSummary(java.util.List<HTMLSummarisableProcessor> processors,
                                       java.util.Map<java.lang.String,Processor> names)
Description copied from interface: HTMLSummarisableProcessor
Generates the html tables for a list of processors, creating a table grouped by resource host.

Specified by:
getHTMLSummary in interface HTMLSummarisableProcessor
Returns:

htmlTablePlacement

public int htmlTablePlacement()
Description copied from interface: HTMLSummarisableProcessor
int indicating the placement for this type of processor in the order of tables displayed

Specified by:
htmlTablePlacement in interface HTMLSummarisableProcessor
Returns: