Re: Building RMObject objects from Archetype objects
Rong Chen wrote:
The name of this function in the ADL 1.5 spec has changed to prototype_value from default_value (the latter is used in the new templates). We have implemented this in the past in older kernels in Eiffel and VB, and the only data type that is difficult to invent a prototype value for is C_STRING based on a regular _expression_ constraint - i.e. the tehcnical problem is how to generate a safe value from a regex pattern that actually satisfies that pattern. All the other data types are easy. No default values are needed (in the sense of template 'default'values); the prototype values can be completely generated from the constraint values. Note that it is only useful to do this once archetypes have been put into templates, and nodes of the type ARCHETYPE_SLOT and ARCHETYPE_INTERNAL_REF have disappeared (replaced by their reference targets). The only type that is special is CONSTRAINT_REF, for which you just generate some default fixed term (since you can't know what the value set is until runtime, unless pre-populated) - thomas beale |
_______________________________________________ Ref_impl_java mailing list Ref_impl_java@openehr.org http://lists.chime.ucl.ac.uk/mailman/listinfo/ref_impl_java