Java Reference
In-Depth Information
main ( in mmap : mindmap::Map@inModel, out req :
requirements::Model@outModel) {
req := mmap. map toRequirementsModel();
}
mapping mindmap::Map::toRequirementsModel() : requirements::Model {
. . .
}
If we simply change map to xmap , we change the invocation semantics to
strict. In this case, if the called mapping has a when clause that is not satisfied,
an exception is thrown. Using map , the mapping simply returns null .
main ( in mmap : mindmap::Map@inModel, out req :
requirements::Model@outModel) {
req := mmap. xmap toRequirementsModel();
}
Both map and xmap can be called using an arrow instead of the dot notation.
This implies that the mapping operation is the body of an xcollect imperative
collect construct.
13.5.6 Resolution Operators
OML provides resolve , resolveone , resolveIn , and resolveoneIn reso-
lution operators that reference trace data to resolve created objects, or objects
used as the source of an object creation, in the case of their inverse variants.
These can be useful to update or reference objects created from executed map-
pings. We cover each of these in turn, along with their late versions, which are
designed to improve transformation efficiency.
resolve
The most fundamental resolution operator is resolve . It returns an object cre-
ated from a mapping operation. The resolve operator can take no arguments,
a type argument, or a Boolean type condition. Consider an example of each:
source-> resolve (); -- select any object
source-> resolve (Type); -- select only Type instances
-- select Type instances where the name attribute equals 'aName'
source-> resolve (t:Type | t.name = 'aName');
Search WWH ::




Custom Search