public class ReferencePreprocessor extends Object
It scans the rule file for fragment declarations, and then for any sentence fragments that equal the fragment declaration. If it finds any, it puts the curly brackets that the parser expects around them.
For example, if "this is a fragment" is declared as a fragment somewhere and
the text this is a fragment is detected in the rule file, it
has curly brackets placed around it.
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ACTION_FRAGMENT_KEYWORD |
protected static char |
PROP_END |
protected static char |
PROP_START |
protected static String |
VALIDATION_FRAGMENT_KEYWORD |
| Constructor and Description |
|---|
ReferencePreprocessor() |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getFragmentNames(String input)
Return all fragment names declared in a file
|
protected boolean |
isQuotedLine(String input,
int pos)
Return true if the position is in a quoted line
|
String |
process(String input) |
String |
process(String input,
String[] properties) |
protected static final String VALIDATION_FRAGMENT_KEYWORD
protected static final String ACTION_FRAGMENT_KEYWORD
protected static final char PROP_START
protected static final char PROP_END
public String[] getFragmentNames(String input)
protected boolean isQuotedLine(String input, int pos)
input - the documentpos - positionCopyright © 2006-2013. All Rights Reserved.