Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Accessing source model specific attributes
Accessing source model specific attributes [message #1582150] Sat, 24 January 2015 12:41 Go to next message
Pemod Vasamu is currently offline Pemod VasamuFriend
Messages: 4
Registered: January 2015
Junior Member
Is it supported by any M2T language to access metadata in the source model. Can I for example access information about when the source model was created, when it was last updated, does class X have any OCL constraints specified etc?
Re: Accessing source model specific attributes [message #1582283 is a reply to message #1582150] Sat, 24 January 2015 14:25 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5929
Registered: July 2009
Senior Member
Hi

Mostly, no. File attributes are not normally supported. If you care
about them you should be using an appropriate versioning model ? MOFFOL.

If using Ecore you can do eClass() and then write meta-navigations.

Many M2Ts are based on OCL. OCL 2.5 will define oclType() as usefully
typed so oclType().ownedInvariants might help you.

Pending that, most tools have an ability to invoke Java, so you can do
almost anything.

Regards

Ed Willink




On 24/01/2015 12:41, Pemod Vasamu wrote:
> Is it supported by any M2T language to access metadata in the source
> model. Can I for example access information about when the source
> model was created, when it was last updated, does class X have any OCL
> constraints specified etc?
Re: Accessing source model specific attributes [message #1582326 is a reply to message #1582283] Sat, 24 January 2015 15:01 Go to previous messageGo to next message
Pemod Vasamu is currently offline Pemod VasamuFriend
Messages: 4
Registered: January 2015
Junior Member
Many thanks for that. Im using UML profiles as meta models. But I will check out oclType().ownedInvariants.

Do you know if the same applies for M2M languages like for example ATL?
Re: Accessing source model specific attributes [message #1582417 is a reply to message #1582326] Sat, 24 January 2015 16:11 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5929
Registered: July 2009
Senior Member
Hi

For the more established languages you have the eClass() / Java option.

oclType() is only available as a reflective enabler if using the
Pivot-based OCL 2.5 prototype directly.

This should be available for use with QVTr/QVTc in Mars.

QVTo may follow in Mars+1.

ATL uses a proprietary OCL. I have no idea whether they will
ignore/chase the OCL 2.5 specification or migrate to Eclipse OCL.

Similarly Epsilon uses a proprietary OCL.

Xtend of course is almost Java++ with some OCL influences.

Regards

Ed Willink

On 24/01/2015 15:01, Pemod Vasamu wrote:
> Many thanks for that. Im using UML profiles as meta models. But I will
> check out oclType().ownedInvariants.
>
> Do you know if the same applies for M2M languages like for example ATL?
Previous Topic:Acceleo Builder error encountered during build: java.util.ConcurrentModificationException
Next Topic:[Xpand2] Generating multiple files with one Xpand "model tree travers"
Goto Forum:
  


Current Time: Thu Jun 21 22:16:15 GMT 2018

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

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

Back to the top