Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 20.1c
Multiexcerpt include
MultiExcerptNamemappingSimple
nopaneltrue
PageWithExcerptINTERNAL:_examples_BRIDGE

For mappings between complex type objects it may is easier to draw the mappings only on class level and define the mapping between the attributes by set statements within the mapping rule.

Figure: simple Class Mapping

Image Modified

Within the mapping rule it is possible to use the action script language. To refer source and target objects attributes, use the keyword source or target within the action script

...

(see example in

...

class diagram simpleClassMapping above).

  • Associations with multiplicity = 1 can directly be referenced, following the structure, delimited by a dot, e.g.

    Code Block
    languagenone
    set target.childLevel1.childLevel2.Name = source.firstChild.grandChild.name;
  • Associations with multiplicity > 1 cannot directly be referenced.

...

  • The xUML Compiler will throw an error.

The necessary elements on the target side will be created automatically.

For further examples for using the simple mapping action <<Mapping>> consult the simple Mapping example.

Rp

Children Display
pageData Mapping