ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.rules
Class ARL

java.lang.Object
  |
  +--com.ibm.able.rules.ARL

public class ARL
extends java.lang.Object

This class contains constants used as parameters in ABLE Rule Language (ARL) rulesets and several utility methods.

Values are referenced using standard Java dot notation for example: setControlParameter(ARL.DefuzzifyMethod , ARL.Centroid) ; Methods are invokes using standard Java dot notation also for example: ARL.showWorkingMemory(wm) ;


Field Summary
static long ALL_DAYS_OF_MONTH
          DAY OF MONTH
static int ALL_DAYS_OF_WEEK
          DAY OF WEEK bitmasks -- per IETF Policy Framework Last bit is always 0
static int ALL_MONTHS
          MONTH OF YEAR bitmasks - per IETF Policy Framework
static java.lang.String AlphaCut
          Fuzzy alphaCut control parameter
static int APRIL
           
static int AUGUST
           
static int AverageHeight
          Defuzzification method: Average: Take the average height point.
static int Centroid
          Defuzzification method: Centroid: Take the center of the fuzzy region.
static java.lang.String ControlStrategy
          Forward engine control strategy:
static java.lang.String CorrelationMethod
          Fuzzy Correlation method: Product: scale the consequent fuzzy region using the truth of the predicate (the shape of the fuzzy region is preserved):
static long DAY_1
           
static long DAY_10
           
static long DAY_11
           
static long DAY_12
           
static long DAY_13
           
static long DAY_14
           
static long DAY_15
           
static long DAY_16
           
static long DAY_17
           
static long DAY_18
           
static long DAY_19
           
static long DAY_2
           
static long DAY_20
           
static long DAY_21
           
static long DAY_22
           
static long DAY_23
           
static long DAY_24
           
static long DAY_25
           
static long DAY_26
           
static long DAY_27
           
static long DAY_28
           
static long DAY_29
           
static long DAY_3
           
static long DAY_30
           
static long DAY_31
           
static long DAY_4
           
static long DAY_5
           
static long DAY_6
           
static long DAY_7
           
static long DAY_8
           
static long DAY_9
           
static int DECEMBER
           
static java.lang.String DefuzzifyMethod
          Defuzzification method: Centroid: Take the center of the fuzzy region.
static int Down
           
static java.lang.String Event
          The event control parameter used by event correlation engines
static int FEBRUARY
           
static java.lang.String FindAllSolutions
          Find All Solutions:
static int FIRE_ALL_RULES
           
static int FIRE_N_RULES
           
static int FIRE_ONE_RULE
           
static int FIRST_QUARTER
           
static int FOURTH_QUARTER
           
static int FRIDAY
           
static int FuzzyAdd
          Fuzzy Inference (implication) method: FuzzyAdd: also known as bounded add; the minimum of 1 and the sum of the membership values:
static java.lang.String Goal
          The goal control parameter used by backward chaining engines
static java.lang.String InferenceMethod
          Fuzzy Inference method:
static java.lang.String init
          Rule Block Name: Init
static int JANUARY
           
static int JULY
           
static int JUNE
           
static long LAST_DAY_1
           
static long LAST_DAY_10
           
static long LAST_DAY_11
           
static long LAST_DAY_12
           
static long LAST_DAY_13
           
static long LAST_DAY_14
           
static long LAST_DAY_15
           
static long LAST_DAY_16
           
static long LAST_DAY_17
           
static long LAST_DAY_18
           
static long LAST_DAY_19
           
static long LAST_DAY_2
           
static long LAST_DAY_20
           
static long LAST_DAY_21
           
static long LAST_DAY_22
           
static long LAST_DAY_23
           
static long LAST_DAY_24
           
static long LAST_DAY_25
           
static long LAST_DAY_26
           
static long LAST_DAY_27
           
static long LAST_DAY_28
           
static long LAST_DAY_29
           
static long LAST_DAY_3
           
static long LAST_DAY_30
           
static long LAST_DAY_31
           
