|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.pipet.api.AbstractModule
net.sf.pipet.api.VersionedModule
net.sf.pipet.api.DefaultModuleInterface
net.sf.pipet.api.SimpleInputOutputModule
public abstract class SimpleInputOutputModule
Abstract base class for a PipeT module.
Subclasses must provide a title and a description via the constructor, and implement run(java.io.InputStream[], java.io.OutputStream, net.sf.pipet.api.ModuleAttributes, net.sf.qxs.messenger.Messenger).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.sf.pipet.api.ModuleInterface |
|---|
ModuleInterface.ModuleConfigurator, ModuleInterface.ModuleInstance |
| Field Summary | |
|---|---|
protected static String |
INPUT_NAME
|
protected static String |
OUTPUT_NAME
|
| Fields inherited from interface net.sf.pipet.api.ModuleInterface |
|---|
ATT_PIPELINE_NAME, FAIL_CONFIGURATOR, UI_GUI, UI_NONINTERACTIVE |
| Constructor Summary | |
|---|---|
SimpleInputOutputModule(String title,
String description)
Constructs a module with default input and output types. |
|
SimpleInputOutputModule(String title,
String description,
String input_type,
String output_type)
Constructs a module. |
|
| Method Summary | |
|---|---|
ModuleInterface.ModuleInstance |
createInstance(ModuleData data,
net.sf.qxs.messenger.Messenger logger)
Instantiates a module to be part of a pipeline instance. |
String |
getDescription(ModuleAttributes atts)
Returns a description of the module. |
Map<String,String> |
getInputPipeTypes(ModuleAttributes atts)
Returns an empty set. |
protected String |
getInputType()
|
Map<String,String> |
getOutputPipeTypes(ModuleAttributes atts)
Returns an empty set. |
protected String |
getOutputType()
|
String |
getTitle(ModuleAttributes atts)
Returns the title (a short description) of the module. |
abstract boolean |
run(InputStream[] is,
OutputStream os,
ModuleAttributes atts,
net.sf.qxs.messenger.Messenger messenger)
Runs the module in a pipeline. |
| Methods inherited from class net.sf.pipet.api.DefaultModuleInterface |
|---|
getInstallationConfigurator, getPipelineConfigurator, getRuntimeConfigurator |
| Methods inherited from class net.sf.pipet.api.VersionedModule |
|---|
getAPIVersionString |
| Methods inherited from class net.sf.pipet.api.AbstractModule |
|---|
getGlobalParameters, getInputPipeNames, getLeftOver, getOutputPipeNames, getPipelineParameters, getPipeTypes, getRuntimeParameters, isAvailable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String INPUT_NAME
protected static final String OUTPUT_NAME
| Constructor Detail |
|---|
public SimpleInputOutputModule(String title,
String description)
title - description -
public SimpleInputOutputModule(String title,
String description,
String input_type,
String output_type)
title - description - input_type - the content type of the module's input, or null if no input is accepted.output_type - the content type of the module's output, or null if no output is accepted.| Method Detail |
|---|
protected String getInputType()
protected String getOutputType()
public String getTitle(ModuleAttributes atts)
ModuleInterface
getTitle in interface ModuleInterfacegetTitle in class AbstractModuleatts - The module data.public String getDescription(ModuleAttributes atts)
ModuleInterface
atts - The module data.
public ModuleInterface.ModuleInstance createInstance(ModuleData data,
net.sf.qxs.messenger.Messenger logger)
throws Exception
ModuleInterface
data - an object which provides access to runtime data needed by the module.logger - a logging interface.
Exception - if an unexpected error occurred.public Map<String,String> getInputPipeTypes(ModuleAttributes atts)
DefaultModuleInterface
getInputPipeTypes in interface ModuleInterfacegetInputPipeTypes in class DefaultModuleInterfaceatts - The module data.public Map<String,String> getOutputPipeTypes(ModuleAttributes atts)
DefaultModuleInterface
getOutputPipeTypes in interface ModuleInterfacegetOutputPipeTypes in class DefaultModuleInterfaceatts - The module attributes.
public abstract boolean run(InputStream[] is,
OutputStream os,
ModuleAttributes atts,
net.sf.qxs.messenger.Messenger messenger)
is - the module's input.os - the module's output.atts - parameters for the module.messenger - a Messenger object for sending messages back to the user.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||