public class SimpleRule extends java.lang.Object implements ILowLevelConvertionRule
TaurusModelConverter to convert a single line of an AWM
XML model.| Constructor and Description |
|---|
SimpleRule(java.lang.String pOutdatedValue,
java.lang.String pNewValue)
Creates a new simple AWM model converter rule.
|
SimpleRule(java.lang.String pOutdatedValue,
java.lang.String pNewValue,
java.lang.String[] pAdditionalLineStrings,
java.lang.String[] pForbiddenLineStrings)
Creates a new simple AWM model converter rule with additional line
checks.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
convertLine(java.lang.String pLine)
Attempts to convert the given line from an AWM XML model.
|
java.lang.String[] |
getAdditionalLineStrings()
Gets the additional line strings.
|
java.lang.String[] |
getForbiddenLineStrings()
Gets the forbidden line strings.
|
java.lang.String |
getNewValue()
Gets the new value of this rule.
|
java.lang.String |
getOutdatedValue()
Gets the outdated value of this rule (the value to be replaced).
|
int |
getSpecialRule()
For internal use only.
|
boolean |
hasAdditionalLineStrings()
Whether the rule has additional line strings to check for.
|
boolean |
hasForbiddenLineStrings()
Whether the rule has forbidden line strings to check for.
|
void |
setSpecialRule(int pSpecialRule)
For internal use only.
|
public SimpleRule(java.lang.String pOutdatedValue,
java.lang.String pNewValue,
java.lang.String[] pAdditionalLineStrings,
java.lang.String[] pForbiddenLineStrings)
pOutdatedValue - the old value to be replacedpNewValue - the new valuepAdditionalLineStrings - (optional, can be null) an array of strings that
has to be in the checked line. If a single string is not
found, the replacement will not be applied.pForbiddenLineStrings - (optional, can be null) an array of strings that
must not be in the checked line. If a single string is found,
the replacement will not be applied.public SimpleRule(java.lang.String pOutdatedValue,
java.lang.String pNewValue)
pOutdatedValue - the old value to be replacedpNewValue - the new valuepublic java.lang.String getOutdatedValue()
getOutdatedValue in interface ILowLevelConvertionRulepublic java.lang.String getNewValue()
getNewValue in interface ILowLevelConvertionRulepublic java.lang.String[] getAdditionalLineStrings()
null)hasAdditionalLineStrings()public boolean hasAdditionalLineStrings()
true if additional line strings were definedgetAdditionalLineStrings()public java.lang.String[] getForbiddenLineStrings()
null)hasForbiddenLineStrings()public boolean hasForbiddenLineStrings()
true if forbidden line strings were definedgetForbiddenLineStrings()public int getSpecialRule()
public void setSpecialRule(int pSpecialRule)
pSpecialRule - the special rule constantpublic java.lang.String convertLine(java.lang.String pLine)
ILowLevelConvertionRuleconvertLine in interface ILowLevelConvertionRulepLine - the line for potential conversionCopyright © 2015 Micro Focus GmbH. All rights reserved.