Enterprise Architect using Java API,如何从序列图中读取交互运算符信息?
Enterprise Architect using Java API, How to read interaction operator information from Sequence diagram?
我试图使用 enterprise Architect 的 java API 来读取序列图数据,但我无法从交互片段的组合片段中读取交互运算符(在图中键入) .请参考下图,
我尝试打印 Element 对象中的所有方法。但是我没有得到任何信息,期待这个,
Element ele = repo.GetElementByID(myDiagramObjects.GetElementID());
System.out.println("Partitions Count: " + ele.GetPartitions().GetCount());
for (Partition par : ele.GetPartitions()) {
System.out.println("Par Name: " + par.GetName());
System.out.println("Par Note: " + par.GetNote());
System.out.println("Par Operator: " + par.GetOperator());
System.out.println("Par Size: " + par.GetSize());
}
Output:
Partitions Count: 1
Par Name: testcondition
Par Note:
Par Operator:
Par Size: 47
如果名字(参考图)为空则
输出:
分区数:0
必填信息,
需要read/print 'Type'(根据图表)也称为交互运算符。
ele.GetSubtype()
returns 整数值,它是下拉值的索引。
例如:
alt = 0
opt = 1
break = 2
.
.
我试图使用 enterprise Architect 的 java API 来读取序列图数据,但我无法从交互片段的组合片段中读取交互运算符(在图中键入) .请参考下图,
我尝试打印 Element 对象中的所有方法。但是我没有得到任何信息,期待这个,
Element ele = repo.GetElementByID(myDiagramObjects.GetElementID());
System.out.println("Partitions Count: " + ele.GetPartitions().GetCount());
for (Partition par : ele.GetPartitions()) {
System.out.println("Par Name: " + par.GetName());
System.out.println("Par Note: " + par.GetNote());
System.out.println("Par Operator: " + par.GetOperator());
System.out.println("Par Size: " + par.GetSize());
}
Output:
Partitions Count: 1
Par Name: testcondition
Par Note:
Par Operator:
Par Size: 47
如果名字(参考图)为空则
输出: 分区数:0
必填信息,
需要read/print 'Type'(根据图表)也称为交互运算符。
ele.GetSubtype()
returns 整数值,它是下拉值的索引。 例如:
alt = 0
opt = 1
break = 2
.
.