On 21/12/2009 05:23, Masoumeh Seydi wrote: > Hi All, > I've got some questions about data types and structures. I was wondering if someone could help me. > > 1. Why an item_single can,t be empty but other structures may be. I mean 'items" attribute's cardinality in item_single is 1..1 (and this is logical. coz' an item_single without element is meanless). But in other structures, the cardinality of "items" attribute is 0..1. What's the point of having an empty list or tree or table (without ant item in it)?
These larger structures might be partially created at certain points of time. > > 2. What's the difference between CLUSTER and ITEM_TREE? Both can have CLUSTERs and ELEMENTs. And why in all structures in CKM, there is a Data branch shown in archetype mindmap but in cluster archetypes, there is a Items branch? A CLUSTER is just a low-level 'node' abstraction, that along with ITEM and ELEMENT provide the basic hierarchical structure building pattern used in most openEHR & ISO 13606 data. The ITEM_XXX classes are designed as abstract types and provide rules for their structure and functions for accessing them. The ITEM_TREE is the 'tree' variant of these data structures. It has (or could have) all kinds of functions for interrogating the tree structure that would not necessarily be provided by CLUSTER/ELEMENT. This level of abstraction also allows the possibility one day of using more efficient internal structures than CLUSTER/ELEMENT. > > 3. There is an Interval intrface containing lower and upper attributes. Other intervals like IntervalOfReal, IntervalofDate, IntervalofDateTime, IntervalofTime and IntervalofDuration with lower and upper attributes in xsd file in the site. My question is, why there is not an Interval class that contains an attribute for declaring the type of interval and so get rid of other interval classes for every type? This is hard to do in an XSD, in fact I think it is impossible, because XSD does not support the concept of genericity, i.e. types like Interval<Date> etc. If you look in the reference model documents (see Support IM and also Data types (Quantity & Date/time packages) - all available from the specifications page), you will see that Interval<T> is indeed defined, and inherited into the appropriate places. The XSD just defines the resulting concrete types. - thomas beale -- Chief Technology Officer, Ocean Informatics Chair Architectural Review Board, openEHR Foundation Honorary Research Fellow, University College London Chartered IT Professional Fellow, BCS, British Computer Society

