public class LiteralTermProduction extends TermProduction
replacing
Constructor and Description |
---|
LiteralTermProduction(String literal)
Creates a new produced literal term
|
LiteralTermProduction(String label,
String literal,
TermType termType)
Creates a new produced literal term
|
LiteralTermProduction(String literal,
TermType termType)
Creates a new produced literal term
|
Modifier and Type | Method and Description |
---|---|
String |
getLiteral()
Returns the term word produced, never null
|
void |
produce(RuleEvaluation e,
int offset)
Produces this at the current match
|
void |
setLiteral(String literal)
The literal term value, never null
|
String |
toInnerTermString() |
getLabel, getLabelString, getTermType, insertMatch, setLabel, setTermType, toInnerString
getPosition, getWeight, setPosition, setReplacing, setWeight, toString
public LiteralTermProduction(String literal)
literal
- the label of the condition this should take it's value frompublic LiteralTermProduction(String literal, TermType termType)
literal
- the label of the condition this should take it's value fromtermType
- the type of term to producepublic void setLiteral(String literal)
public String getLiteral()
public void produce(RuleEvaluation e, int offset)
Production
produce
in class Production
e
- the evaluation context containing the current match and the queryoffset
- the offset position at which to produce this. Offsets are used to produce multiple items
at one position, inserted in the right order.public String toInnerTermString()
toInnerTermString
in class TermProduction
Copyright © 2018. All rights reserved.