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
  • Constructor Details

    • NamespaceProduction

      public NamespaceProduction(String namespace, String key, String value)
      Creates a produced template term with no label and the default type
  • Method Details

    • 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 class Production
      Parameters:
      e - the evaluation context containing the current match and the query
      offset - 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 class Production