Class DependencyProfile
java.lang.Object
com.aquima.interactions.profile.wrapper.ReadonlyProfile
com.aquima.interactions.rule.inference.DependencyProfile
- All Implemented Interfaces:
IEventChannel
,IProfile
,IProfileLifecycle
,InferenceContext
,Serializable
Profile wrapper that keeps track of all the used entity instances. This wrapper is used to gather the dependencies
during the evaluation of a rule.
- Since:
- 5.0
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DependencyProfile
(InferenceContext profile, IEntityInstance goal) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDependency
(Dependency dependency) getActiveInstance
(String entityName) This method returns the active instance for the specified type.getAllInstancesForEntity
(String entityName, boolean includeChildren) This method returns all existing instances of a certain type in the profile.protected Dependency[]
getInferenceDetails
(ValueReference attributeReference) This method may be used to request detailed inference information for a specific attribute.protected IEntityInstance
wrapInstance
(IEntityInstance instance) Methods inherited from class com.aquima.interactions.profile.wrapper.ReadonlyProfile
activate, addEventListener, commitTransaction, createInstance, createInstance, deleteInstance, getEntityDefinition, getInstance, getInstanceById, getInstanceByName, getProfile, getSingletonInstance, getState, getSupportedEvents, passivate, removeEventListener, restore, rollbackTransaction, startTransaction
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.foundation.events.IEventChannel
addEventListener, getSupportedEvents, removeEventListener
Methods inherited from interface com.aquima.interactions.profile.IProfile
commitTransaction, createInstance, createInstance, deleteInstance, getEntityDefinition, getInstance, getInstanceById, getInstanceByName, getSingletonInstance, getState, restore, rollbackTransaction, startTransaction
Methods inherited from interface com.aquima.interactions.profile.IProfileLifecycle
activate, passivate
-
Constructor Details
-
DependencyProfile
-
-
Method Details
-
wrapInstance
- Overrides:
wrapInstance
in classReadonlyProfile
-
getActiveInstance
Description copied from interface:InferenceContext
This method returns the active instance for the specified type. When no active instance can be found for the specified type, the type is assumed to be a singleton instance. When this method is invoked for a non singleton type without any active instance, the call to the getSingletonInstance will fail due to a CreateInstanceException.- Specified by:
getActiveInstance
in interfaceInferenceContext
- Parameters:
entityName
- The entity type for which the active instance is requested.- Returns:
- The instance that is active for the specified type.
-
getAllInstancesForEntity
Description copied from interface:IProfile
This method returns all existing instances of a certain type in the profile. Even when there are no instances available for a certain type an empty array will be returned.- Specified by:
getAllInstancesForEntity
in interfaceIProfile
- Overrides:
getAllInstancesForEntity
in classReadonlyProfile
- Parameters:
entityName
- The entity type for which the instances are requested.includeChildren
- when this option is passed as true, all child entity-types are also returned.- Returns:
- An array of instances for the specified type (never null).
-
getDependencies
-
addDependency
-
getInferenceDetails
Description copied from interface:InferenceContext
This method may be used to request detailed inference information for a specific attribute. The details object contains information like which rule inferenced the value, and what other values were used by the rule engine to determine the current result.- Specified by:
getInferenceDetails
in interfaceInferenceContext
- Parameters:
attributeReference
- The reference to the attribute whose inference information is requested.- Returns:
- Object containing detailed information about the value related to the inference process.
-