April 2003
Rules for Object Model Extension
Rules for Object Model Extension
1. A derived type may add (extension) additional fields
(elements / attributes) to its base type.
2. A derived type may restrict one or more fields of its base type,
but only so that a derived field is a subset of the field of the base type.
Examples
: A derived type may …
• restrict an enumeration from a large set of options to a smaller set of options,
as long as every option in the derived set appears in the base set.
• remove a field of the base type, but only if the field is optional in the base type.
• require a field to appear, but only if the field is optional or required to appear
in the base type.
3. A derived type may not modify a field of its base type such that it violates
the constraints of its base type.
Examples
: A derived type may NOT …
• add additional enumerations to a field.
• remove a field that is required by its base type.
• modify the type of a field of its base type.
Webb’s
Rules
Webb’s
Rules
To ensure inheritance hierarchy integrity and consistency:
To ensure inheritance hierarchy integrity and consistency: