{"id":850,"date":"2013-11-22T09:55:49","date_gmt":"2013-11-22T09:55:49","guid":{"rendered":"http:\/\/poseidon.iseresearch.i3a.uclm.es\/~tesorieror\/?page_id=850"},"modified":"2022-10-19T16:56:05","modified_gmt":"2022-10-19T16:56:05","slug":"deployment-metamodel-psm","status":"publish","type":"page","link":"https:\/\/blog.uclm.es\/ricardotesoriero\/research\/cauce-model-driven-development-of-context-aware-applications-for-ubiquitous-computing-environments\/cauce-case-tool\/deployment-metamodel-psm\/","title":{"rendered":"MOFScript M2T PSM to Java"},"content":{"rendered":"<p style=\"text-align: justify\">The goal fo the MOFScript Model to Text transformation is the generation of Java source code compatible to the abstract architecture implementation from the information layer models (PIM).<br \/>\nTo carry out this task, the PIM is marked using the Deployment model to create the PSM which is turned into Java source code after performing the MOFScript transformation.<\/p>\n<p style=\"text-align: justify\">Tu run the Model to Text transformation you have to:<\/p>\n<ol>\n<li style=\"text-align: justify\">Install the MOFScript plugin (Update site: http:\/\/depot.universaal.org\/eclipse-update\/). Then go to AAL Studio Prerequisites and select MOFScript<\/li>\n<li style=\"text-align: justify\">Create a Java project (File-&gt; New -&gt; Java Project)<\/li>\n<li style=\"text-align: justify\">Create a directory, name it \u00abmodels\u00bb, and copy source models (space reference, information flow, entity context and deployment). Note that you can use the light intensity, healthy screen and sharedblack board scenario models as samples<\/li>\n<li style=\"text-align: justify\">Create a directory, name it \u00abtransformations\u00bb<\/li>\n<li style=\"text-align: justify\">Uncompress the \u00abInformationLayerToCode.zip\u00bb file, and copy the \u00abInformationLayerToCode.m2t\u00bb MOFScript transformation file to \u00abtransformations\u00bb directory<\/li>\n<li style=\"text-align: justify\">Create a directory, name it \u00ablib\u00bb<\/li>\n<li style=\"text-align: justify\">Uncompress the cauce-architecture.zip file, and copy the \u00abcauce-architecture.jar\u00bb file into the \u00ablib\u00bb directory<\/li>\n<li style=\"text-align: justify\">Add the \u00abcauce-architecture.jar\u00bb file to the project classpath<\/li>\n<li style=\"text-align: justify\">Verify the project structure (check Figure 80)<\/li>\n<li style=\"text-align: justify\">Go to Window -&gt; Preferences and then MOFScript Preferences and configure the model and transformation paths accordingly (i.e. Figure 81)<\/li>\n<li style=\"text-align: justify\">Open the transformation file and go to the execute transformation icon on the toolbar (see Figure 82)<\/li>\n<li style=\"text-align: justify\">Select input models in the following order: deployment, referential space, information flow models and entity context models<\/li>\n<li style=\"text-align: justify\">Copy the results generated in the c:\/temp\/ directory to the project \u00absrc\u00bb directory<\/li>\n<\/ol>\n<h4>Resources<\/h4>\n<ul>\n<li><a href=\"http:\/\/poseidon.iseresearch.i3a.uclm.es\/~tesorieror\/wp-content\/uploads\/2013\/11\/cauce-architecture.zip\">cauce-architecture.jar file<\/a><\/li>\n<li><a href=\"http:\/\/poseidon.iseresearch.i3a.uclm.es\/~tesorieror\/wp-content\/uploads\/2013\/11\/InformationLayerToCode.zip\">InformationLayerToCode.m2t file<\/a><\/li>\n<\/ul>\n<figure id=\"attachment_1383\" aria-describedby=\"caption-attachment-1383\" style=\"width: 238px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1383 size-full\" src=\"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-structure.png\" alt=\"MOFScript file structure\" width=\"238\" height=\"237\" srcset=\"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-structure.png 238w, https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-structure-150x150.png 150w, https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-structure-100x100.png 100w\" sizes=\"auto, (max-width: 238px) 100vw, 238px\" \/><figcaption id=\"caption-attachment-1383\" class=\"wp-caption-text\">Figure 80: MOFScript file structure<\/figcaption><\/figure>\n<figure id=\"attachment_1377\" aria-describedby=\"caption-attachment-1377\" style=\"width: 900px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-preferences.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1377 size-full\" src=\"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-preferences.png\" alt=\"MOFScript preferences\" width=\"900\" height=\"556\" srcset=\"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-preferences.png 900w, https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-preferences-300x185.png 300w, https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-preferences-768x474.png 768w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><figcaption id=\"caption-attachment-1377\" class=\"wp-caption-text\">Figuew 80: MOFScript preferences<\/figcaption><\/figure>\n<figure id=\"attachment_1385\" aria-describedby=\"caption-attachment-1385\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-toolbar.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1385 size-full\" src=\"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-toolbar.png\" alt=\"MOFScript toolbar\" width=\"1024\" height=\"768\" srcset=\"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-toolbar.png 1024w, https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-toolbar-300x225.png 300w, https:\/\/blog.uclm.es\/ricardotesoriero\/wp-content\/uploads\/sites\/80\/2014\/01\/mofscript-toolbar-768x576.png 768w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><figcaption id=\"caption-attachment-1385\" class=\"wp-caption-text\">Figure 82: MOFScript toolbar<\/figcaption><\/figure>\n<p>Configuration and execution of the MOFScript M2T PSM to Java source code compatible to the Abstract Architecture for developing CAAs for UCEs.<\/p>\n<p><a href=\"http:\/\/youtu.be\/cA5wrW1fNho?cc_load_policy=1\">http:\/\/youtu.be\/cA5wrW1fNho?cc_load_policy=1<\/a><\/p>\n<p>.<\/p>\n<p><span style=\"text-align: justify;line-height: 1.5\">You can reference this work as:<br \/>\nRicardo Tesoriero, Jos\u00e9 A. Gallud, Mar\u00eda D. Lozano and V\u00edctor M. R. Penichet.\u00a0<strong>CAUCE: Model-driven Development of Context-aware Applications for Ubiquitous Computing Environments<\/strong>.\u00a0<\/span><i style=\"text-align: justify;line-height: 1.5\">Journal of Universal Computer Science<\/i><span style=\"text-align: justify;line-height: 1.5\">, \u00a0Vol. 16, \u00a0No. 15, pp. 2111-2138. 2010. Link:\u00a0<a style=\"text-align: justify;line-height: 1.5\" href=\"http:\/\/www.jucs.org\/jucs_16_15\/cauce_model_driven_development\">http:\/\/www.jucs.org\/jucs_16_15\/cauce_model_driven_development<\/a><br \/>\n<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The goal fo the MOFScript Model to Text transformation is the generation of Java source code compatible to the abstract architecture implementation from the information layer models (PIM). To carry out this task, the PIM is marked using the Deployment model to create the PSM which is turned into Java source code after performing the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.uclm.es\/ricardotesoriero\/research\/cauce-model-driven-development-of-context-aware-applications-for-ubiquitous-computing-environments\/cauce-case-tool\/deployment-metamodel-psm\/\" class=\"more-link\">Continuar leyendo<span class=\"screen-reader-text\"> \u00abMOFScript M2T PSM to Java\u00bb<\/span><\/a><\/p>\n","protected":false},"author":97,"featured_media":0,"parent":998,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-850","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/pages\/850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/users\/97"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/comments?post=850"}],"version-history":[{"count":3,"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/pages\/850\/revisions"}],"predecessor-version":[{"id":2229,"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/pages\/850\/revisions\/2229"}],"up":[{"embeddable":true,"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/pages\/998"}],"wp:attachment":[{"href":"https:\/\/blog.uclm.es\/ricardotesoriero\/wp-json\/wp\/v2\/media?parent=850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}