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.4.tar.gz (16.1 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.4-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eoq3pyecorempl-2.9.4.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for eoq3pyecorempl-2.9.4.tar.gz
Algorithm Hash digest
SHA256 e0d6bd448fd9dccbc8e92112c2f6a0ee1a549ee2f5dc53f4813db318dd239bb2
MD5 f12f82557588b8fd73f5bec648a3d1bb
BLAKE2b-256 a23eef7688af00dc86cdcdb8b41a8585b6bed4decc157a7be4a9d25c028c7578

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eoq3pyecorempl-2.9.4-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for eoq3pyecorempl-2.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2369b7feccbf5c41309a5881a3766d8ef4c832e1f6a3d46e1abd6ccf77cd7500
MD5 be408d5228a9f205f21bb06729335552
BLAKE2b-256 e88cc3e17c5374552b6bcde769fd0d21478c756837a448e149646d81c27e9a63

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