static long LAST_DAY_4
           
static long LAST_DAY_5
           
static long LAST_DAY_6
           
static long LAST_DAY_7
           
static long LAST_DAY_8
           
static long LAST_DAY_9
           
static int Left
           
static int MARCH
           
static int MaxHeight
          Defuzzification method: MaxHeight: Take the value at the highest point.
static int MAY
           
static int Minimum
          Fuzzy Correlation method: Minimise: truncate the consequent fuzzy region at the truth of the premise (creating a plateau):
static int MinMax
          Fuzzy Inference (implication) method: MinMax: the maximum (of the minimum) membership values:
static int MONDAY
           
static int NOVEMBER
           
static java.lang.String NumberOfRulesToFire
          Forward engine - number of rules to fire:
static int OCTOBER
           
static java.lang.String postProcess
          Rule Block Name: PostProcess
static java.lang.String preProcess
          Rule Block Name: PreProcess
static java.lang.String process
          Rule Block Name: Process
static java.lang.String processAbleEvent
          Rule Block Name: ProcessAbleEvent
static java.lang.String processTimerEvent
          Rule Block Name: ProcessTimerEvent
static int Product
          Fuzzy Correlation method: Product: scale the consequent fuzzy region using the truth of the predicate (the shape of the fuzzy region is preserved):
static int ProductOr
          Fuzzy Inference (implication) method: ProductOr:
static java.lang.String quitAll
          Rule Block Name: QuitAll
static int Right
           
static int SATURDAY
           
static int SECOND_QUARTER
           
static int SEPTEMBER
           
static int SUNDAY
           
static int THIRD_QUARTER
           
static java.lang.String THIS_AND_FUTURE
           
static java.lang.String THIS_AND_PRIOR
           
static int THURSDAY
           
static int TRACE_HIGH
           
static int TRACE_LOW
           
static int TRACE_MEDIUM
           
static int TRACE_NONE
          Constants used to set trace levels
static int TUESDAY
           
static int Up
           
static int WEDNESDAY
           
static int WEEKDAY
           
static int WEEKEND
           
 
Constructor Summary
ARL()
           
 
Method Summary
static void assertDataSource(AbleWorkingMemory wm, AbleDataSource dataSource, java.lang.String className)
          Assert all records in a data source into working memory.
static java.lang.String Copyright()
          Determine the copyright of this class.
static void fine(AbleRuleSet ruleset, java.lang.String text)
          Write low level text to the ruleset's trace logger.
static void finer(AbleRuleSet ruleset, java.lang.String text)
          Write medium level text to the ruleset's trace logger.
static void finest(AbleRuleSet ruleset, java.lang.String text)
          Write high level text to the ruleset's trace logger.
static java.util.Vector getBeanOutput(AbleBean theBean)
          Retrieve the specified bean's output buffer as a Vector of objects regardless of the underlying outputbuffer representation
static java.lang.String getSystemProperty(java.lang.String thePropertyName)
          Return the value of the specified system property.
static java.lang.String getSystemProperty(java.lang.String thePropertyName, java.lang.String theDefaultValue)
          Return the value of the specified system property.
static void info(java.lang.String text)
          Write informational text to the global message logger.
static boolean invokeCommand(java.lang.String theCommand)
          Invoke the command provided; prepend any necessary operating system arguments.
static boolean invokeCommandOS(java.lang.String theCommand)
          Invoke the command provided as provided.
static boolean isLeapYear(java.util.GregorianCalendar theCalendar, int theYear)
          Determine whether the specified year is a leap year.
static boolean isTimeAM(java.util.Calendar theCalendar)
          Determine whether the time in the specified calendar is AM.
static boolean isTimePM(java.util.Calendar theCalendar)
          Determine whether the time in the specified calendar is PM.
static void loadMapFromVars(AbleRuleSet theRuleSet, java.util.Map theMap, java.util.Vector theVariableList)
          Load the supplied hashmap with matching variables found in the variable list.
