[QVTO] Get static model (hardcoded model) [message #495414] |
Wed, 04 November 2009 17:54 |
Eclipse User |
|
|
|
Originally posted by: vanbeerst.gmail.com
Hi,
I was wondering if it was possible to get a model in a static way,
through a hardcoded reference to the model.
You can get a model 'inputModel' as input like this :
transformation trans(inputModel : UML);
But is there a way to get a model that was not in input, but that you
get from the filesystem or workspace? So something like this :
var inputModel : UML := "/path/to/model.uml";
regards,
Tony.
|
|
|
Re: [QVTO] Get static model (hardcoded model) [message #495597 is a reply to message #495414] |
Thu, 05 November 2009 12:57 |
Eclipse User |
|
|
|
Originally posted by: dvorak.radek.gmail.com
Hi Tony,
It is not possible at the moment. The OMG spec for QVTO does not provide
any
mechanism to involve models from a location this way.
All models involved come via the model parameters declared in the
transformation
signature, which actually makes sense.
We will think of an extension in QVTO, as couple of people already asked
for something like this. For instance, getting access to UML2 primitive
types model.
Obviously, it makes sense only for input (read-only) models.
I think we might add an extra operation to Stdlib::Model type for that
purpose.
It has the standard operation 'static Model::createEmptyModel() : Model'
already, which
does not help here. Similarly, we could define
'static Model::createModel(String uri) : Model' to solve this issue.
Regards,
/Radek
On Wed, 04 Nov 2009 18:54:03 +0100, Tony Van Beers <vanbeerst@gmail.com>
wrote:
> Hi,
>
> I was wondering if it was possible to get a model in a static way,
> through a hardcoded reference to the model.
>
> You can get a model 'inputModel' as input like this :
> transformation trans(inputModel : UML);
>
> But is there a way to get a model that was not in input, but that you
> get from the filesystem or workspace? So something like this :
> var inputModel : UML := "/path/to/model.uml";
>
> regards,
> Tony.
|
|
|
Powered by
FUDForum. Page generated in 0.03379 seconds