Share via


Inheritance

The relationship between a base ___domain element and a derived ___domain element is named inheritance. Domain classes, ___domain relationships, shapes, and connectors can have inheritance relationships. Inheritance is unlike embedding relationships and reference ___domain relationships because an inheritance relationship does not have explicit source and target elements, and it does not have properties. An inheritance relationship is represented on the diagram by a line that has a hollow arrow that points to the base element.

Before you can set inheritance between two ___domain relationships, there must already be an inheritance relationship between the two source ___domain classes and an inheritance relationship between the two target ___domain classes.

Procedures

To set inheritance between two ___domain classes

  1. Create a ___domain model that has at least two ___domain classes.

  2. In the Toolbox, select the Inheritance tool.

  3. Drag the derived class to the base class.

  4. Set the BaseClass property of the derived class to the name of the base class.

To set inheritance between two ___domain relationships

  1. Create a ___domain model that has at least four ___domain classes, for example, Book, FictionBook, Author, and FictionAuthor.

  2. Create two embedding relationships, as follows:

    • BookHasAuthor, which has source Book and target Author.

    • FictionBookHasFictionAuthor, which has source FictionBook and target FictionAuthor.

  3. Make FictionBook inherit from Book by clicking the Inheritance tool and then dragging FictionBook (the derived class) to Book (the base class). Repeat this step to make FictionAuthor inherit from Author.

  4. Make FictionBookHasFictionAuthor inherit from BookHasAuthor by clicking the Inheritance tool and clicking first FictionBookHasFictionAuthor (the derived relationship) and then BookHasAuthor (the base relationship).

See Also

Other Resources

Domain-Specific Language Tools Glossary

Change History

Date

History

Reason

July 2008

Rewrote and refactored project.

Content bug fix.