...
Methods like .asCD() replace .value.oclAsType(CD) ; and .oclIfUndefined() replace replaces extra lines of code. This The .oclIfUndefined() is an example of null coalescing. and is particularly useful when using the GELLO within archetypes.
For example this:
Let tumourSite: CDString= If template.Examples.Tumour_site
.value.oclAsType(CD).oclIsDefined()
then
template.Examples.Tumour_site
.value.oclAsType(CD).displayName.value
else null'' endif
can be rewritten as this:
Let tumourSite: CDString= template.Examples.Tumour_site.asCD().displayName.value.oclIfUndefined(null'')
Most types have these methods now, ie asBoolean(), asString() ..