next up previous contents
Next: Generalization Derived Classes Up: Derived Classes Previous: Derived Classes

Specialization Derived Classes

A specialization derived class, , is specified as a subclass of one or more derived or non-derived classes , , () with an optional condition Cond.

can also be required not to overlap other object classes, , , (n 0) using the following condition:

NOT IN and and NOT IN

By combining the above subconditions, consists of the subset of objects that belong to the intersection of classes , , satisfy the associated condition Cond, and do not belong to classes , . can have its own derived attributes.

<specialization derived class> ::= DERIVED OBJECT CLASS <class name>
                                   <permission mode>
                                   <class description>
                                   <class example>
                                   <specialization derivation>
                                   <conditions or null>
                                   <derived view attributes or null>
                                 ;
<specialization derivation> ::= DERIVATION ':' subclass of <class name list>
                              ;
<class name list> ::= <class name>
                    | <class name list> ',' <class name>
                    ;
<conditions or null> ::= <null>
                       | CONDITION ':' <conditions>
                       ;
<derived view attributes or null> ::= <null>
                                    | <derived view attributes>
                                    ;
<conditions> ::= <condition>
               | <conditions> AND <conditions>
               ;

A derived subclass condition can consist of one or more atomic comparisons connected by AND. Each attribute in an atomic comparison for a derived subclass must be a non-derived attribute of an underlying class for . Atomic comparisons in an OPM derived subclass condition are summarized in figure 1.

  
Figure 1: Atomic Comparisons in OPM Derived Subclass Conditions

<condition> ::= NOT IN <class name>
              | <class attribute name> IS NULL
              | <class attribute name> IS NOT NULL
              | <class attribute name> <comp op> <a primitive value>
              | <class attribute name> <comp op> <set of values>
              | <class attribute name> <comp op> <class attribute name>
              | <class attribute name> <match op> <string>
              | <class attribute name> <in op> <set of values>
              | <class attribute name> <in op> <class attribute name>
              ;
<comp op> ::= '=' <any all> | '!=' <any all> | '>' <any all>
            | '>=' <any all> | '<' <any all> | '<=' <any all>
            ;
<any all> ::= <null> | ANY | ALL
            ;
<match op> ::= MATCH | NOT MATCH
             ;
<in op> ::= IN | NOT IN
          ;
<set of values> ::= '{' <set of numbers> '}'
                  | '{' <set of strings> '}'
                  ;
<set of numbers> ::= <number>
                   | <set of numbers> ',' <number>
                   ;
<set of strings> ::= <string>
                   | <set of strings> ',' <string>
                   ;

An example of a specialization derived object class is class FRAGMENT_100 shown below:

DERIVED OBJECT CLASS FRAGMENT_100
   DESCRIPTION: "fragments longer than 100"
   DERIVATION: subclass of FRAGMENT
   CONDITION: [FRAGMENT] length > 100
   ATTRIBUTE owner_name  DERIVATION: [FRAGMENT] owner [PERSON] name [CHAR(80)]