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

Uploaded Source

Built Distribution

eoq3pyecorempl-2.9.1-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eoq3pyecorempl-2.9.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for eoq3pyecorempl-2.9.1.tar.gz
Algorithm Hash digest
SHA256 2b77a4dc7fad554ba5a1314ff8adb0e7976b84d8309ffab11f6049f9fb38d6ef
MD5 42dfc84961ccebd3768cd07b91ac21ac
BLAKE2b-256 6f50961251f567b8db1abb70e339ba31747cb0869b2e66a1ee40fd24ae0c4580

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eoq3pyecorempl-2.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc6d5530923757dd35dba8fc3b15c224c3e5c7c42429e5c6450f8046297e6dba
MD5 8d940e3f02baeebe8f640e10b30f3dd4
BLAKE2b-256 da30548c054b48926beaf300cdb2efb9faccf44d8489a55672e54c3a694931d3

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