Package com.yahoo.prelude.semantics.rule
Class NamespaceProduction
- java.lang.Object
-
- com.yahoo.prelude.semantics.rule.Production
-
- com.yahoo.prelude.semantics.rule.NamespaceProduction
-
public class NamespaceProduction extends Production
A production in a specified namespace- Author:
- bratseth
-
-
Field Summary
-
Fields inherited from class com.yahoo.prelude.semantics.rule.Production
replacing
-
-
Constructor Summary
Constructors Constructor Description NamespaceProduction(String namespace, String key, String value)
Creates a produced template term with no label and the default type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getKey()
String
getNamespace()
String
getValue()
void
produce(RuleEvaluation e, int offset)
Produces this at the current matchvoid
setKey(String key)
void
setNamespace(String namespace)
void
setValue(String value)
String
toInnerString()
All instances of this produces a parseable string output-
Methods inherited from class com.yahoo.prelude.semantics.rule.Production
getPosition, getWeight, setPosition, setReplacing, setWeight, toString
-
-
-
-
Method Detail
-
getNamespace
public String getNamespace()
-
setNamespace
public final void setNamespace(String namespace)
-
getKey
public String getKey()
-
setKey
public void setKey(String key)
-
getValue
public String getValue()
-
setValue
public void setValue(String value)
-
produce
public void produce(RuleEvaluation e, int offset)
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.
-
toInnerString
public String toInnerString()
All instances of this produces a parseable string output- Specified by:
toInnerString
in classProduction
-
-