Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Models with multipe files and only file reference - preferred approach EVL
Models with multipe files and only file reference - preferred approach EVL [message #1853927] Sun, 24 July 2022 08:15 Go to next message
Glatz Martin is currently offline Glatz MartinFriend
Messages: 23
Registered: March 2016
Junior Member
Hello,

I'm having the following situation.

My CAEX model can be built up by an unlimited number of files. The link between the files is an element "External reference" which defines an alias and the (relative) path to the referenced file.

Example:

Main file: Testcase.aml
Testcase.aml references ./RefFolder/ReferecedLib.aml (alias ReferencedLib)
ReferecedLib.aml references ./RefFolder/DeepModel.aml (alias DeepModel)

(for simplicity, I've attached the file structure).

The problem is, that I can't navigate via the External reference, as it contains only alias and Path to the referenced Model artefact.

I see two options, and would like to know, which one you would prefer (especially in the context, that the model is based on an official standard):


1. I could easily extend the meta model with a reference to the concrete referenced file content - while transforming the .aml Files to .xmi, (in java) I would read the xmi file and set the reference.

2. During tranforming of the .aml Files to .xmi, I build up a Map (Alias -> CAEXFile Content) and push this map to the EVL context.


From an implementation point of view, the first variant looks nicer to me, but I'm not sure if it is recommended to extend the meta model of a industry standard, to make evaluation easier.

What do you think?

Best regards
Martin


Re: Models with multipe files and only file reference - preferred approach EVL [message #1853971 is a reply to message #1853927] Tue, 26 July 2022 12:08 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Martin,

Have you considered using Epsilon's XSD-backed XML driver to avoid transforming your .aml files to XMI? To accommodate these external references, I'd probably subclass the driver (org.eclipse.epsilon.emc.emf.xml.XmlModel) and after loading the root file, I'd do a recursive traversal and add all referenced files as resources to the root file's resource set.

Kind regards,
Dimitris

[Updated on: Tue, 26 July 2022 12:09]

Report message to a moderator

Previous Topic:all() / allInstances() working - allOfType() / allOfKind() not found
Next Topic:Using JDT driver in workflow
Goto Forum:
  


Current Time: Sat Apr 27 07:01:36 GMT 2024

Powered by FUDForum. Page generated in 0.03011 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top