QVT 1.0 NO IDEA Avatar
  1. OMG Issue

QVT — 7.13.1 Collection conversions

  • Key: QVT-18
  • Legacy Issue Number: 10951
  • Status: closed  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    Given a property template in which the property is a collection, under what
    circumstances:

    Is it permissible for the right hand side to be a non-collection?

    Is it permissible for the right hand side to be a different collection kind.

  • Reported: QVT 1.0b1 — Mon, 26 Mar 2007 04:00 GMT
  • Disposition: Resolved — QVT 1.0
  • Disposition Summary:

    Add the following to the description of class PropertyTemplateItem in section 7.11.2.4:

    A property template item has a valid match when the value of the referred property matches the value specified by the value expression. The following rules apply when the value is specified by a template expression:

    • If the value expression is an object template expression and the referred property is single-valued then the property value must match the object template expression.
    • If the value expression is an object template expression and the referred property is multi-valued then at least one of the property values must match the object template expression.
    • If the value expression is a collection template expression and the referred property is single-valued then the property value is treated as a singleton collection that must match the collection template expression
    • If the value expression is a collection template expression and the referred property is multi-valued then the collection of property values must match the collection template expression. The following rules apply:
      o If the property value is a set, then the collection type of the collection template expression must be a set.
      o If the property value is an ordered set, then the collection type of the collection template expression can be one of set, sequence or ordered set.
      o If the property value is a sequence, then the collection type of the collection template expression can be one of set, sequence or ordered set. When the collection type is a set or an ordered set, a valid match requires that each value of the property be unique.
  • Updated: Fri, 6 Mar 2015 20:54 GMT