Documentation

ETPackageDescription class documentation

ETPackageDescription : ETModelElementDescription <ETCollection, ETCollectionMutation>

Collection of related entity descriptions, usually equivalent to a data model.

AuthorsGenerated by qmathe
Declared inETPackageDescription.h

Overview

A package can also include extensions to other entity descriptions. An extension is a property description whose owner doesn't belong to the package it gets added to.

For example, a category can be described with a property description array, and these property descriptions packaged as extensions to be resolved later (usually when the package is imported/deserialized).

From a Model Builder perspective, a package is the document you work on to specify a data model.


Metamodel Description

+ (ETEntityDescription *) newEntityDescription

Self-description (aka meta-metamodel).

    Querying Type

    - (BOOL) isPackageDescription

    Returns YES.

      - (NSString *) typeDescription

      Returns Package.

        Packaged Entity Descriptions

        - (void) addEntityDescription: (ETEntityDescription *)anEntityDescription

        Adds the given entity to the package, the package becomes its owner.

        Will remove every property from the package that extends this entity and previously added with -addPropertyDescription: or -setPropertyDescriptions: .

          - (void) removeEntityDescription: (ETEntityDescription *)anEntityDescription

          Removes the given entity from the package.

            - (NSSet *) entityDescriptions

            The entities that belong to the package.

            For each entity added or removed, the behavior described in -addEntityDescription: and -removeEntityDescription: applies.

            The returned collection is an autoreleased copy.

              - (void) setEntityDescriptions: (NSSet *)entityDescriptions

              The entities that belong to the package.

              For each entity added or removed, the behavior described in -addEntityDescription: and -removeEntityDescription: applies.

              The returned collection is an autoreleased copy.

                Packaged Entity Extensions

                - (void) addPropertyDescription: (ETPropertyDescription *)propertyDescription

                Adds the given entity extension to the package.

                The property owner must be the entity to be extended.

                Raises an NSInvalidArgumentException when the property owner is nil or already belongs to the package.

                  - (void) removePropertyDescription: (ETPropertyDescription *)propertyDescription

                  Removes the given entity extension from the package.

                    - (NSSet *) propertyDescriptions

                    The entity extensions that belong to the package.

                    For each entity extensions added or removed, the behavior described in -addPropertyDescription: and -removePropertyDescription: applies.

                    The returned collection is an autoreleased copy.

                      - (void) setPropertyDescriptions: (NSSet *)propertyDescriptions

                      The entity extensions that belong to the package.

                      For each entity extensions added or removed, the behavior described in -addPropertyDescription: and -removePropertyDescription: applies.

                      The returned collection is an autoreleased copy.

                        Runtime Consistency Check

                        - (void) checkConstraints: (NSMutableArray *)warnings

                        Checks the receiver conforms to the FM3 constraint spec and adds a short warning to the given array for each failure.