public class SubstringReplacerRules extends java.lang.Object implements EnvironmentHandler, java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
SubstringReplacerRules.SubstringReplacerMatchRule
Inner class encapsulating the logic for matching and replacing.
|
| Constructor and Description |
|---|
SubstringReplacerRules(java.lang.String matchDetails,
Instances inputStructure)
Constructor.
|
SubstringReplacerRules(java.lang.String matchDetails,
Instances inputStructure,
java.lang.String statusMessagePrefix,
Logger log,
Environment env)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyRules(Instance inst) |
Instance |
makeOutputInstance(Instance inputI)
Make an output instance given an input one
|
static java.util.List<SubstringReplacerRules.SubstringReplacerMatchRule> |
matchRulesFromInternal(java.lang.String matchReplaceDetails,
Instances inputStructure,
java.lang.String statusMessagePrefix,
Logger log,
Environment env)
Get a list of match rules from an internally encoded match specification
|
void |
setEnvironment(Environment env)
Set environment variables to use.
|
public SubstringReplacerRules(java.lang.String matchDetails,
Instances inputStructure,
java.lang.String statusMessagePrefix,
Logger log,
Environment env)
matchDetails - the internally encoded match details stringinputStructure - the incoming instances structurestatusMessagePrefix - an optional status message prefix string for
logginglog - the log to use (may be null)env - environment variablespublic SubstringReplacerRules(java.lang.String matchDetails,
Instances inputStructure)
matchDetails - the internally encoded match details stringinputStructure - the incoming instances structurepublic void setEnvironment(Environment env)
EnvironmentHandlersetEnvironment in interface EnvironmentHandlerenv - the environment variables to
usepublic static java.util.List<SubstringReplacerRules.SubstringReplacerMatchRule> matchRulesFromInternal(java.lang.String matchReplaceDetails, Instances inputStructure, java.lang.String statusMessagePrefix, Logger log, Environment env)
matchReplaceDetails - the internally encoded specification of the
match rulesinputStructure - the input instances structurestatusMessagePrefix - an optional status message prefix for logginglog - the log to useenv - environment variablespublic void applyRules(Instance inst)