Rule Execution Server API

ilog.rules.factory.translation
Class IlrTranslationParser

java.lang.Object
  extended by ilog.rules.factory.translation.IlrTranslationParser

public class IlrTranslationParser
extends Object

Translation parser. It can parse a b2x file into a translation configuration.

Since:
JRules 6.0

Constructor Summary
IlrTranslationParser()
          Creates a translation parser.
IlrTranslationParser(ErrorHandler errorHandler)
          Creates a translation parser and specifies a SAX error handler to be used when parsing a file.
 
Method Summary
 boolean isValidating()
          Returns true if the parse methods will validate the files against the B2X XML Schema.
 void parse(IlrTranslationConfiguration configuration, Reader reader)
          Parses a b2x file.
 void parsePath(IlrTranslationConfiguration configuration, 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(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,
                      Reader[] readers)
               throws IOException,
                      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:
IOException
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,
                  Reader reader)
           throws IOException,
                  SAXException
Parses a b2x file.

Throws:
IOException
SAXException
Parameters:
configuration - A translation configuration that will be filled with the information given in the reader.
reader - A reader.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013