m2doc - 如何使用 M2DOC 访问图表(感兴趣的元素)的 DAnnotation eoi
问题描述
在 CAPELLA 工作台中将 M2DOC 与 Sirius 服务一起使用,我想在图表(仅那些不是上下文的)中识别哪些与 CAPELLA 模型的其他元素相关。
为此,我想在使用 Sirius 服务时访问 DAnnotation eoi(感兴趣的元素):“representationByDescriptionName”。
我应该如何进行?天狼星服务有可能吗?
提前致谢。
解决方案
注释似乎被添加到 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 以选择“感兴趣的元素”。
推荐阅读
- xslt-3.0 - XSLT 3:将 xml 转换为 json
- r - R:箱线图在两个方面重新排序不同
- pdf - 使用工作站自定义对象 (WCST) 在 iSeries 上创建 PDF 格式错误
- c# - 将 Selenium 与 C# 和持续集成一起用于需要 SSO(单点登录)的 Web 应用程序
- spring - 当我们有 ingress 和 kuberneters 环境时,我们在哪里将 x-frame-options 标头添加到 apis ?
- c# - Сan't 为 serilog 配置自定义接收器
- tensorflow - 如何为特定数量的 epoch 缓存 TensorFlow 数据集,然后重新生成数据集?
- google-bigquery - ST_MAKEPOLYGON 反函数
- c - STM32F103 HAL_CAN_RxFifo0MsgPendingCallback 无法工作
- ios - 如何在 iOS 项目中减小 openCV 框架大小