Java Reference
In-Depth Information
var relations : Set (mindmap::Relationship) :=
self .getRelations();
if not relations->isEmpty() then {
result .div += object DivType {
h4 += object H4Type {
text += 'Relationships';
};
ul += object UlType {
li += relations. map toListItem();
};
};
} endif ;
result .br += object BrType {};
}
}
mapping mindmap::Relationship::toListItem() : xhtml::LiType {
text += self .getType() + ' relationship to ';
a += object AType {
href := '#' + self .target.name;
text += self .target.name;
};
}
mapping mindmap::Topic::toListItem() : xhtml::LiType {
a += object AType {
href := '#' + self .name;
text += self .name;
};
}
query mindmap::Relationship::getType() : String {
var pri : String := null ;
switch {
( self .type = Type::DEPENDENCY) ? pri := 'Dependency';
( self .type = Type::INCLUDE) ? pri := 'Include';
( self .type = Type::EXTEND) ? pri := 'Extend';
else ? assert fatal ( false )
with log ('Type unsupported', self );
};
return pri;
}
query mindmap::Topic::getPriority() : String {
var pri : String := null ;
switch {
( self .priority = Priority::HIGH) ? pri := 'High';
( self .priority = Priority::MEDIUM) ? pri := 'Medium';
( self .priority = Priority::LOW) ? pri := 'Low';
else ? assert fatal ( false )
with log ('Priority unsupported', self );
};
return pri;
}
Search WWH ::




Custom Search