Skip to main content

A model persistance layer for EOQ3 based on pyecore

Project description

eoq3pyecorempl - A model persistance layer for EOQ3 based on pyecore

This is a model persitancy layer (MPL) based on pyecore. This MPL behaves similar to a WorkspaceDomain in EOQ2. A workspace directory containing M2 and M1 models in

  • .ecore and .
  • *.xml

format is parsed and uploaded to a domain as a workspace model.

Usage

Imports:

from eoq3pyecorempl import PyEcoreWorkspaceMpl

Init and connect the MPL:

mpl = PyEcoreWorkspaceMpl(WORKSPACE_PATH)

Load the workspace directory:

mpl.Load()

Connect to the domain and upload the workspace model:

mpl.Connect(domain)

Accessing a M2 model:

res = domain.Do( Get(Cls("workspacemdbmodel__Resource").Sel(Pth("name").Equ("oaam.ecore"))) )

Accessing a M2 model:

res = domain.Do( Get(Cls("workspacemdbmodel__Resource").Sel(Pth("name").Equ("MinimalFlightControl.oaam"))) )

Accessing the model content:

res = domain.Do( Get(Cls("workspacemdbmodel__Resource").Sel(Pth("name").Equ("MinimalFlightControl.oaam")).Idx(0).Pth("content")) )

See also pyeoq/Test/Eoq3/test_pyecorempl.py for working code.

Workspace

A valid WORKSPACE_PATH could look like

  • Meta

    • oaam.ecore
  • MinimalFlightControl.oaam

  • Library.xml

Subfolders are not mandatory.

Such a workspace directory can be found at pyeoq/Test/Eoq3/testdata/Workspace.

Documentation

For more information see EOQ3 documentation: https://eoq.gitlab.io/doc/eoq3/

Author

2024 Bjoern Annighoefer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eoq3pyecorempl-2.9.0.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

eoq3pyecorempl-2.9.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file eoq3pyecorempl-2.9.0.tar.gz.

File metadata

  • Download URL: eoq3pyecorempl-2.9.0.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for eoq3pyecorempl-2.9.0.tar.gz
Algorithm Hash digest
SHA256 ba343ba8ce8b84f7f6c802908297868080bc49aafcdc5081919d9e497a1931fa
MD5 f633ab92c9b42576d01d01f2b2d14ca1
BLAKE2b-256 6e62cbd698f395e4a7aa2e823280b35811b5f8833b951d77d780720c71ee4b12

See more details on using hashes here.

File details

Details for the file eoq3pyecorempl-2.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for eoq3pyecorempl-2.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e874f8b6d36cca13ce4692a757dc1fb114f1c7dd025a4239718cde92edc448f
MD5 fafd786aa37b8269aba7ea4be3de342f
BLAKE2b-256 f96bf60e27ee049d23a18844630abd8cd563b1ec9529c7e92953c084eca42a43

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page