public class MarkRule extends StructRule
| Modifier and Type | Field and Description |
|---|---|
protected static char[] |
LEFTQUOTE |
protected Position |
m_endPos |
protected Position |
m_startPos |
BOL, EMPTY_LINE, EOB, EOL, m_attribute, m_out, m_terminate, SPACE| Constructor and Description |
|---|
MarkRule(Position startPos,
Position endPos,
java.lang.Object out,
boolean attribute) |
MarkRule(Position startPos,
java.lang.String end,
java.lang.Object out,
boolean attribute) |
MarkRule(java.lang.String start,
Position endPos,
java.lang.Object out,
boolean attribute) |
MarkRule(java.lang.String start,
java.lang.String end,
java.lang.Object out,
boolean attribute) |
| 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(). |
protected static boolean |
findQuote(java.lang.String line,
int begin,
int end) |
java.lang.String |
getBuffer() |
boolean |
isAttribute()
check if the value from the input should be used
as an attribute
|
protected boolean |
isWord(java.lang.String mark) |
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
|
void |
setAttribute(boolean attribute)
set indicator for the value from the input to be threated
as attribute
|
protected void |
setBuffer(java.lang.String line) |
void |
terminate() |
addTransformat, getParent, getTransformats, insertTransformat, isFinished, isFound, isTerminate, removeWhitespace, reset, set, setFinished, setFound, setParentprotected static final char[] LEFTQUOTE
protected Position m_startPos
protected Position m_endPos
public MarkRule(java.lang.String start,
java.lang.String end,
java.lang.Object out,
boolean attribute)
public MarkRule(java.lang.String start,
Position endPos,
java.lang.Object out,
boolean attribute)
public MarkRule(Position startPos, java.lang.String end, java.lang.Object out, boolean attribute)
public void readline(java.lang.String line)
StructRule
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)public void readline(java.lang.String line,
int lineno)
StructRule
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 static final boolean findQuote(java.lang.String line,
int begin,
int end)
protected boolean isWord(java.lang.String mark)
protected void setBuffer(java.lang.String line)
public java.lang.String getBuffer()
protected void clearBuffer()
StructRuleStructRule.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()public boolean isAttribute()
public void setAttribute(boolean attribute)
attribute - The attribute to setpublic void terminate()