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.
 
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.
 
void initEntityInPlace (const EntityBasePtr &updateEntity)
 
 PriorAttributeEnrichmentFusion (const PriorKnowledgeInterfacePrx &priorKnowledgePrx, bool forceOverwrite=false)
 Creates a new PriorAttributeEnrichmentFusion.
 
- Public Member Functions inherited from EntityFusionMethod
 EntityFusionMethod (std::string methodName)
 Constructs a new fusion method.
 
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.
 

Constructor & Destructor Documentation

◆ PriorAttributeEnrichmentFusion()

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

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.

◆ 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

◆ initEntityInPlace()

void initEntityInPlace ( const EntityBasePtr & updateEntity)

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