jeters.components
Class RegExReplacer_File

java.lang.Object
  extended by jeters.components.RegExReplacer
      extended by 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 ++*


Nested Class Summary
 
Nested classes/interfaces inherited from class jeters.components.RegExReplacer
RegExReplacer.DescriptionEntry, RegExReplacer.DescriptionList, RegExReplacer.Replacement, RegExReplacer.ReplacementElement, RegExReplacer.ReplacementGroup
 
Field Summary
protected  java.lang.String conf_regExPath
          the path of the file containing the regular expressions
 
Fields inherited from class jeters.components.RegExReplacer
conf_minRatingDescription, conf_minRatingSummary, conf_minTotalRatingDescription, conf_minTotalRatingSummary, conf_summaryEntryLimit, conf_summaryEntryLimitBrackets, confirmationDescriptionList, replacements, summaryDescriptionList
 
Constructor Summary
RegExReplacer_File()
           
 
Method Summary
 MediaWikiText edit(EditableText text, UIComponent uiForRequests)
          applies the regular expressions to a text.
 NamedDataSet getConfiguration()
          this method is called to retrieve the current configuration for this component.
 void setConfiguration(NamedDataSet configurationSet)
          sets the configuration for this object.
 
Methods inherited from class jeters.components.RegExReplacer
applyReplacementGroup, applyReplacementList, applySingleReplacement, split
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conf_regExPath

protected java.lang.String conf_regExPath
the path of the file containing the regular expressions

Constructor Detail

RegExReplacer_File

public RegExReplacer_File()
Method Detail

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 edited
uiForRequests - 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)