Previous Table of Contents Next


6.2 Package Representations

   An HUTN document consists of a zero or more instances of the package from which the HUTN has been generated.

   [1] Document := ( 2:PackageInstance )*

   A package in the MOF type structure is a concept used for containing a collection of related classes and associations.

   [2] PackageInstance := 3:PackageHeader ( ‘{‘ 4:PackageBody ‘}’ | ‘;’ 4: PackageBody )

   [3] PackageHeader := <PackageName> 5:PackageIdentifier

   [4] PackageBody := ( 6:ClassInstance | 32:AssocInstance | 24:ClassifierLvlAttr) *

   [5] PackageIdentifier := 28:TextualValue

   Package instances are represented either by a block structure, with the package contents appearing either between braces, or following a single line introduction followed by a semicolon. Identifying attributes are not permitted on packages and, as such, packages are prefaced and identified by the name of the package, followed by a string-delimited arbitrary unique identifier. This identifier can be used for qualifying the identifiers of objects referenced between separate package instances in the same document. The package body consists of the class and association instances of the package, as well as any classifier-level attribute values, in accordance with the mappings described in 6.3, “Class Representations,? and 6.8, “Association Representations.? An example of the representation of a package instance is given in Figure 6-2, and 6.6, “Classifier-Level Attributes,? respectively.

   FamilyPackage “id-001? {

   Class instances here Association instances or links here

   }

   Figure 6-2 An example of a package instance representation

   The classes and associations whose instances can appear in the package body consist of all non-abstract classes and associations that reside in the target package, including those that result from package inheritance, those that are defined in nested packages, and those that are defined in clustered packages.