static void loadMapFromVars(AbleRuleSet theRuleSet, java.util.Map theMap, java.util.Vector theVariableList, java.lang.Boolean theOverwriteFlag)
          Load the supplied hashmap with matching variables found in the variable list.
static void loadVarsFromMap(AbleRuleSet theRuleSet, java.util.Map theMap)
          Load the properties file and assign any matching properties to variables with the same name.
static void loadVarsFromPropertiesFile(AbleRuleSet theRuleSet, java.lang.String theFileName)
          Load the properties file and assign any matching properties to variables with the same name.
static java.util.Calendar parseDateAndTime(java.lang.String theDateString)
          Create a Calendar object from a String representation of a date and time using the default date format.
static java.util.Calendar parseDateAndTime(java.lang.String theDateString, java.lang.String theFormatString)
          Create a Calendar object from a String representation of a date and time using the default date format.
static java.lang.Object processRuleSet(AbleRuleSet theRuleSet, java.lang.Object theInputBuffer)
          Call the RuleSet via the process() method, passing a list of parameters via the bean's input buffer and returning the first element of the bean's output buffer in outputList.
static void setAbleEventProcessingStates(AbleBean theAbleBean, boolean processingEnabled, boolean postingEnabled)
          Deprecated. As of version 1.3d, object.method() syntax makes this method obsolete. Use theAbleBean.setAbleEventProcessingStates(Able.ProcessingEnabled_PostingEnabled);
static void setSystemProperty(java.lang.String thePropertyName, java.lang.String theValue)
          Set a system property to the specified value.
static void setTraceLevel(AbleRuleSet ruleset, int level)
          Set the trace level for a ruleset.
static void severe(java.lang.String text)
          Write severe error text to the global message logger.
static java.lang.String showWorkingMemory(AbleWorkingMemory wm)
          Returns a formatted string of the contents of the working memory to use for debugging.
static java.lang.Object[] stringToArray(java.lang.String target)
          Return a list from a space-delimited String of words.
static java.util.Vector stringToList(java.lang.String target)
          Return a list from a space-delimited String of words.
static java.util.Vector stringToList(java.lang.String target, java.lang.String delimiter)
          Return a list from a delimited String of words.
static java.lang.String stringWord(java.lang.String target, int index)
          Return a word from a space-delimited String of words.
static int stringWords(java.lang.String target)
          Count the words in a space-delimited String of words.
static void warning(java.lang.String text)
          Write warning text to the global message logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Goal

public static final java.lang.String Goal
The goal control parameter used by backward chaining engines

Event

public static final java.lang.String Event
The event control parameter used by event correlation engines

InferenceMethod

public static final java.lang.String InferenceMethod
Fuzzy Inference method:

Used by the Fuzzy inference engine to specify the algorithm used for inferencing, either ProductOr , FuzzyAdd, or MinMax.


FindAllSolutions

public static final java.lang.String FindAllSolutions
Find All Solutions:

Used by the Predicate inference engine to specify whether the search should stop on the first solution (false) or if all solutions should be found (true)


FuzzyAdd

public static final int FuzzyAdd
Fuzzy Inference (implication) method: FuzzyAdd: also known as bounded add; the minimum of 1 and the sum of the membership values:
     minimum( 1, a[i]+b[i] )
 

Usually used with Product correlation method.


MinMax

public static final int MinMax
Fuzzy Inference (implication) method: MinMax: the maximum (of the minimum) membership values:
     maximum( a[i], b[i] )
 

Almost always used with Minimise correlation method.


ProductOr

public static final int ProductOr
Fuzzy Inference (implication) method: ProductOr:
     1 - ( (1-a[i]) * (1-b[i]) )
 

Usually used with Product correlation method.


CorrelationMethod

public static final java.lang.String CorrelationMethod
Fuzzy Correlation method: Product: scale the consequent fuzzy region using the truth of the predicate (the shape of the fuzzy region is preserved):
     a[i] = a[i] * PredicateTruth
 

