[Fame] MooseEntity >>handleFameProperty:value:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Fame] MooseEntity >>handleFameProperty:value:

cdelaunay
Hello,

Currently, i'm looking a bit at the way moose export and import entities using Fame descriptions.
handleFameProperty:value:  is a method used by fame when we try to set a value to an attribute not described in the current metaModel used to import. By default It does nothing and just inform by writing in the Transcript.

A thing that I understand (or at least that I think I understand :)) is that the method handleFameProperty:value: is overriden by MooseEntity for this reason:
If an attribute is not described in the metaModel, this is certainly a property from the cache and therefore we should store this value in the cache of the element. This is what the method handleFameProperty:value: does in MooseEntity.

I was wondering if it would be a good idea to look before if a mutator selector does not exist for the property name and only after that store in the cache. Usually when you use the classic exporter from moose, you can not be in this case, because the metamodel use to export is exactly the same than the one to import. 
In my case,I generate my own metaModel to export (subclassing PragmaProcessor) and export some property that are not described with Fame pragmas (what did usually the classic exporter). Those properties will therefore be lost.
Maybe the idea is also  that if you export with a specific metaModel, you should import with this same specific metaModel ?
 

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Fame] MooseEntity >>handleFameProperty:value:

cdelaunay


2010/10/21 Cyrille Delaunay <[hidden email]>
Hello,

Currently, i'm looking a bit at the way moose export and import entities using Fame descriptions.
handleFameProperty:value:  is a method used by fame when we try to set a value to an attribute not described in the current metaModel used to import. By default It does nothing and just inform by writing in the Transcript.

A thing that I understand (or at least that I think I understand :)) is that the method handleFameProperty:value: is overriden by MooseEntity for this reason:
If an attribute is not described in the metaModel, this is certainly a property from the cache and therefore we should store this value in the cache of the element. This is what the method handleFameProperty:value: does in MooseEntity.

I was wondering if it would be a good idea to look before if a mutator selector does not exist for the property name and only after that store in the cache. Usually when you use the classic exporter from moose, you can not be in this case, because the metamodel use to export is exactly the same than the one to import. 
In my case,I generate my own metaModel to export (subclassing PragmaProcessor) and export some property that are not described with Fame pragmas (what did usually the classic exporter). Those properties will therefore be lost.
Maybe the idea is also  that if you export with a specific metaModel, you should import with this same specific metaModel ?
 
In fact I guess this is the best solution :) I am able to re-compute the meta-model, give it to the fame importer and it seems to work well. 
At least you are aware of  my thoughts of the day :)
 
 


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Fame] MooseEntity >>handleFameProperty:value:

Simon Denier-3
In reply to this post by cdelaunay

On 21 oct. 2010, at 17:34, Cyrille Delaunay wrote:



2010/10/21 Cyrille Delaunay <[hidden email]>
Hello,

Currently, i'm looking a bit at the way moose export and import entities using Fame descriptions.
handleFameProperty:value:  is a method used by fame when we try to set a value to an attribute not described in the current metaModel used to import. By default It does nothing and just inform by writing in the Transcript.

A thing that I understand (or at least that I think I understand :)) is that the method handleFameProperty:value: is overriden by MooseEntity for this reason:
If an attribute is not described in the metaModel, this is certainly a property from the cache and therefore we should store this value in the cache of the element. This is what the method handleFameProperty:value: does in MooseEntity.

I was wondering if it would be a good idea to look before if a mutator selector does not exist for the property name and only after that store in the cache. Usually when you use the classic exporter from moose, you can not be in this case, because the metamodel use to export is exactly the same than the one to import. 


It could be. This is what Fame does anyway for regular property.


In my case,I generate my own metaModel to export (subclassing PragmaProcessor) and export some property that are not described with Fame pragmas (what did usually the classic exporter). Those properties will therefore be lost.
Maybe the idea is also  that if you export with a specific metaModel, you should import with this same specific metaModel ?
 
In fact I guess this is the best solution :) I am able to re-compute the meta-model, give it to the fame importer and it seems to work well. 
At least you are aware of  my thoughts of the day :)

Yes that's certainly the way to go. I want to be able to quickly specify a metamodel to reuse Fame facilities like import-export. Then let Fame handles all the process. We will se tomorrow for the thing with pragma :)


--
 Simon




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev