Hi,
if you work with UML, modeling tools or model data exchange often you might know XMI - the XML Metadata Interchange format. I wrote a little package that makes it easier to work and browse data based on this format within Pharo. For instance you can open an XMI object either from a given stream or URL: (XMIFile fromURL: 'http://www.omg.org/spec/UML/20131001/UML.xmi') inspect You can also open a file XMIFile importFile Code is available on https://github.com/astares/Pharo-XMI The package includes a small GT extension allowing you to walk and dive through the XMI structure (see attached screenshot) and as the XMI nodes are unified it is easy to code some code generators or transformers in Pharo afterwards. For instance I used this package for a simple Pharo code generator based on Eclipse EMF models/diagrams. Within the code you will find some examples to browse through prominent XMI models like: - UML Spec => (XMIFile fromURL: 'http://www.omg.org/spec/UML/20131001/UML.xmi') inspect - VISUAL PARADIGM => (XMIFile fromURL: 'https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/VP_XMI21.xmi') inspect - ENTERPRISE ARCHITECT => (XMIFile fromURL: 'https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/EA_XMI21.xmi') inspect - ARCHIMATE => (XMIFile fromURL: 'https://www.reflektis.com/repos/archimate-3.0.xmi) inspect Once the inspector opens you have to select the "rootNode" and then the "Hierarchy" tab. In Pharo 6 you can load "XMI" right from catalog. Hope the package is useful for others too. Bye T. |
Hi torsten
do you know the work of peter to generate classes out of XMI and populate models? Because it complements your approach. stef On Wed, 01 Mar 2017 22:26:05 +0100, Torsten Bergmann <[hidden email]> wrote: > Hi, > if you work with UML, modeling tools or model data exchange often you > might know XMI - > the XML Metadata Interchange format. > I wrote a little package that makes it easier to work and browse data > based on this > format within Pharo. > For instance you can open an XMI object either from a given stream > or URL: > (XMIFile fromURL: 'http://www.omg.org/spec/UML/20131001/UML.xmi') > inspect > You can also open a file > XMIFile importFile > Code is available on https://github.com/astares/Pharo-XMI > The package includes a small GT extension allowing you to walk and dive > through the XMI > structure (see attached screenshot) and as the XMI nodes are unified it > is easy to > code some code generators or transformers in Pharo afterwards. > For instance I used this package for a simple Pharo code generator based > on Eclipse EMF models/diagrams. > Within the code you will find some examples to browse through prominent > XMI models like: > - UML Spec > => (XMIFile fromURL: 'http://www.omg.org/spec/UML/20131001/UML.xmi') > inspect > - VISUAL PARADIGM > => (XMIFile fromURL: > 'https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/VP_XMI21.xmi') > inspect > - ENTERPRISE ARCHITECT > => (XMIFile fromURL: > 'https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/EA_XMI21.xmi') > inspect > - ARCHIMATE > => (XMIFile fromURL: > 'https://www.reflektis.com/repos/archimate-3.0.xmi) inspect > Once the inspector opens you have to select the "rootNode" and then the > "Hierarchy" tab. > In Pharo 6 you can load "XMI" right from catalog. Hope the package is > useful for others too. > Bye > T. -- Using Opera's mail client: http://www.opera.com/mail/ |
We spoke briefly on Tuesday. I need to take a look (also at his EMF generator) and see how the tools could benefit from each other. I think it could simplify some of my code or streamline the use of it.
(Also I have about a billion code generators at the moment with small differences... so I will merge that at some point too...) Peter On Wed, Mar 01, 2017 at 10:29:38PM +0100, stepharong wrote: > Hi torsten > > do you know the work of peter to generate classes out of XMI and > populate models? > Because it complements your approach. > > stef > > > On Wed, 01 Mar 2017 22:26:05 +0100, Torsten Bergmann > <[hidden email]> wrote: > > >Hi, > >if you work with UML, modeling tools or model data exchange often > >you might know XMI - > >the XML Metadata Interchange format. > >I wrote a little package that makes it easier to work and browse > >data based on this > >format within Pharo. > >For instance you can open an XMI object either from a given stream > >or URL: > > (XMIFile fromURL: 'http://www.omg.org/spec/UML/20131001/UML.xmi') > >inspect > >You can also open a file > > XMIFile importFile > >Code is available on https://github.com/astares/Pharo-XMI > >The package includes a small GT extension allowing you to walk and > >dive through the XMI > >structure (see attached screenshot) and as the XMI nodes are > >unified it is easy to > >code some code generators or transformers in Pharo afterwards. > >For instance I used this package for a simple Pharo code generator > >based on Eclipse EMF models/diagrams. > >Within the code you will find some examples to browse through > >prominent XMI models like: > >- UML Spec > > => (XMIFile fromURL: > >'http://www.omg.org/spec/UML/20131001/UML.xmi') inspect > >- VISUAL PARADIGM > > => (XMIFile fromURL: 'https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/VP_XMI21.xmi') > >inspect > >- ENTERPRISE ARCHITECT > > => (XMIFile fromURL: 'https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/EA_XMI21.xmi') > >inspect > >- ARCHIMATE > > => (XMIFile fromURL: > >'https://www.reflektis.com/repos/archimate-3.0.xmi) inspect > >Once the inspector opens you have to select the "rootNode" and > >then the "Hierarchy" tab. > >In Pharo 6 you can load "XMI" right from catalog. Hope the package > >is useful for others too. > >Bye > >T. > > > -- > Using Opera's mail client: http://www.opera.com/mail/ > |
On Thu, 02 Mar 2017 10:02:04 +0100, Peter Uhnak <[hidden email]> wrote:
> We spoke briefly on Tuesday. I need to take a look (also at his EMF > generator) and see how the tools could benefit from each other. I think > it could simplify some of my code or streamline the use of it. super cool :) > > (Also I have about a billion code generators at the moment with small > differences... so I will merge that at some point too...) > > Peter > > > On Wed, Mar 01, 2017 at 10:29:38PM +0100, stepharong wrote: >> Hi torsten >> >> do you know the work of peter to generate classes out of XMI and >> populate models? >> Because it complements your approach. >> >> stef >> >> >> On Wed, 01 Mar 2017 22:26:05 +0100, Torsten Bergmann >> <[hidden email]> wrote: >> >> >Hi, >> >if you work with UML, modeling tools or model data exchange often >> >you might know XMI - >> >the XML Metadata Interchange format. >> >I wrote a little package that makes it easier to work and browse >> >data based on this >> >format within Pharo. >> >For instance you can open an XMI object either from a given stream >> >or URL: >> > (XMIFile fromURL: 'http://www.omg.org/spec/UML/20131001/UML.xmi') >> >inspect >> >You can also open a file >> > XMIFile importFile >> >Code is available on https://github.com/astares/Pharo-XMI >> >The package includes a small GT extension allowing you to walk and >> >dive through the XMI >> >structure (see attached screenshot) and as the XMI nodes are >> >unified it is easy to >> >code some code generators or transformers in Pharo afterwards. >> >For instance I used this package for a simple Pharo code generator >> >based on Eclipse EMF models/diagrams. >> >Within the code you will find some examples to browse through >> >prominent XMI models like: >> >- UML Spec >> > => (XMIFile fromURL: >> >'http://www.omg.org/spec/UML/20131001/UML.xmi') inspect >> >- VISUAL PARADIGM >> > => (XMIFile fromURL: >> 'https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/VP_XMI21.xmi') >> >inspect >> >- ENTERPRISE ARCHITECT >> > => (XMIFile fromURL: >> 'https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/EA_XMI21.xmi') >> >inspect >> >- ARCHIMATE >> > => (XMIFile fromURL: >> >'https://www.reflektis.com/repos/archimate-3.0.xmi) inspect >> >Once the inspector opens you have to select the "rootNode" and >> >then the "Hierarchy" tab. >> >In Pharo 6 you can load "XMI" right from catalog. Hope the package >> >is useful for others too. >> >Bye >> >T. >> >> >> -- >> Using Opera's mail client: http://www.opera.com/mail/ >> > -- Using Opera's mail client: http://www.opera.com/mail/ |
Free forum by Nabble | Edit this page |