Used by the Fuzzy inference engine with InferenceMethod ProductOr or FuzzyAdd.


Product

public static final int Product
Fuzzy Correlation method: Product: scale the consequent fuzzy region using the truth of the predicate (the shape of the fuzzy region is preserved):
     a[i] = a[i] * PredicateTruth
 

Used by the Fuzzy inference engine with InferenceMethod ProductOr or FuzzyAdd.


Minimum

public static final int Minimum
Fuzzy Correlation method: Minimise: truncate the consequent fuzzy region at the truth of the premise (creating a plateau):
     a[i] = minimum( a[i], PredicateTruth )
 

Usually used with InferenceMethod MinMax.


DefuzzifyMethod

public static final java.lang.String DefuzzifyMethod
Defuzzification method: Centroid: Take the center of the fuzzy region.

Centroid

public static final int Centroid
Defuzzification method: Centroid: Take the center of the fuzzy region.

MaxHeight

public static final int MaxHeight
Defuzzification method: MaxHeight: Take the value at the highest point.

AverageHeight

public static final int AverageHeight
Defuzzification method: Average: Take the average height point.

AlphaCut

public static final java.lang.String AlphaCut
Fuzzy alphaCut control parameter

Up

public static final int Up

Down

public static final int Down

Left

public static final int Left

Right

public static final int Right

THIS_AND_PRIOR

public static final java.lang.String THIS_AND_PRIOR

THIS_AND_FUTURE

public static final java.lang.String THIS_AND_FUTURE

ALL_MONTHS

public static final int ALL_MONTHS
MONTH OF YEAR bitmasks - per IETF Policy Framework

Example - 0x8000 = { Jan } Example - 0x0010 = { Dec } Example - 0x1C00 = { Apr, May, June }


JANUARY

public static final int JANUARY

FEBRUARY

public static final int FEBRUARY

MARCH

public static final int MARCH

APRIL

public static final int APRIL

MAY

public static final int MAY

JUNE

public static final int JUNE

JULY

public static final int JULY

AUGUST

public static final int AUGUST

SEPTEMBER

public static final int SEPTEMBER

OCTOBER

public static final int OCTOBER

NOVEMBER

public static final int NOVEMBER

DECEMBER

public static final int DECEMBER

FIRST_QUARTER

public static final int FIRST_QUARTER

SECOND_QUARTER

public static final int SECOND_QUARTER

THIRD_QUARTER

public static final int THIRD_QUARTER

FOURTH_QUARTER

public static final int FOURTH_QUARTER

ALL_DAYS_OF_WEEK

public static final int ALL_DAYS_OF_WEEK
DAY OF WEEK bitmasks -- per IETF Policy Framework Last bit is always 0

Example - 0x80 = { Sunday } Example - 0x7C = { Mon, Tues, Wed, Thurs, Fri } Example - 0x82 = { Sunday, Saturday }


SUNDAY

public static final int SUNDAY

MONDAY

public static final int MONDAY

TUESDAY

public static final int TUESDAY

WEDNESDAY

public static final int WEDNESDAY

THURSDAY

public static final int THURSDAY

FRIDAY

public static final int FRIDAY

SATURDAY

public static final int SATURDAY

WEEKDAY

public static final int WEEKDAY

WEEKEND

public static final int WEEKEND

ALL_DAYS_OF_MONTH

public static final long ALL_DAYS_OF_MONTH
DAY OF MONTH

First 31 bits are day from start of month Second 31 bits are days from end of month Last 2 bits are always 0

Example 0x80 00 00 01 00 00 00 00


DAY_1

public static final long DAY_1

DAY_2

public static final long DAY_2

DAY_3

public static final long DAY_3

DAY_4

public static final long DAY_4

DAY_5

public static final long DAY_5

DAY_6

public static final long DAY_6

DAY_7

public static final long DAY_7

DAY_8

public static final long DAY_8

DAY_9

public static final long DAY_9

DAY_10

public static final long DAY_10

DAY_11

public static final long DAY_11

