ilog.rules.brl.parsing

Class IlrBRLDefaultParserInput

  • java.lang.Object
    • ilog.rules.brl.parsing.IlrBRLDefaultParserInput
  • All Implemented Interfaces:
    IlrBRLMutableParserInput, IlrBRLParserInput


    public class IlrBRLDefaultParserInput
    extends java.lang.Object
    implements IlrBRLMutableParserInput
    IlrBRLDefaultParserInput is the default implementation of IlrBRLParserInput and IlrBRLMutableParserInput. This class provides a basic implementation of the contract specified by these two interfaces, it can be used to parse a text fragment.
    Since:
    JRules 7.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrBRLDefaultParserInput(java.lang.String input, java.util.Locale locale, IlrBRLDefinition definition)
      Creates a parser input for the specific text input, locale and BRL definition.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.util.Set getCategoryFilter()
      Returns the category filter associated to this input.
      java.lang.String getDefinition()
      Returns the text to be parsed.
      IlrBRLDefinition getLanguageDefinition()
      Returns the business rule language definition that will be used to parse the input.
      java.util.Locale getLocale()
      Returns the input locale.
      void setCategoryFilter(java.util.Set categoryFilter)
      Assign a category filter to the input.
      void setDefinition(java.lang.String text)
      Sets the new input text for the parser.
      void setLanguageDefinition(IlrBRLDefinition definition)
      Set the business rule language definition that will be used to parse the input.
      void setLocale(java.util.Locale locale)
      Sets the locale for the input.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IlrBRLDefaultParserInput

        public IlrBRLDefaultParserInput(java.lang.String input,
                                java.util.Locale locale,
                                IlrBRLDefinition definition)
        Creates a parser input for the specific text input, locale and BRL definition. By default a category filter set to any is used to parse input.
        Parameters:
        input - The text input.
        locale - The locale of the input.
        definition - The business rule language definition.
    • Method Detail

      • getDefinition

        public java.lang.String getDefinition()
        Description copied from interface: IlrBRLParserInput
        Returns the text to be parsed.
        Specified by:
        getDefinition in interface IlrBRLParserInput
        Returns:
        A String object containing the text to be parsed.
      • getLocale

        public java.util.Locale getLocale()
        Description copied from interface: IlrBRLParserInput
        Returns the input locale. This locale is used for interpreting locale-specific vocabulary and business rule language input.
        Specified by:
        getLocale in interface IlrBRLParserInput
        Returns:
        The input locale.
      • getLanguageDefinition

        public IlrBRLDefinition getLanguageDefinition()
        Description copied from interface: IlrBRLParserInput
        Returns the business rule language definition that will be used to parse the input.
        Specified by:
        getLanguageDefinition in interface IlrBRLParserInput
        Returns:
        A BRLDefinition object representing the business rule language definition for the appropriate locale.
      • getCategoryFilter

        public java.util.Set getCategoryFilter()
        Returns the category filter associated to this input. If the filter has not been specified, the category filter any is returned.
        Specified by:
        getCategoryFilter in interface IlrBRLParserInput
        Returns:
        A category filter.
      • setLocale

        public void setLocale(java.util.Locale locale)
        Description copied from interface: IlrBRLMutableParserInput
        Sets the locale for the input. This locale is used for interpreting locale-specific vocabulary and business rule language input.
        Specified by:
        setLocale in interface IlrBRLMutableParserInput
        Parameters:
        locale - The new locale for this input.
      • setCategoryFilter

        public void setCategoryFilter(java.util.Set categoryFilter)
        Assign a category filter to the input.
        Specified by:
        setCategoryFilter in interface IlrBRLMutableParserInput
        Parameters:
        categoryFilter - The new category filter. Set to null to reset the default category any.

© Copyright IBM Corp. 1987, 2017