skip to main content
Corticon Studio: Rule Modeling Guide : Collections : Visualizing collections
 

Try Corticon Now

Visualizing collections

Collections of data may be visualized as discrete portions, subsets, or branches of the Vocabulary tree – a parent entity associated with a set of child entities, which we call elements of the collection. Looking back at the role example from a previous chapter, the collection of pilots can be illustrated as:
Figure 97. Visualizing a Collection of Pilots
In this figure, the aircraft entity is the parent of the collection, while each pilot is a child element of the collection. As we 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 – we are seeing the collection of pilots as they relate to this aircraft. Or, put more simply, we are seeing a plane and its 2 pilots, arranged in a way that is consistent with our Vocabulary. Whenever a rule exists that contains or uses this same scope, it will also automatically evaluate 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 will automatically evaluate all those collections, as well. In our 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:
Figure 98. 3-Level Collection
This collection is expressed as parent.child.grandchild in the Corticon Rule Language. Now let's look at a simple collection operator and understand how it works given the collection in Visualizing a Collection of Pilots.
Note: The parent and child nomenclature is a bit arbitrary. Assuming bidirectional associations, a child from one perspective could also be a parent in another.