DAY_12

public static final long DAY_12

DAY_13

public static final long DAY_13

DAY_14

public static final long DAY_14

DAY_15

public static final long DAY_15

DAY_16

public static final long DAY_16

DAY_17

public static final long DAY_17

DAY_18

public static final long DAY_18

DAY_19

public static final long DAY_19

DAY_20

public static final long DAY_20

DAY_21

public static final long DAY_21

DAY_22

public static final long DAY_22

DAY_23

public static final long DAY_23

DAY_24

public static final long DAY_24

DAY_25

public static final long DAY_25

DAY_26

public static final long DAY_26

DAY_27

public static final long DAY_27

DAY_28

public static final long DAY_28

DAY_29

public static final long DAY_29

DAY_30

public static final long DAY_30

DAY_31

public static final long DAY_31

LAST_DAY_31

public static final long LAST_DAY_31

LAST_DAY_30

public static final long LAST_DAY_30

LAST_DAY_29

public static final long LAST_DAY_29

LAST_DAY_28

public static final long LAST_DAY_28

LAST_DAY_27

public static final long LAST_DAY_27

LAST_DAY_26

public static final long LAST_DAY_26

LAST_DAY_25

public static final long LAST_DAY_25

LAST_DAY_24

public static final long LAST_DAY_24

LAST_DAY_23

public static final long LAST_DAY_23

LAST_DAY_22

public static final long LAST_DAY_22

LAST_DAY_21

public static final long LAST_DAY_21

LAST_DAY_20

public static final long LAST_DAY_20

LAST_DAY_19

public static final long LAST_DAY_19

LAST_DAY_18

public static final long LAST_DAY_18

LAST_DAY_17

public static final long LAST_DAY_17

LAST_DAY_16

public static final long LAST_DAY_16

LAST_DAY_15

public static final long LAST_DAY_15

LAST_DAY_14

public static final long LAST_DAY_14

LAST_DAY_13

public static final long LAST_DAY_13

LAST_DAY_12

public static final long LAST_DAY_12

LAST_DAY_11

public static final long LAST_DAY_11

LAST_DAY_10

public static final long LAST_DAY_10

LAST_DAY_9

public static final long LAST_DAY_9

LAST_DAY_8

public static final long LAST_DAY_8

LAST_DAY_7

public static final long LAST_DAY_7

LAST_DAY_6

public static final long LAST_DAY_6

LAST_DAY_5

public static final long LAST_DAY_5

LAST_DAY_4

public static final long LAST_DAY_4

LAST_DAY_3

public static final long LAST_DAY_3

LAST_DAY_2

public static final long LAST_DAY_2

LAST_DAY_1

public static final long LAST_DAY_1

TRACE_NONE

public static final int TRACE_NONE
Constants used to set trace levels

TRACE_LOW

public static final int TRACE_LOW

TRACE_MEDIUM

public static final int TRACE_MEDIUM

TRACE_HIGH

public static final int TRACE_HIGH

init

public static final java.lang.String init
Rule Block Name: Init

The "init" rule block is processed once when the AbleRuleSet init() method is invoked.


preProcess

public static final java.lang.String preProcess
Rule Block Name: PreProcess

The "preProcess" rule block is meant to be called before the process() rule block is called.


process

public static final java.lang.String process
Rule Block Name: Process

The "process" rule block is meant to be processed multiple times, once for each "process" cycle, and it is meant to be processed by a specialized inference engine, such as a fuzzy logic inference engine or a bollean forward chainer. The rules are processed in an order determined by the inference engine.


postProcess

public static final java.lang.String postProcess
Rule Block Name: PostProcess

The "postProcess" rule block is meant to be processed each time processing of the process() rule block quiesces.


processTimerEvent

public static final java.lang.String processTimerEvent
Rule Block Name: ProcessTimerEvent

The "processTimerEvent" rule block is called to process timer events generated by the ruleset bean.


processAbleEvent

public static final java.lang.String processAbleEvent
Rule Block Name: ProcessAbleEvent

