How to visualize collections
- Last Updated: June 9, 2021
- 2 minute read
- Corticon
- Version 7.2
- Documentation
Collections of data can be visualized as discrete portions, subsets, or branches of the Vocabulary tree. A parent entity is associated with a set of child entities, which are called call elements of the collection. The collection of pilots can be illustrated as:
In this figure, the aircraft entity is the
parent of the collection, while each pilot is a child
element of the collection. As you saw in the role example, this collection is expressed as
aircraft.pilot in the Corticon Rule Language. It is important to reiterate that this
collection contains scope. You are seeing the collection of pilots as they relate to this
aircraft. Or, more simply, you are seeing a plane and its 2 pilots, arranged in a way that
is consistent with the Vocabulary. Whenever a rule exists that contains or uses this same
scope, it also automatically evaluates this collection of data.
And, if there are multiple collections with the same scope (for example, several aircraft,
each with its own collection of pilots), then the rule automatically evaluates all those
collections as well. In the Corticon lexicon, evaluate has a different meaning than fire.
Evaluate means that a rule's scope and conditions will be
compared to the data to see if they are satisfied. If they are satisfied, then the rule fires, and its actions are executed.
Collections can be much more complex than this simple pilot example. For instance, a collection can include more than one type or level of association:
This collection is expressed as parent.child.grandchild in the
Corticon Rule Language.