Class SpellerDefinition

java.lang.Object
com.aquima.interactions.spellengine.model.definition.SpellerDefinition
All Implemented Interfaces:
Serializable

public class SpellerDefinition extends Object implements Serializable
Class containing the defintion for a single speller.
Since:
6.0
Author:
Jon van Leuven
See Also:
  • Constructor Details

    • SpellerDefinition

      public SpellerDefinition(ISpellerDS datasource)
      Construct a speller definition based on a datasource.
      Parameters:
      datasource - the datasource
  • Method Details

    • addRule

      protected void addRule(RuleDefinition definition)
    • addMacro

      protected void addMacro(char name, String rule)
    • getName

      public String getName()
      This method returns the name of the speller.
      Returns:
      The name (never null)
    • getDescription

      public String getDescription()
      This method returns the optional description of the speller.
      Returns:
      The description (may be null)
    • getRules

      public RuleDefinition[] getRules()
      This method returns the rules of the speller. Note: the rules must be sorted by base. Starting with the rule definitions with the lowest base value.
      Returns:
      The rules (never null)
    • getMacroRule

      public String getMacroRule(char name)
      This method returns the macro rule for a specified name.
      Parameters:
      name - The macro name used for lookup.
      Returns:
      The rule, never null.
      Throws:
      UnknownMacroException - Is thrown when no macro exists for the specified name.
    • getNegativeRule

      public String getNegativeRule()
      This method returns the optional rule for negative integer values.
      Returns:
      Rule for negative integers (may be null)
    • getRange

      public IRangeValue getRange()
      This method returns the optional range limitation for the speller. Null is returned when no limitations apply.
      Returns:
      The range limit (may be null)