The "processAbleEvent" rule block is called to process able events received by the ruleset bean due to a handleAbleEvent() (or processAbleEvent()) method invocation. The rules can access the event object via the "event" built-in variable.


quitAll

public static final java.lang.String quitAll
Rule Block Name: QuitAll

The "finally" rule block is called when the bean quitAll() method is invoked.


ControlStrategy

public static final java.lang.String ControlStrategy
Forward engine control strategy:

Used by the Forward inference engine to specify the algorithm used for inferencing, either FIRE_ALL_RULES , FIRE_ONE_RULE, or FIRE_N_RULES.


FIRE_ALL_RULES

public static final int FIRE_ALL_RULES

FIRE_ONE_RULE

public static final int FIRE_ONE_RULE

FIRE_N_RULES

public static final int FIRE_N_RULES

NumberOfRulesToFire

public static final java.lang.String NumberOfRulesToFire
Forward engine - number of rules to fire:

Used by the Forward inference engine to specify the number of rules to fire when FIRE_N_RULES is used as the control strategy.

Constructor Detail

ARL

public ARL()
Method Detail

severe

public static void severe(java.lang.String text)
Write severe error text to the global message logger.
Parameters:
text - The text to be written.

warning

public static void warning(java.lang.String text)
Write warning text to the global message logger.
Parameters:
text - The text to be written.

info

public static void info(java.lang.String text)
Write informational text to the global message logger.
Parameters:
text - The text to be written.

fine

public static void fine(AbleRuleSet ruleset,
                        java.lang.String text)
Write low level text to the ruleset's trace logger. Only the most significant of messages should use this level.
Parameters:
ruleset - The ruleset owning the trace logger.
text - The text to be written.

finer

public static void finer(AbleRuleSet ruleset,
                         java.lang.String text)
Write medium level text to the ruleset's trace logger. Use this for typical messages.
Parameters:
ruleset - The ruleset owning the trace logger.
text - The text to be written.

finest

public static void finest(AbleRuleSet ruleset,
                          java.lang.String text)
Write high level text to the ruleset's trace logger. Use this for very detailed messages that typically would not need to be shown.
Parameters:
ruleset - The ruleset owning the trace logger.
text - The text to be written.

setTraceLevel

public static void setTraceLevel(AbleRuleSet ruleset,
                                 int level)
Set the trace level for a ruleset.
Parameters:
ruleset - The ruleset owning the trace logger.
level - The level to use. ARL.TRACE_NONE, ARL.TRACE_LOW = fine, etc

loadVarsFromPropertiesFile

public static void loadVarsFromPropertiesFile(AbleRuleSet theRuleSet,
                                              java.lang.String theFileName)
                                       throws java.rmi.RemoteException
Load the properties file and assign any matching properties to variables with the same name.
Parameters:
theRuleSet - The rule set whose variables are to be set using the properties file.

theFileName - The complete file path to the specified properties file.


getSystemProperty

public static java.lang.String getSystemProperty(java.lang.String thePropertyName)
                                          throws java.rmi.RemoteException
Return the value of the specified system property.
Parameters:
thePropertyName - The String name of the system property.

Returns:
The String value of the specified property.

getSystemProperty

public static java.lang.String getSystemProperty(java.lang.String thePropertyName,
                                                 java.lang.String theDefaultValue)
                                          throws java.rmi.RemoteException
Return the value of the specified system property. If the system property does not exist, return the default value provided.
Parameters:
thePropertyName - The String name of the system property.

theDefaultValue - The default value to use if the property does not exist.

Returns:
The String value of the specified property.

setSystemProperty

public static void setSystemProperty(java.lang.String thePropertyName,
                                     java.lang.String theValue)
                              throws java.rmi.RemoteException
Set a system property to the specified value.
Parameters:
thePropertyName - The String name of the system property.

theValue - The String value of the specified property.


getBeanOutput

public static java.util.Vector getBeanOutput(AbleBean theBean)
                                      throws java.rmi.RemoteException
