de.dfki.lt.sdl
Class Modules

java.lang.Object
  extended by de.dfki.lt.sdl.Modules
All Implemented Interfaces:
IModule
Direct Known Subclasses:
chunkiermrs_de, chunkiermrs_en, rmrsmerge, SproutModules, XsltModules

public abstract class Modules
extends java.lang.Object
implements IModule

the abstract superclass of all modules, implementing some default functionality which can be inherited by a concrete implementation; default implementation is given for o clear() o init() o getInput() o setInput() o getOutput() o setOutput() NO useful implementation is given for the unary method o run() only an UnsupportedOperationException is thrown

Since:
JDK 1.3
See Also:
IMediator, Mediators, IModule

Constructor Summary
protected Modules()
          since Modules() is an abstract class, this constructor is only indirectly called from subclasses by using super(); effects (at the moment): the constructor clears input and output (null value)
 
Method Summary
 void clear()
          the default implementation of clear() assigns the null value to both input and output; the domain and range of this module is NOT changed; additional effects must be implemented by overriding clear() in subclasses of this class
 java.lang.Object getInput()
          returns the input of this module
 java.lang.Object getOutput()
          returns the result of the computation of this module
 void init(java.lang.String[] initArgs)
          the default implementation of init() has no effect on the module; effects must be implemented by overriding init() in subclasses of this class (if this is needed)
 java.lang.Object run(java.lang.Object input)
          this default method does NOT provide a useful implementation for run(); instead, an UnsupportedOperationException is thrown
 java.lang.Object setInput(java.lang.Object input)
          sets the input of this module and returns the value
 java.lang.Object setOutput(java.lang.Object output)
          sets the output of this module and returns the value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Modules

protected Modules()
since Modules() is an abstract class, this constructor is only indirectly called from subclasses by using super(); effects (at the moment): the constructor clears input and output (null value)

Method Detail

run

public java.lang.Object run(java.lang.Object input)
                     throws java.lang.UnsupportedOperationException
this default method does NOT provide a useful implementation for run(); instead, an UnsupportedOperationException is thrown

Specified by:
run in interface IModule
Throws:
java.lang.UnsupportedOperationException

clear

public void clear()
the default implementation of clear() assigns the null value to both input and output; the domain and range of this module is NOT changed; additional effects must be implemented by overriding clear() in subclasses of this class

Specified by:
clear in interface IModule

init

public void init(java.lang.String[] initArgs)
the default implementation of init() has no effect on the module; effects must be implemented by overriding init() in subclasses of this class (if this is needed)

Specified by:
init in interface IModule

getInput

public java.lang.Object getInput()
returns the input of this module

Specified by:
getInput in interface IModule

setInput

public java.lang.Object setInput(java.lang.Object input)
sets the input of this module and returns the value

Specified by:
setInput in interface IModule

getOutput

public java.lang.Object getOutput()
returns the result of the computation of this module

Specified by:
getOutput in interface IModule

setOutput

public java.lang.Object setOutput(java.lang.Object output)
sets the output of this module and returns the value

Specified by:
setOutput in interface IModule