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.3.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eoq3pyecorempl-2.9.3-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eoq3pyecorempl-2.9.3.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for eoq3pyecorempl-2.9.3.tar.gz
Algorithm Hash digest
SHA256 61adfdffbe1f50a5ff969696563939b0823f4f06e22143f838cacba60cca0fe4
MD5 b08852b064d46751a6310a53df5ed595
BLAKE2b-256 a53b9f09d79cfeca2e5fc44dba82584917235186590f6cb7f152fc984c075bd8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eoq3pyecorempl-2.9.3-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for eoq3pyecorempl-2.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea807a16c9cae6e655ad28701e4e10b0ee57721eb93bf7532a748c53f66edf67
MD5 aba215e294ea291b877d344d1f110056
BLAKE2b-256 16e4d7e6acc85333d0dc1fa7284879f61e55ee4ccf42d650fc7c3caa4c33a36f

See more details on using hashes here.

Supported by

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