Retrieve the specified bean's output buffer as a Vector of objects regardless of the underlying outputbuffer representation

Note: Only double[], String[], Object[], and Vector are supported.

Parameters:
theBean - An AbleBean

Returns:
A Vector containing the contents of the bean's output buffer.
Throws:
java.rmi.RemoteException - if an error occurs while obtaining the bean's output buffer.

invokeCommandOS

public static boolean invokeCommandOS(java.lang.String theCommand)
                               throws java.rmi.RemoteException
Invoke the command provided as provided.

Usage: result = invokeCommand("cmd /c Start command.com")

Parameters:
theCommand - A String containing the command to be passed to the runtime.
Returns:
A boolean indicating whether the command was successfully invoked.
Throws:
AbleException - On any error.
See Also:
Able.runOS(String)

invokeCommand

public static boolean invokeCommand(java.lang.String theCommand)
                             throws java.rmi.RemoteException
Invoke the command provided; prepend any necessary operating system arguments. Useful for system independant rulesets.

Usage: result = invokeCommand("netscape.exe")

Parameters:
theCommand - A String containing the command to be passed to the runtime.
Returns:
A boolean indicating whether the command was successfully invoked.
Throws:
AbleException - On any error.

processRuleSet

public static java.lang.Object processRuleSet(AbleRuleSet theRuleSet,
                                              java.lang.Object theInputBuffer)
                                       throws java.rmi.RemoteException
Call the RuleSet via the process() method, passing a list of parameters via the bean's input buffer and returning the first element of the bean's output buffer in outputList.

Usage: ResultVar = processRuleSet(rs, inputs);

Parameters:
theRuleSet - An AbleRuleSet.

theInputBuffer - An Object[] or Vector of values to be passed in the input buffer of the ruleset.

Returns:
The outputBuffer[0] object.

setAbleEventProcessingStates

public static void setAbleEventProcessingStates(AbleBean theAbleBean,
                                                boolean processingEnabled,
                                                boolean postingEnabled)
                                         throws java.rmi.RemoteException
Deprecated. As of version 1.3d, object.method() syntax makes this method obsolete. Use theAbleBean.setAbleEventProcessingStates(Able.ProcessingEnabled_PostingEnabled);

Call the AbleBeans setAbleEventProcessingEnabled() method, with asynchronous event processing and posting enabled/disabled as specified by the corresponding boolean flags.
Parameters:
theAbleBean - An AbleBean object to be invoked.

processingEnabled - The desired state of asynchronous event processing.

postingEnabled - The desired state of asynchronous event posting.


assertDataSource

public static void assertDataSource(AbleWorkingMemory wm,
                                    AbleDataSource dataSource,
                                    java.lang.String className)
                             throws java.rmi.RemoteException
Assert all records in a data source into working memory. The data source must be initialized. It will be processed once to obtain each record. An object for each record will be instantiated, and the record's field values will be data members for that object.
Parameters:
wm - The Working Memory.
dataSource - The AbleDataSource object which provides the data.
className - The name of the class to instantiate for each record, set its values, and assert to working memory. The class must provide setter methods for each field in the dataSource. For example, if there is a field named "weightInKG" there must be a method named setWeightInKG(Object) in the named class.


showWorkingMemory

public static java.lang.String showWorkingMemory(AbleWorkingMemory wm)
Returns a formatted string of the contents of the working memory to use for debugging.
Parameters:
wm - The working memory object to display

stringWord

public static java.lang.String stringWord(java.lang.String target,
                                          int index)
Return a word from a space-delimited String of words.

Usage: StringVar1 = word(targetString,3);

Parameters:
target - The String of space-delimited words.

index - The position of the word to return.

Returns:
The nth word.

stringWords

public static int stringWords(java.lang.String target)
Count the words in a space-delimited String of words.

Usage: StringVar1 = words(targetString);

Parameters:
target - The String of space-delimited words.

Returns:
The number of words.

