ilog.rules.factory.translation

Class IlrTranslationParser

  • java.lang.Object
    • ilog.rules.factory.translation.IlrTranslationParser


  • public class IlrTranslationParser
    extends java.lang.Object
    Translation parser. It can parse a b2x file into a translation configuration.
    Since:
    JRules 6.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrTranslationParser()
      Creates a translation parser.
      IlrTranslationParser(org.xml.sax.ErrorHandler errorHandler)
      Creates a translation parser and specifies a SAX error handler to be used when parsing a file.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean isValidating()
      Returns true if the parse methods will validate the files against the B2X XML Schema.
      void parse(IlrTranslationConfiguration configuration, java.io.Reader reader)
      Parses a b2x file.
      void parsePath(IlrTranslationConfiguration configuration, java.io.Reader[] readers)
      Parses a path of b2x files.
      void setValidating(boolean validating)
      Sets a Boolean value indicating whether validation against the XML Schema will be used when parsing.
      • Methods inherited from class java.lang.Object

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

      • IlrTranslationParser

        public IlrTranslationParser()
        Creates a translation parser.
      • IlrTranslationParser

        public IlrTranslationParser(org.xml.sax.ErrorHandler errorHandler)
        Creates a translation parser and specifies a SAX error handler to be used when parsing a file.
        Parameters:
        errorHandler - A SAX error handler that will be used when parsing a file.
    • Method Detail

      • isValidating

        public boolean isValidating()
        Returns true if the parse methods will validate the files against the B2X XML Schema.
        Returns:
        true if validation against the XML Schema will be used when parsing.
      • setValidating

        public void setValidating(boolean validating)
        Sets a Boolean value indicating whether validation against the XML Schema will be used when parsing.
        Parameters:
        validating - true to set validating or false otherwise.
      • parsePath

        public void parsePath(IlrTranslationConfiguration configuration,
                     java.io.Reader[] readers)
                       throws java.io.IOException,
                              org.xml.sax.SAXException
        Parses a path of b2x files. This method parses the b2x files in the order they are given, and finally parses the boot.b2x file.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        Parameters:
        configuration - A translation configuration that will be filled with the information given in the readers.
        readers - An array of readers that will be read in order.
      • parse

        public void parse(IlrTranslationConfiguration configuration,
                 java.io.Reader reader)
                   throws java.io.IOException,
                          org.xml.sax.SAXException
        Parses a b2x file.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        Parameters:
        configuration - A translation configuration that will be filled with the information given in the reader.
        reader - A reader.

© Copyright IBM Corp. 1987, 2017