在CAPELLA工作台中使用M2DOC和天狼星服务,我想在图表(只有那些不具有上下文的图表)中确定哪些图表与CAPELLA模型的其他元素相关。
为此,我想在使用DAnnotation服务时访问天狼星eoi (感兴趣的元素):"representationByDescriptionName“。
我应该如何继续?这个天狼星服务有可能实现吗?
提前谢谢。
发布于 2019-12-23 23:59:35
注释似乎是添加到DReprestationDescriptor中,而不是DRepresentation本身。
您需要创建一个Java服务:
public DRepresentationDescriptor getDescriptor(DRepresentation representation) {
return new DRepresentationQuery(representation)getRepresentationDescriptor();
}然后你可以这样在你的模板中使用它:
{m:myDiagram.getDescriptor().eAnnotations->select(a | a.source = 'http://www.polarsys.org/capella/dannotation/ContextualElements').references}您必须更改URI以选择“感兴趣的元素”。
https://stackoverflow.com/questions/59457543
复制相似问题