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.2.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.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eoq3pyecorempl-2.9.2.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.2.tar.gz
Algorithm Hash digest
SHA256 c7a64310e5230935e87aac15873dceffd2232c2c0b10d81fd62a70598246b48e
MD5 73a0568be54d56677e5c46e28743e086
BLAKE2b-256 234c6fc2e10189ca1e56d82b6f6566d4a1f6952017f456a6e0d8db477e5fffe0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eoq3pyecorempl-2.9.2-py3-none-any.whl
  • Upload date:
  • Size: 17.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 44801eed084975789ddf1ce1ae1edf26f95b31b2258b0063751b6ec3d412935a
MD5 5a151535d93d89d0c9f3811703404d50
BLAKE2b-256 c3ee647fc0118890151f97d7ecaebce4d8ddb823dcc0a7cbb1621d3d9f3288f4

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