Trying to understand how P4C communicate with the original Java Metamodel

Hey all.

I’ve been working on visualizing how the P4C project modules interact from a user’s perspective. My goal is to understand how the original metamodel is communicated through the P4C’s simplified metamodel.

Here’s the image I’ve created so far:

From what I understand, users interact with the simplified_api and utilities to work with the Capella model and embed scripting within the Eclipse environment. The simplified_api communicates with the java_api , and both the java_api and utilities call the EASE module to interact with the Capella Platform.

However, I need more insights into how these components further communicate with each other.

Please review and help me understand the complete communication process between P4C and Capella.

Thanks in advance for your help!

Hi Dev,

You have two main part in Python4Capella (bottom to top in dependencies):

  • Java world:
  • Python world:
    • The Python side of the modules in java_api
      • The Python class JavaObject is the root of the type hierarchy in Python4Capella and it keeps a reference to the Java object (get_java_object()). From it you can access the Java Object and call Java methods.
    • The simplified_api use the wrapped Java Object from JavaObject to implement a simplified API. The goal is to provide API to Python but also to try to hide the complexity of Capella.

Your representation is correct but don’t really shows the Java and Python parts. I hope the explanation above will help you.

1 Like

Thank You @YvanLussaud , yes, your explanation is really to the point and I understand it very well.

1 Like