Rule Execution Server API

ilog.rules.engine
Class IlrRule

java.lang.Object
  extended by ilog.rules.engine.IlrRule
All Implemented Interfaces:
Serializable

public class IlrRule
extends Object
implements Serializable

Instances of the IlrRule class are rules in a ruleset. Rules are created using the parsing methods of IlrRuleset and are then exhibited by the ruleset.

See Also:
Serialized Form

Method Summary
 String getFormalComment()
          Returns the formal comment associated with the rule as a string.
 String getName()
          Returns the fully qualified name of the rule.
 IlrPackage getPackage()
          Returns the package in which the rule is defined.
 String getPacketName()
          Deprecated.  
 IlrPropertyList getProperties()
          Gets the properties of this rule.
 String getShortName()
          Returns the short name of the rule.
 boolean hasMetadata()
          Tests if a rule has metadata.
 IlrRuleFactory makeFactory()
          Builds a factory object that represents this rule.
 IlrRuleFactory makeFactory(IlrPackageFactory pkgF)
          Builds a factory object to represent this rule.
 void removeMetadata()
          Removes the rule's metadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasMetadata

public boolean hasMetadata()

Tests if a rule has metadata.

Returns:
true if the rule has metadata (by default). It returns false if the rule's metadata has been removed.

removeMetadata

public void removeMetadata()

Removes the rule's metadata. Removing a rule's metadata reduces its memory footprint. In some situations, once a rule has been consumed, its metadata is no longer useful and can be removed. A rule is consumed when the first rule engine making use of the rule has been executed, in other words, the runtime objects associated with the rule have been created. However, a rule without metadata cannot be dynamically selected in the sequential mode, it cannot be dynamically compiled and it cannot be used in static analysis.

Warning:Use this method with caution.


getPacketName

public final String getPacketName()
Deprecated. 

Returns the packet name of the rule or null if the rule does not have a packet attribute.

Returns:
The packet name of the rule.

getName

public final String getName()

Returns the fully qualified name of the rule.


getShortName

public String getShortName()

Returns the short name of the rule.


getFormalComment

public final String getFormalComment()

Returns the formal comment associated with the rule as a string. If the rule does not have a formal comment null is returned.

Returns:
The formal comment attached to the rule.

getProperties

public final IlrPropertyList getProperties()

Gets the properties of this rule.

Returns:
a property list.

makeFactory

public final IlrRuleFactory makeFactory()
Builds a factory object that represents this rule. Do not call this method when the ruleset of this rule is executed inside:

Returns:
The factory object that represents this rule.

makeFactory

public final IlrRuleFactory makeFactory(IlrPackageFactory pkgF)

Builds a factory object to represent this rule.

Parameters:
pkgF - An IlrRulesetFactory.
Returns:
The factory object of this rule.

getPackage

public IlrPackage getPackage()
Returns the package in which the rule is defined.

Returns:
The package that contains the rule.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013