public class PositionRule extends StructRule
BOL, EMPTY_LINE, EOB, EOL, m_attribute, m_out, m_terminate, SPACE| Constructor and Description |
|---|
PositionRule(int begin,
int end,
java.lang.String objectId)
Constructor to define a start and end position
and the object id
|
PositionRule(int begin,
java.lang.String out)
Constructor to define a start and the object id
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearBuffer()
general method to clear a buffer which an implementation
of a StructRule can implement to keep all data between
StructRule.isFound() and StructRule.isFinished(). |
void |
readline(java.lang.String line)
read a line from the parser for processing, without
tracking the line number
|
void |
readline(java.lang.String line,
int lineno)
read a line from the parser for processing, with
tracking the line number
|
addTransformat, getParent, getTransformats, insertTransformat, isFinished, isFound, isTerminate, removeWhitespace, reset, set, setFinished, setFound, setParentpublic PositionRule(int begin,
int end,
java.lang.String objectId)
begin - int, begin position of this valueend - int, end position of this valueobjectId - String id for the value readpublic PositionRule(int begin,
java.lang.String out)
The end will be the end-of-the line
begin - int, begin position of this valueout - String id for the value readpublic void readline(java.lang.String line)
The StructParser supplies the input line for line. This
does not limit the rules to one line. This is only dependant
on StructRule.isFound() and StructRule.isFinished()
This method calls StructRule.readline(String, int) with lineno=-1
and will ignore lineno for information purposes
readline in class StructRuleline - String, the line to be readStructRule.readline(String, int),
StructParserpublic void readline(java.lang.String line,
int lineno)
The StructParser supplies the input line for line. This
does not limit the rules to one line. This is only dependant
on StructRule.isFound() and StructRule.isFinished()
readline in class StructRuleline - String, the line to be readlineno - int, the linenumber of this lineStructParserprotected void clearBuffer()
StructRule.isFound() and StructRule.isFinished().
This method is called from reset to clear the buffer between two independant uses of this rule
clearBuffer in class StructRuleStructRule.reset()