public class ReferenceTermProduction extends TermProduction
Modifier and Type | Field and Description |
---|---|
private String |
reference |
replacing
Constructor and Description |
---|
ReferenceTermProduction(String reference)
Creates a new produced reference term
|
ReferenceTermProduction(String label,
String reference)
Creates a new produced reference term
|
ReferenceTermProduction(String label,
String reference,
TermType termType)
Creates a new produced reference term
|
ReferenceTermProduction(String reference,
TermType termType)
Creates a new produced reference term
|
Modifier and Type | Method and Description |
---|---|
private void |
addMatches(RuleEvaluation e,
ReferencedMatches referencedMatches) |
(package private) void |
addMatchReferences(Set<String> matchReferences)
Called to add the references into the condition of this rule made by this production
into the given set.
|
String |
getReference()
Returns the label of the condition this should take its value from, never null
|
void |
produce(RuleEvaluation e,
int offset)
Produces this at the current match
|
void |
replaceMatches(RuleEvaluation e,
ReferencedMatches referencedMatches) |
void |
setReference(String reference)
The label of the condition this should take its value from, never null
|
String |
toInnerTermString() |
getLabel, getLabelString, getTermType, insertMatch, setLabel, setTermType, toInnerString
getPosition, getWeight, setPosition, setReplacing, setWeight, toString
private String reference
public ReferenceTermProduction(String reference)
reference
- the label of the condition this should take it's value frompublic ReferenceTermProduction(String reference, TermType termType)
reference
- the label of the condition this should take it's value fromtermType
- the type of the term to producepublic ReferenceTermProduction(String label, String reference)
label
- the label of the produced termreference
- the label of the condition this should take it's value frompublic ReferenceTermProduction(String label, String reference, TermType termType)
label
- the label of the produced termreference
- the label of the condition this should take it's value fromtermType
- the type of term to producepublic void setReference(String reference)
public String getReference()
void addMatchReferences(Set<String> matchReferences)
Production
addMatchReferences
in class Production
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 void replaceMatches(RuleEvaluation e, ReferencedMatches referencedMatches)
private void addMatches(RuleEvaluation e, ReferencedMatches referencedMatches)
public String toInnerTermString()
toInnerTermString
in class TermProduction
Copyright © 2018. All rights reserved.