XNewCollectionPattern

New collection pattern as discussed at Lawrence Sprint
(note that some class names are not final until we retire existing classes with same/similar names)

REALIZATION
(by realizing the abstract extension base for list and listRelation the number of needed subtypes can be recorded, added to or constrained to as appropriate. This could be a realization of an UnorderedList, StrictOrderList, or OrderedListRelation).

The primary entry point to this pattern is NewCollection. It provides collection level information plus a relationship to the base collection type that describes the members and relationships within the collection. Note that in complex collections this would point to the collection type serving as the entry point, for example the OrderListRelation between the top member of a hierarchy and its child level collection of members.

When realizing collection types of BaseCollection, realize those that are required to describe the relationships between members of the collection. In some cases this may be an unordered list only, in other cases it could include several realizations of OrderListRelation each depicting different relation specifications (Parent/Child, WholePart, etc.)

Namespace URI: 
http://ddialliance.org/ddi4/NewCollectionPattern
Color of objects in the uml graph: 
000000

Stage:

Include in build?: 
False
Weight: 
50

Comments

Response from Flavio regarding placement of type=CollectionType
1 - A bag is a multiset, i.e. members can be repeated. You could define order in a bag the same way you define order in a set. I think we defined Collections as sets rather than bags, but I think it can be extended to bags easily. 
2 - You could define a bag or a set at any level. The top level could be an unordered bag, some members in the next level could be ordered sets, others unordered sets, other atomic members, other bags, etc. 

larry's picture

In what we did in Lawrence the Relation was from a singleton to a bag. There might be problems with making source a Member, which could be a Collection. Would this map into a Cartesian crossing of all pairs from Members of one Collection to Members of another (since a Collection is a Member)? Or would it mean a relation from the Collectioni level to members of a Collection?

Package Graph