jeters.components
Class RegExReplacer_File
java.lang.Object
jeters.components.RegExReplacer
jeters.components.RegExReplacer_File
- All Implemented Interfaces:
- Component, Configurable, ReplacerComponent<EditableText,MediaWikiText>
public class RegExReplacer_File
- extends RegExReplacer
an replacer class for JETERS that applies regex expressions it reads from a file.
*++ FILE FORMAT ++*
Field Summary |
protected java.lang.String |
conf_regExPath
the path of the file containing the regular expressions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
conf_regExPath
protected java.lang.String conf_regExPath
- the path of the file containing the regular expressions
RegExReplacer_File
public RegExReplacer_File()
edit
public MediaWikiText edit(EditableText text,
UIComponent uiForRequests)
- Description copied from class:
RegExReplacer
- applies the regular expressions to a text.
- Specified by:
edit
in interface ReplacerComponent<EditableText,MediaWikiText>
- Overrides:
edit
in class RegExReplacer
- Parameters:
text
- the input text that is supposed to be editeduiForRequests
- UI-component for communication with the user.
- Returns:
- the text resulting from the edit, together with information for MediaWiki.
Most importantly, it contains a description of the edit
by listing the descriptions (the order is determined by the ratings).
setConfiguration
public void setConfiguration(NamedDataSet configurationSet)
- Description copied from interface:
Configurable
- sets the configuration for this object.
If setConfiguration is not called, the component must work properly nevertheless, using default settings.
- Specified by:
setConfiguration
in interface Configurable
- Overrides:
setConfiguration
in class RegExReplacer
- Parameters:
configurationSet
- the configuration data to be used by the component
if null, the object has to use default settings
getConfiguration
public NamedDataSet getConfiguration()
- Description copied from interface:
Configurable
- this method is called to retrieve the current configuration for this component.
It will e.g. be used for generating the configuration file.
- Specified by:
getConfiguration
in interface Configurable
- Overrides:
getConfiguration
in class RegExReplacer
- Returns:
- configuration data, null is allowed (doesn't make much sense however)