stringToList

public static java.util.Vector stringToList(java.lang.String target)
Return a list from a space-delimited String of words.

Usage: ListVar1 = stringToList(targetString);

Parameters:
target - The String of space-delimited words.

Returns:
The list of words.

stringToArray

public static java.lang.Object[] stringToArray(java.lang.String target)
Return a list from a space-delimited String of words.

Usage: ListVar1 = stringToList(targetString);

Parameters:
target - The String of space-delimited words.

Returns:
The list of words.

stringToList

public static java.util.Vector stringToList(java.lang.String target,
                                            java.lang.String delimiter)
Return a list from a delimited String of words.

Usage: ListVar1 = stringToList(targetString,",");

Parameters:
target - The String of delimited words.

delimiter - The delimiter String which separates the words.

Returns:
The list of words.

isTimeAM

public static boolean isTimeAM(java.util.Calendar theCalendar)
                        throws java.rmi.RemoteException
Determine whether the time in the specified calendar is AM.
Parameters:
theCalendar - A Calendar object.

Returns:
true if the time in the specified calendar is AM.

isTimePM

public static boolean isTimePM(java.util.Calendar theCalendar)
                        throws java.rmi.RemoteException
Determine whether the time in the specified calendar is PM.
Parameters:
theCalendar - A Calendar object.

Returns:
true if the time in the specified calendar is PM.

isLeapYear

public static boolean isLeapYear(java.util.GregorianCalendar theCalendar,
                                 int theYear)
                          throws java.rmi.RemoteException
Determine whether the specified year is a leap year.
Parameters:
theCalendar - A GregorianCalendar object.

theYear - The year to test.

Returns:
true if the specified year is a leap year.

parseDateAndTime

public static java.util.Calendar parseDateAndTime(java.lang.String theDateString)
                                           throws java.text.ParseException,
                                                  java.rmi.RemoteException
Create a Calendar object from a String representation of a date and time using the default date format.
Parameters:
theDateString - A string representation of a date and time.

Returns:
A Calendar object set with the specified date and time.

parseDateAndTime

public static java.util.Calendar parseDateAndTime(java.lang.String theDateString,
                                                  java.lang.String theFormatString)
                                           throws java.text.ParseException,
                                                  java.rmi.RemoteException
Create a Calendar object from a String representation of a date and time using the default date format.
Parameters:
theDateString - A string representation of a date and time.

theFormatString - The date format string; for example, "yyyy.MM.dd G 'at' hh:mm:ss a zzz".

Returns:
A Calendar object set with the specified date and time.

loadVarsFromMap

public static void loadVarsFromMap(AbleRuleSet theRuleSet,
                                   java.util.Map theMap)
                            throws AbleException
Load the properties file and assign any matching properties to variables with the same name.
Parameters:
theRuleSet - The rule set whose variables are to be set using the properties file.

theMap - The Map that contains variable content keyed by variable name.


loadMapFromVars

public static void loadMapFromVars(AbleRuleSet theRuleSet,
                                   java.util.Map theMap,
                                   java.util.Vector theVariableList)
                            throws AbleException
Load the supplied hashmap with matching variables found in the variable list.
Parameters:
theRuleSet - The rule set whose variables are to be set using the properties file.

theMap - The Map that contains variable content keyed by variable name.

theVariableList - The Variable List that contains variable names to be added to the Map.


loadMapFromVars

public static void loadMapFromVars(AbleRuleSet theRuleSet,
                                   java.util.Map theMap,
                                   java.util.Vector theVariableList,
                                   java.lang.Boolean theOverwriteFlag)
                            throws AbleException
Load the supplied hashmap with matching variables found in the variable list.
Parameters:
theRuleSet - The rule set whose variables are to be set using the properties file.

theMap - The Map that contains variable content keyed by variable name.

theVariableList - The Variable List that contains variable names to be added to the Map.

theOverwriteFlag - The Overwrite Flag determines if you can (true) overwrite existing entries in the Map.


Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003