skip to main content
Corticon Studio: Rule Modeling Guide : Building the Vocabulary : Support for inheritance
 

Try Corticon Now

Support for inheritance

UML Class diagrams frequently include a modeling/programming concept called inheritance, whereby a class may inherit attributes and/or associations from another class.  For example:
Figure 30. Rose UML Model Showing Inheritance
In this diagram, we see a UML model that includes inheritance. The solid-headed arrow symbol indicates that the Employee class is a descendant of the Person class, and therefore inherits some of its properties. Specifically, the Employee class inherits the age and name attributes from Person. In other words, Employee has all the same attributes of a Person plus two of its own, hireDate and IDnumber. Likewise, Aircraft inherits all of Equipment's attributes (acquireDate and propertyID )plus has attributes of its own, type and tailNumber.
Modeling this UML Class Diagram as a Corticon Vocabulary is straightforward.  All Entities, Attributes and Associations are created as per normal practice. To incorporate the elements of inheritance, we only need add one additional setting for each of the descendant entities, as shown:
Figure 31. Selecting Ancestor Entity for Descendant
Once all descendant entities have been configured to inherit from their proper ancestor entities, we can save the Vocabulary and view it in the Rule Vocabulary window:
Figure 32. Vocabulary with Inheritance
Notice that many of the term names and icons are varying shades of gray - these color codes help us to understand the inherited relationships that exist in the Vocabulary.
* Inherited Attributes
* Inherited Associations
* Controlling the tree view
* Using aliases with inheritance
* Inheritance's effects on rule execution
* Inheritance and Java object messaging