public class SubstringReplacerRules extends Object implements EnvironmentHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
SubstringReplacerRules.SubstringReplacerMatchRule
Inner class encapsulating the logic for matching and replacing.
|
| Constructor and Description |
|---|
SubstringReplacerRules(String matchDetails,
Instances inputStructure)
Constructor.
|
SubstringReplacerRules(String matchDetails,
Instances inputStructure,
String statusMessagePrefix,
Logger log,
Environment env)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyRules(Instance inst) |
static List<SubstringReplacerRules.SubstringReplacerMatchRule> |
matchRulesFromInternal(String matchReplaceDetails,
Instances inputStructure,
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(String matchDetails, Instances inputStructure, 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(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 List<SubstringReplacerRules.SubstringReplacerMatchRule> matchRulesFromInternal(String matchReplaceDetails, Instances inputStructure, 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)
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.