|
@@ -351,14 +351,28 @@ public class FilterSet extends DataType implements Cloneable { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Does replacement on the given string with token matching. |
|
|
* Does replacement on the given string with token matching. |
|
|
* This uses the defined begintoken and endtoken values which default to @ for both. |
|
|
|
|
|
|
|
|
* This uses the defined begintoken and endtoken values which default |
|
|
|
|
|
* to @ for both. |
|
|
|
|
|
* This resets the passedTokens and calls iReplaceTokens to |
|
|
|
|
|
* do the actual replacements. |
|
|
* |
|
|
* |
|
|
* @param line The line to process the tokens in. |
|
|
* @param line The line to process the tokens in. |
|
|
* @return The string with the tokens replaced. |
|
|
* @return The string with the tokens replaced. |
|
|
*/ |
|
|
*/ |
|
|
public String replaceTokens(String line) { |
|
|
public String replaceTokens(String line) { |
|
|
passedTokens = null; // reset for new line |
|
|
passedTokens = null; // reset for new line |
|
|
|
|
|
|
|
|
|
|
|
return iReplaceTokens(line); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Does replacement on the given string with token matching. |
|
|
|
|
|
* This uses the defined begintoken and endtoken values which default |
|
|
|
|
|
* to @ for both. |
|
|
|
|
|
* |
|
|
|
|
|
* @param line The line to process the tokens in. |
|
|
|
|
|
* @return The string with the tokens replaced. |
|
|
|
|
|
*/ |
|
|
|
|
|
private String iReplaceTokens(String line) { |
|
|
String beginToken = getBeginToken(); |
|
|
String beginToken = getBeginToken(); |
|
|
String endToken = getEndToken(); |
|
|
String endToken = getEndToken(); |
|
|
int index = line.indexOf(beginToken); |
|
|
int index = line.indexOf(beginToken); |
|
@@ -439,7 +453,7 @@ public class FilterSet extends DataType implements Cloneable { |
|
|
return parent; |
|
|
return parent; |
|
|
} |
|
|
} |
|
|
passedTokens.addElement(parent); |
|
|
passedTokens.addElement(parent); |
|
|
String value = this.replaceTokens(line); |
|
|
|
|
|
|
|
|
String value = iReplaceTokens(line); |
|
|
if (value.indexOf(getBeginToken()) == -1 && !duplicateToken) { |
|
|
if (value.indexOf(getBeginToken()) == -1 && !duplicateToken) { |
|
|
duplicateToken = false; |
|
|
duplicateToken = false; |
|
|
passedTokens = null; |
|
|
passedTokens = null; |
|
|