ETPackageDescription class documentation

Authors

Quentin Mathe (quentin.mathe@gmail.com)

Copyright: (C) 2010 Quentin Mathe

Software documentation for the ETPackageDescription class

ETPackageDescription : ETModelElementDescription

Declared in:
ETPackageDescription.h
Conforms to:
ETCollection
ETCollectionMutation

@group Model and Metamodel @abstract Collection of related entity descriptions, usually equivalent to a data model.

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.

Method summary

newEntityDescription 

+ (ETEntityDescription*) newEntityDescription;

@taskunit Metamodel Description

Self-description (aka meta-metamodel).


addEntityDescription: 

- (void) addEntityDescription: (ETEntityDescription*)anEntityDescription;

@taskunit Packaged Entity Descriptions

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: .


addPropertyDescription: 

- (void) addPropertyDescription: (ETPropertyDescription*)propertyDescription;

@taskunit Packaged Entity Extensions

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.


checkConstraints: 

- (void) checkConstraints: (NSMutableArray*)warnings;

@taskunit Runtime Consistency Check

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


removeEntityDescription: 

- (void) removeEntityDescription: (ETEntityDescription*)anEntityDescription;

Removes the given entity from the package.


removePropertyDescription: 

- (void) removePropertyDescription: (ETPropertyDescription*)propertyDescription;

Removes the given entity extension from the package.