ilog.rules.vocabulary.model

Class IlrVocabularyController

  • java.lang.Object
    • ilog.rules.vocabulary.model.IlrVocabularyController


  • public class IlrVocabularyController
    extends java.lang.Object
    A connector between a vocabulary and all its companion classes such as: Query Manager, Checker, Mapping Manager, Serializers, and so on. This is the central class for all vocabulary services.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.util.logging.Logger getLogger()
      Returns the logger.
      IlrVocabulary getVocabulary()
      Returns the attached vocabulary.
      protected java.util.logging.Logger makeLogger()
      Creates the logger instance.
      void readVocabulary(java.io.InputStream istream, java.lang.String encoding, java.lang.Object context)
      Reads a vocabulary from the specified istream, using the specified encoding, and context as the context object.
      void readVocabulary(java.io.Reader reader, java.lang.Object context)
      Reads a vocabulary from the specified reader using context as the context object.
      void setLogger(java.util.logging.Logger logger)
      This method assign a logger to this instance of VocabularyController.
      void writeVocabulary(java.io.OutputStream ostream, java.lang.String encoding)
      Writes the vocabulary to the specified ostream, using the specified encoding.
      void writeVocabulary(java.io.Writer writer)
      Writes the vocabulary to the specified writer.
      • Methods inherited from class java.lang.Object

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

      • IlrVocabularyController

        public IlrVocabularyController(IlrVocabulary vocabulary)
        Builds a vocabulary controller for the specified vocabulary.
        Parameters:
        vocabulary - The vocabulary.
    • Method Detail

      • getVocabulary

        public IlrVocabulary getVocabulary()
        Returns the attached vocabulary.
        Returns:
        The attached vocabulary.
      • getLogger

        public java.util.logging.Logger getLogger()
        Returns the logger.
        Returns:
        The logger.
      • setLogger

        public void setLogger(java.util.logging.Logger logger)
        This method assign a logger to this instance of VocabularyController. A logger reports any internal errors related to the vocabulary.
        Parameters:
        logger -
      • makeLogger

        protected java.util.logging.Logger makeLogger()
        Creates the logger instance. This method may be redefined to return a subtype of Logger.
        Returns:
        A new instance of Logger.
      • readVocabulary

        public void readVocabulary(java.io.InputStream istream,
                          java.lang.String encoding,
                          java.lang.Object context)
                            throws java.io.IOException,
                                   IlrSerializerError
        Reads a vocabulary from the specified istream, using the specified encoding, and context as the context object.
        Throws:
        java.io.IOException
        IlrSerializerError
        Parameters:
        istream - The input stream.
        encoding - The encoding.
        context - A context object. In the case of a BOM-based vocabulary, this context is the instance of IlrObjectModel.
      • readVocabulary

        public void readVocabulary(java.io.Reader reader,
                          java.lang.Object context)
                            throws java.io.IOException,
                                   IlrSerializerError
        Reads a vocabulary from the specified reader using context as the context object.
        Throws:
        java.io.IOException
        IlrSerializerError
        Parameters:
        reader - The reader.
        context - A context object. In the case of a BOM-based vocabulary, this context is the instance of IlrObjectModel.
      • writeVocabulary

        public void writeVocabulary(java.io.Writer writer)
                             throws java.io.IOException
        Writes the vocabulary to the specified writer.
        Throws:
        java.io.IOException
        Parameters:
        writer - The writer.
      • writeVocabulary

        public void writeVocabulary(java.io.OutputStream ostream,
                           java.lang.String encoding)
                             throws java.io.IOException
        Writes the vocabulary to the specified ostream, using the specified encoding.
        Throws:
        java.io.IOException
        Parameters:
        ostream - The output stream.
        encoding - The encoding.

© Copyright IBM Corp. 1987, 2017