Package com.yahoo.prelude.semantics.rule
Class LiteralTermProduction
java.lang.Object
com.yahoo.prelude.semantics.rule.Production
com.yahoo.prelude.semantics.rule.TermProduction
com.yahoo.prelude.semantics.rule.LiteralTermProduction
A literal term produced by a production rule
- Author:
- bratseth
-
Field Summary
Fields inherited from class com.yahoo.prelude.semantics.rule.Production
replacing
-
Constructor Summary
ConstructorDescriptionLiteralTermProduction
(String literal) Creates a new produced literal termLiteralTermProduction
(String literal, TermType termType) Creates a new produced literal termLiteralTermProduction
(String label, String literal, TermType termType) Creates a new produced literal term -
Method Summary
Modifier and TypeMethodDescriptionReturns the term word produced, never nullvoid
produce
(RuleEvaluation e, int offset) Produces this at the current matchvoid
setLiteral
(String literal) The literal term value, never nullMethods inherited from class com.yahoo.prelude.semantics.rule.TermProduction
getLabel, getLabelString, getTermType, insertMatch, setLabel, setTermType, toInnerString
Methods inherited from class com.yahoo.prelude.semantics.rule.Production
getPosition, getWeight, setPosition, setReplacing, setWeight, toString
-
Constructor Details
-
LiteralTermProduction
Creates a new produced literal term- Parameters:
literal
- the label of the condition this should take it's value from
-
LiteralTermProduction
Creates a new produced literal term- Parameters:
literal
- the label of the condition this should take it's value fromtermType
- the type of term to produce
-
LiteralTermProduction
Creates a new produced literal term- Parameters:
label
- the label of the produced termliteral
- this term wordtermType
- the type of term to produce
-
-
Method Details
-
setLiteral
The literal term value, never null -
getLiteral
Returns the term word produced, never null -
produce
Description copied from class:Production
Produces this at the current match- Specified by:
produce
in classProduction
- Parameters:
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.
-
toInnerTermString
- Specified by:
toInnerTermString
in classTermProduction
-