public class LiteralPhraseProduction extends TermProduction
Modifier and Type | Field and Description |
---|---|
private List<String> |
terms |
replacing
Constructor and Description |
---|
LiteralPhraseProduction()
Creates a new produced literal phrase
|
LiteralPhraseProduction(String label)
Creates a new produced literal phrase
|
Modifier and Type | Method and Description |
---|---|
void |
addTerm(String term)
Adds a term to this phrase
|
private String |
getSpaceSeparated(List<String> terms) |
List<String> |
getTerms()
Returns a read only view of the terms produced by this, never null
|
void |
produce(RuleEvaluation e,
int offset)
Produces this at the current match
|
String |
toInnerTermString() |
getLabel, getLabelString, getTermType, insertMatch, setLabel, setTermType, toInnerString
addMatchReferences, getPosition, getWeight, setPosition, setReplacing, setWeight, toString
public LiteralPhraseProduction()
public LiteralPhraseProduction(String label)
label
- the label of the produced termpublic void addTerm(String term)
public List<String> getTerms()
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.