Hello,
I had trouble with the LC pkg getter function.
This is how what the interpreter shows:
This LC_Pkg Contains 47 elements, 2 of which are also LC_Pkg:
46th element:
47th element:
Using: aql:self.ownedLogicalComponentPkgs
, shows the 2 LG_Pkg above.
__
Now, in P4C side:
I obtained the very first LC_Pkg named “Structure” (the one containing “Component” and “Analysis”) inside a variable:
print(LC_pkg)
print(LC_pkg.get_java_object())
→
<__main__.LogicalComponentPkg object at 0x0000021500195288>
org.polarsys.capella.core.data.la.impl.LogicalComponentPkgImpl@7bdc7404 (id: 0e2214c0-232c-4197-965a-d5584a0fa304, sid: null) (name: Structure) (visibleInDoc: true, visibleInLM: true, summary: null, review: null)
Now to obtain the LC_Pkg:
AA=LC_pkg.get_owned_logical_component_pkgs()
→ Error:
Here is the definition of the function:
def get_owned_logical_component_pkgs(self):
"""
"""
value = self.get_java_object().getOwnedLogicalComponentPkgs()
if value is None:
return value
else:
e_object_class = getattr(sys.modules["__main__"], "EObject")
specific_cls = e_object_class.get_class(value)
return specific_cls(value)
Oddly enough, using simply "
.get_java_object().getOwnedLogicalComponentPkgs()
", works → [JavaObject id=o104, JavaObject id=o105]
.
Whereas (get_owned_logical_component_pkgs) does not.
Maybe there is a problem with the function (get_owned_logical_component_pkgs)?