Rule Designer API

ilog.rules.brl
Class IlrBRLRuleElementTranslatorInput

java.lang.Object
  extended by ilog.rules.brl.IlrBRLRuleElementTranslatorInput
All Implemented Interfaces:
IlrTranslatorInput, IlrTranslatorInputExtension

public class IlrBRLRuleElementTranslatorInput
extends Object
implements IlrTranslatorInputExtension

This class is an implementation of IlrTranslatorInput which uses information of the given IlrBRLRuleElement. An instance of this class is initialized with an IlrBRLRuleElement and should be given to a BRL Translator when translating the rule.


Constructor Summary
IlrBRLRuleElementTranslatorInput(IlrBRLRuleElement rule)
          This constructor initialize a translator input with a rule represented by an instance of IlrBRLRuleElement
 
Method Summary
 IlrBRLRuleElement getBRLRuleElement()
          This method returns the BRLRuleElement associated to this translator input
 String getBusinessName()
          This method returns the business name of the translator input.
 String getDocumentation()
          Gets the documentation of the element to translate.
 IlrBRLLogger getLogger()
          Gets the BRL logger associated to this translator input.
 String getName()
          Gets the name of the rule as it will be printed in generated code.
 String getPackageBusinessName()
          This method returns the business name of the package enclosing this translator input.
 String getPackageName()
          Gets the name of the package as it will be printed in generated code.
 Map getProperties()
          Gets the map of properties of the element to translate.
 IlrSyntaxTree getSyntaxTree()
          Gets the syntax tree of the element to translate.
 void setBRLRuleElement(IlrBRLRuleElement element)
          set the BRLRuleElement associated to this translator element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrBRLRuleElementTranslatorInput

public IlrBRLRuleElementTranslatorInput(IlrBRLRuleElement rule)
This constructor initialize a translator input with a rule represented by an instance of IlrBRLRuleElement

Parameters:
rule - the rule associated to this translator input, cannot be null.
Method Detail

getBRLRuleElement

public IlrBRLRuleElement getBRLRuleElement()
This method returns the BRLRuleElement associated to this translator input

Returns:
the BRLRuleElement associated to this translator input

setBRLRuleElement

public void setBRLRuleElement(IlrBRLRuleElement element)
set the BRLRuleElement associated to this translator element

Parameters:
element -

getSyntaxTree

public IlrSyntaxTree getSyntaxTree()
Description copied from interface: IlrTranslatorInput
Gets the syntax tree of the element to translate.

Specified by:
getSyntaxTree in interface IlrTranslatorInput
Returns:
The abstract syntax tree.

getName

public String getName()
Description copied from interface: IlrTranslatorInput
Gets the name of the rule as it will be printed in generated code.

Specified by:
getName in interface IlrTranslatorInput
Returns:
the name

getBusinessName

public String getBusinessName()
Description copied from interface: IlrTranslatorInputExtension
This method returns the business name of the translator input. Unlike getName(), this method returns a name which is not the technical name generated in the IRL statement.

Specified by:
getBusinessName in interface IlrTranslatorInputExtension
Returns:
the translator input business name.

getPackageName

public String getPackageName()
Description copied from interface: IlrTranslatorInput
Gets the name of the package as it will be printed in generated code.

Specified by:
getPackageName in interface IlrTranslatorInput
Returns:
the name of the package containing the element to translate, or null.

getPackageBusinessName

public String getPackageBusinessName()
Description copied from interface: IlrTranslatorInputExtension
This method returns the business name of the package enclosing this translator input. Unlike getPackageName(), this method returns a name which is not the technical package name generated in the IRL statement. If the translator input belongs to the default package, null should be returned.

Specified by:
getPackageBusinessName in interface IlrTranslatorInputExtension
Returns:
the translator input package business name.

getProperties

public Map getProperties()
Description copied from interface: IlrTranslatorInput
Gets the map of properties of the element to translate. Notice that the values contained in the map will be printed as they are. No formating will be done by the code generator.

Specified by:
getProperties in interface IlrTranslatorInput
Returns:
The map of all properties.

getDocumentation

public String getDocumentation()
Description copied from interface: IlrTranslatorInput
Gets the documentation of the element to translate.

Specified by:
getDocumentation in interface IlrTranslatorInput
Returns:
The documentation.

getLogger

public IlrBRLLogger getLogger()
Description copied from interface: IlrTranslatorInput
Gets the BRL logger associated to this translator input.

Specified by:
getLogger in interface IlrTranslatorInput
Returns:
An instance of IlrBRLLogger.

Rule Designer API

© Copyright IBM Corp. 1987, 2013