Class SpellerDefinition
java.lang.Object
com.aquima.interactions.spellengine.model.definition.SpellerDefinition
- All Implemented Interfaces:
Serializable
Class containing the defintion for a single speller.
- Since:
- 6.0
- Author:
- Jon van Leuven
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpellerDefinition
(ISpellerDS datasource) Construct a speller definition based on a datasource. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
addRule
(RuleDefinition definition) This method returns the optional description of the speller.getMacroRule
(char name) This method returns the macro rule for a specified name.getName()
This method returns the name of the speller.This method returns the optional rule for negative integer values.getRange()
This method returns the optional range limitation for the speller.getRules()
This method returns the rules of the speller.
-
Constructor Details
-
SpellerDefinition
Construct a speller definition based on a datasource.- Parameters:
datasource
- the datasource
-
-
Method Details
-
addRule
-
addMacro
-
getName
This method returns the name of the speller.- Returns:
- The name (never null)
-
getDescription
This method returns the optional description of the speller.- Returns:
- The description (may be null)
-
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
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
This method returns the optional rule for negative integer values.- Returns:
- Rule for negative integers (may be null)
-
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)
-