concrete.util.references module

Add reference variables for each UUID “pointer” in a Communication

concrete.util.references.add_references_to_communication(comm)

Create references for each UUID ‘pointer’

Parameters:comm (Communication) – A Concrete Communication object, will be modified by this function

The Concrete schema uses UUID objects as internal pointers between Concrete objects. This function adds member variables to Concrete objects that are references to the Concrete objects identified by the UUID.

For example, each Entity has a mentionIdlist that lists the UUIDs of the EntityMention objects for that Entity. This function adds a mentionList variable to the Entity that is a list of references to the actual EntityMention objects. This allows you to access the EntityMention objects using:

entity.mentionList

This function adds these reference variables:

And adds these lists of reference variables:

For variables that represent optional lists of UUID objects (e.g. situation.mentionIdList), Python Thrift will set the variable to None if the list is not provided. When this function adds a list-of-references variable (in this case, situation.mentionList) for an omitted optional list, it sets the new variable to None - it DOES NOT leave the variable undefined.