PriorAttributeEnrichmentFusion Class Reference

#include <MemoryX/components/WorkingMemory/PriorAttributeEnrichmentFusion.h>

+ Inheritance diagram for PriorAttributeEnrichmentFusion:

Public Member Functions

EntityBasePtr fuseEntity (const EntityBasePtr &oldEntity, const EntityBasePtr &newEntity, const ::Ice::Current &) override
 This method should be called each time an existing entity gets updated. More...
 
EntityBasePtr initEntity (const EntityBasePtr &updateEntity, const ::Ice::Current &=Ice::emptyCurrent) override
 This method should be called each time a new entity (currently: object instance) is created and performs attribute enrichment for it. More...
 
void initEntityInPlace (const EntityBasePtr &updateEntity)
 
 PriorAttributeEnrichmentFusion (const PriorKnowledgeInterfacePrx &priorKnowledgePrx, bool forceOverwrite=false)
 Creates a new PriorAttributeEnrichmentFusion. More...
 
- Public Member Functions inherited from EntityFusionMethod
 EntityFusionMethod (std::string methodName)
 Constructs a new fusion method. More...
 
std::string getMethodName (const ::Ice::Current &=Ice::emptyCurrent) const override
 
EntityBasePtr initEntity (const EntityBasePtr &updateEntity, const ::Ice::Current &=Ice::emptyCurrent) override
 Initialization of an entity. More...
 

Detailed Description

Definition at line 39 of file PriorAttributeEnrichmentFusion.h.

Constructor & Destructor Documentation

◆ PriorAttributeEnrichmentFusion()

PriorAttributeEnrichmentFusion ( const PriorKnowledgeInterfacePrx &  priorKnowledgePrx,
bool  forceOverwrite = false 
)

Creates a new PriorAttributeEnrichmentFusion.

Definition at line 33 of file PriorAttributeEnrichmentFusion.cpp.

Member Function Documentation

◆ fuseEntity()

EntityBasePtr fuseEntity ( const EntityBasePtr &  oldEntity,
const EntityBasePtr &  newEntity,
const ::Ice::Current &   
)
overridevirtual

This method should be called each time an existing entity gets updated.

It checks whether entity class has changed and if this is a case, adds/removes prior attributes accordingly.

Parameters
oldEntityentity before update
newEntityentity after update
Returns
entity enriched with prior attributes

Implements EntityFusionMethod.

Definition at line 61 of file PriorAttributeEnrichmentFusion.cpp.

◆ initEntity()

EntityBasePtr initEntity ( const EntityBasePtr &  updateEntity,
const ::Ice::Current &  = Ice::emptyCurrent 
)
override

This method should be called each time a new entity (currently: object instance) is created and performs attribute enrichment for it.

Concretely, it complements the entity with attributes of the corresponding class stored in PriorKnowledge. If entity class is not specified or absent in PriorKnoledge, no action will be taken. If the same attribute exists both in the entity and in its class definition, value from entity will be used.

Parameters
updateEntityentity
Returns
entity enriched with prior attributes

Definition at line 48 of file PriorAttributeEnrichmentFusion.cpp.

◆ initEntityInPlace()

void initEntityInPlace ( const EntityBasePtr &  updateEntity)

Definition at line 38 of file PriorAttributeEnrichmentFusion.cpp.

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: