Package com.yahoo.prelude.semantics.rule
Class ReferenceTermProduction
java.lang.Object
com.yahoo.prelude.semantics.rule.Production
com.yahoo.prelude.semantics.rule.TermProduction
com.yahoo.prelude.semantics.rule.ReferenceTermProduction
A term produced by a production rule which takes its actual term value
from one or more terms matched in the condition
- Author:
- bratseth
-
Field Summary
Fields inherited from class com.yahoo.prelude.semantics.rule.Production
replacing
-
Constructor Summary
ConstructorDescriptionReferenceTermProduction
(String reference, boolean produceAll) Creates a new produced reference termReferenceTermProduction
(String reference, TermType termType, boolean produceAll) Creates a new produced reference termReferenceTermProduction
(String label, String reference, boolean produceAll) Creates a new produced reference termReferenceTermProduction
(String label, String reference, TermType termType, boolean produceAll) Creates a new produced reference term -
Method Summary
Modifier and TypeMethodDescriptionReturns the label of the condition this should take its value from, never nullvoid
produce
(RuleEvaluation e, int ignored) Produces this at the current matchboolean
Methods 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
-
ReferenceTermProduction
Creates a new produced reference term- Parameters:
reference
- the label of the condition this should take it's value from
-
ReferenceTermProduction
Creates a new produced reference term- Parameters:
reference
- the label of the condition this should take its value fromtermType
- the type of the term to produce
-
ReferenceTermProduction
Creates a new produced reference term- Parameters:
label
- the label of the produced termreference
- the label of the condition this should take its value from
-
ReferenceTermProduction
public ReferenceTermProduction(String label, String reference, TermType termType, boolean produceAll) Creates a new produced reference term- Parameters:
label
- the label of the produced termreference
- the label of the condition this should take its value fromtermType
- the type of term to produce
-
-
Method Details
-
getReference
Returns the label of the condition this should take its value from, never null -
producesAll
public boolean producesAll() -
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 queryignored
- 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
-