Previous Table of Contents Next


4.2.4 Representing minor concepts


   By contrast, MOF Attributes are denoted as minor concepts, and as such are represented differently. In their case, the attribute name is followed by a colon or equal sign, followed in turn by the value of the attribute. The attributes’ representations may be separated only by white space, or with a semi-colon terminator. White-space-only separation is possible because it is always feasible to know how many white-space separated ‘words’ will appear in an attribute’s value. No simple attributes are permitted white space within their values except string-typed attributes, whose values are delimited by a number of possible delimiting characters, or left undelimited, if their contents make this possible. Attributes whose values are class instances are represented either as instance references or as full instance declarations, depending on the nature of the attribute. These representations do have more than one ‘word’ in their value, but do not cause problems because the number of words is always fixed and known to the parser.

   References are displayed with the reference name followed by a colon or equal sign and the representation of the class instance that is referred to. This is almost identical to the representation of attributes, which could be seen as violating the principle of ‘different forms for different features.’ However, the role of references in the MOF is in many ways to provide a class instance with attribute-like access to other class-instances that are related by association links. For this reason, the underlying ‘feature’ of references and class-instance valued attributes is essentially the same, and thus their representations should in fact be similar.