com.hammurapi.reasoning.spi.model
Interface Rule

All Superinterfaces:
CommonObject, org.eclipse.emf.ecore.EObject, Factory, Named, NamedObjectDefinition, org.eclipse.emf.common.notify.Notifier, ObjectDefinition, PropertySource
All Known Implementing Classes:
RuleImpl

public interface Rule
extends NamedObjectDefinition

A representation of the model object 'Rule'. Rule class contains inference methods.

The following features are supported:

See Also:
ModelPackage.getRule()

Method Summary
 int getPriority()
          Returns the value of the 'Priority' attribute.
 void setPriority(int value)
          Sets the value of the 'Priority' attribute.
 
Methods inherited from interface com.hammurapi.config.Named
getName, inject, isRuntime, setName, setRuntime
 
Methods inherited from interface com.hammurapi.config.ObjectDefinition
getConstructor, getType, getValue, setConstructor, setType, setValue
 
Methods inherited from interface com.hammurapi.config.Factory
compile, create, getConfigScript, getDescription, getHomePage, getId, getService, getSource, getSupportedExecutionEnvironments, isEnabled, setConfigScript, setDescription, setEnabled, setHomePage, setId
 
Methods inherited from interface com.hammurapi.party.CommonObject
getRoles
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface com.hammurapi.config.PropertySource
getClassPath, getProfile, getProperty, injectProperties
 

Method Detail

getPriority

int getPriority()
Returns the value of the 'Priority' attribute. The default value is "0". Rule priority applies to all inference methods in the rule. Priority specified in @Infer annotation overrides rule level priority setting. Rules with higher priority are executed before rules with lower priority. Rules with higher priority can "consume" input fact, thus preventing invocation of rules with lower priority. Order of execution of rules with the same priority is undefined.

Returns:
the value of the 'Priority' attribute.
See Also:
setPriority(int), ModelPackage.getRule_Priority()

setPriority

void setPriority(int value)
Sets the value of the 'Priority' attribute.

Parameters:
value - the new value of the 'Priority' attribute.
See Also:
getPriority()