Class ReferenceTermProduction


public class ReferenceTermProduction extends TermProduction
A term produced by a production rule which takes its actual term value from one or more terms matched in the condition
Author:
bratseth
  • Constructor Details

    • ReferenceTermProduction

      public ReferenceTermProduction(String reference, boolean produceAll)
      Creates a new produced reference term
      Parameters:
      reference - the label of the condition this should take it's value from
    • ReferenceTermProduction

      public ReferenceTermProduction(String reference, TermType termType, boolean produceAll)
      Creates a new produced reference term
      Parameters:
      reference - the label of the condition this should take its value from
      termType - the type of the term to produce
    • ReferenceTermProduction

      public ReferenceTermProduction(String label, String reference, boolean produceAll)
      Creates a new produced reference term
      Parameters:
      label - the label of the produced term
      reference - 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 term
      reference - the label of the condition this should take its value from
      termType - the type of term to produce
  • Method Details

    • getReference

      public String getReference()
      Returns the label of the condition this should take its value from, never null
    • producesAll

      public boolean producesAll()
    • produce

      public void produce(RuleEvaluation e, int ignored)
      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
      ignored - the offset position at which to produce this. Offsets are used to produce multiple items at one position, inserted in the right order.
    • toInnerTermString

      public String toInnerTermString()
      Specified by:
      toInnerTermString in class TermProduction