ilog.rules.brl.value.info

Interface IlrValueProvider

  • All Known Implementing Classes:
    IlrAbstractValueProvider


    public interface IlrValueProvider
    IlrValueProvider represents a value provider used for enumerated values that use a tree structure.

    Overview

    An IlrValueProvider is invoked by the prediction engine to provide the list of possible values for a given concept at a specific prediction point. If filtering is required according to the context the implementation of the value provider can use the syntax node passed to the prepare() method in order to compute a filtered list of values to return.

    Note that in an error recovery situation, the node passed to prepare() may not have the expected structure.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void dispose()
      Disposes of the value provider after a visit.
      java.lang.Object[] getChildren(java.lang.Object parent)
      Returns the child elements of the given parent element.
      java.lang.String getDisplayText(java.lang.Object element, java.util.Locale locale)
      Returns the localized text that can be displayed in viewers.
      java.lang.Object getParent(java.lang.Object element)
      Returns the parent for the given element.
      java.lang.String getText(java.lang.Object element, java.util.Locale locale)
      Returns the localized text that can inserted in rule text.
      java.lang.Object[] getValues()
      Returns the elements at the root level.
      boolean hasChildren(java.lang.Object element)
      States whether the given element has children.
      boolean isExclusive()
      Returns true if the value provider accepts only the values returned by getValues(), and does not accept any other value entered in a value editor.
      void prepare(IlrSyntaxTree.Node node)
      Prepares the value provider to a visit with the given branch of the Abstract Syntax Tree.
    • Method Detail

      • prepare

        void prepare(IlrSyntaxTree.Node node)
        Prepares the value provider to a visit with the given branch of the Abstract Syntax Tree.
        Parameters:
        node - The parent node under which a value can be added.
      • getValues

        java.lang.Object[] getValues()
        Returns the elements at the root level.
        Returns:
        The array of root elements.
      • getChildren

        java.lang.Object[] getChildren(java.lang.Object parent)
        Returns the child elements of the given parent element.
        Parameters:
        parent - The parent element.
        Returns:
        An array of child elements.
      • getParent

        java.lang.Object getParent(java.lang.Object element)
        Returns the parent for the given element.
        Parameters:
        element - The child element.
        Returns:
        The parent element.
      • hasChildren

        boolean hasChildren(java.lang.Object element)
        States whether the given element has children.
        Parameters:
        element - The element.
        Returns:
        true if the given element has children, and false if it has no children.
      • getDisplayText

        java.lang.String getDisplayText(java.lang.Object element,
                                      java.util.Locale locale)
        Returns the localized text that can be displayed in viewers.
        Parameters:
        element - The element.
        locale - The locale.
        Returns:
        The localized display text.
      • getText

        java.lang.String getText(java.lang.Object element,
                               java.util.Locale locale)
        Returns the localized text that can inserted in rule text.
        Parameters:
        element - The element.
        locale - The locale.
        Returns:
        The localized text.
      • dispose

        void dispose()
        Disposes of the value provider after a visit.
      • isExclusive

        boolean isExclusive()
        Returns true if the value provider accepts only the values returned by getValues(), and does not accept any other value entered in a value editor.

© Copyright IBM Corp. 1987, 2017