Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Which EMFT should I use to output SVG?
Which EMFT should I use to output SVG? [message #485894] Tue, 15 September 2009 13:21 Go to next message
Eclipse UserFriend
Originally posted by: proubekas.gmail.com

EMFT newbie. I searched the news group and found nothing. And since I am
totally new to EMTF I may just be looking in the wrong place.

I want to output some text files from the model but I also want to output
a SVG diagram. Which EMTF will do this EMF, EMFT, MDT or M2T? Or some
other one I don't know about.
Re: Which EMFT should I use to output SVG? [message #485974 is a reply to message #485894] Tue, 15 September 2009 18:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31900
Registered: July 2009
Senior Member
Paul,

It sounds like you'd want to use some M2T technology to produce text
files from models. If you're using GMF for your diagrams, I'm not sure
if it provide export to SVG....


PaulHR wrote:
> EMFT newbie. I searched the news group and found nothing. And since
> I am totally new to EMTF I may just be looking in the wrong place.
> I want to output some text files from the model but I also want to
> output a SVG diagram. Which EMTF will do this EMF, EMFT, MDT or
> M2T? Or some other one I don't know about.
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Which EMFT should I use to output SVG? [message #486011 is a reply to message #485974] Tue, 15 September 2009 21:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: proubekas.gmail.com

Just to be clear. Let us assume GMF does output SVG. What you are saying
is that M2T will output both the text file and the SVG file. In other
words M2T will invoke the GMT "thing" to output the SVG file. And that
getting M2T to invoke GMT is just a download and a configuration task, and
not writing code, correct?


As a side node, SVG is just a dialect of XML for 2D graphics.
Re: Which EMFT should I use to output SVG? [message #486033 is a reply to message #486011] Wed, 16 September 2009 03:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31900
Registered: July 2009
Senior Member
Paul,

Comments below.

PaulHR wrote:
> Just to be clear. Let us assume GMF does output SVG. What you are
> saying is that M2T will output both the text file and the SVG file.
Actually, your original question is pretty vague. It's not entire
clear what the relationship is between your model and the text or SVG
you want to output. Vague questions usually result in vague answers...
> In other words M2T will invoke the GMT "thing" to output the SVG
> file. And that getting M2T to invoke GMT is just a download and a
> configuration task, and not writing code, correct?
>
>
> As a side node, SVG is just a dialect of XML for 2D graphics.
I know. It's just not clear where the 2D graphics come from. If you
have a GMF diagram view, it's definitely possible to save it as SVG.
But I'm not sure if that's your actual question.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Which EMFT should I use to output SVG? [message #486092 is a reply to message #486033] Wed, 16 September 2009 10:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: proubekas.gmail.com

What I was hoping is that I could take data from the model and create the
SVG directly. I have the SVG drawing already done. The only thing I
would need the M2T tool to do is replace some values in XML elements in
the SVG. I don't want to re-create the drawing in GMF just to get the
SVG output.

Thanks for your time.
Re: Which EMFT should I use to output SVG? [message #486749 is a reply to message #486092] Fri, 18 September 2009 22:17 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
PaulHR pisze:
> What I was hoping is that I could take data from the model and create
> the SVG directly. I have the SVG drawing already done. The only thing
> I would need the M2T tool to do is replace some values in XML elements
> in the SVG. I don't want to re-create the drawing in GMF just to get
> the SVG output.
>
> Thanks for your time.
>
>

I am not sure what is the problem. Nevertheless M2T Xpand can be an answer.

Part of M2T Xpand is Xtend an model-to-model transformation language. In
Xpand/Xtend, XML file can be directly manipulated like a model, as long
as there is an XML Schema for it. So one can load the SVG file, load
data model and then merge them with Xtend. Things to know: Xtend, XSD
Adapter, MWE.
Here is old documentation of XSD Adapter, so you can check if this is
what you need
http://www.openarchitectureware.org/pub/documentation/4.3.1/ html/contents/xsd_reference.html

Unfortunately SVG is not the best formed XML file out there and many XSD
files need to be refined before they are usable as EMF metamodels.
Hence, using model-to-model transformation may be inefficient. That
depends on your exact context.

You can also split your existing SVG file and put it into some code
generation technology (thus, M2T projects). Xpand can handle that well,
as the rest of M2T projects.

All that said, I think it would be easiest to use Groovy, an EMF adapter
and one of template engine integrated with Groovy, that evaluate
${a.b.c} expressions. Or even plain Java. But that is a guess, as
problem definition is ambiguous.

Regards,
Krzysztof Kowalczyk
Re: Which EMFT should I use to output SVG? [message #621373 is a reply to message #485894] Tue, 15 September 2009 18:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31900
Registered: July 2009
Senior Member
Paul,

It sounds like you'd want to use some M2T technology to produce text
files from models. If you're using GMF for your diagrams, I'm not sure
if it provide export to SVG....


PaulHR wrote:
> EMFT newbie. I searched the news group and found nothing. And since
> I am totally new to EMTF I may just be looking in the wrong place.
> I want to output some text files from the model but I also want to
> output a SVG diagram. Which EMTF will do this EMF, EMFT, MDT or
> M2T? Or some other one I don't know about.
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Which EMFT should I use to output SVG? [message #621374 is a reply to message #485974] Tue, 15 September 2009 21:31 Go to previous message
Eclipse UserFriend
Originally posted by: proubekas.gmail.com

Just to be clear. Let us assume GMF does output SVG. What you are saying
is that M2T will output both the text file and the SVG file. In other
words M2T will invoke the GMT "thing" to output the SVG file. And that
getting M2T to invoke GMT is just a download and a configuration task, and
not writing code, correct?


As a side node, SVG is just a dialect of XML for 2D graphics.
Re: Which EMFT should I use to output SVG? [message #621375 is a reply to message #486011] Wed, 16 September 2009 03:06 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31900
Registered: July 2009
Senior Member
Paul,

Comments below.

PaulHR wrote:
> Just to be clear. Let us assume GMF does output SVG. What you are
> saying is that M2T will output both the text file and the SVG file.
Actually, your original question is pretty vague. It's not entire
clear what the relationship is between your model and the text or SVG
you want to output. Vague questions usually result in vague answers...
> In other words M2T will invoke the GMT "thing" to output the SVG
> file. And that getting M2T to invoke GMT is just a download and a
> configuration task, and not writing code, correct?
>
>
> As a side node, SVG is just a dialect of XML for 2D graphics.
I know. It's just not clear where the 2D graphics come from. If you
have a GMF diagram view, it's definitely possible to save it as SVG.
But I'm not sure if that's your actual question.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Which EMFT should I use to output SVG? [message #621377 is a reply to message #486033] Wed, 16 September 2009 10:24 Go to previous message
Eclipse UserFriend
Originally posted by: proubekas.gmail.com

What I was hoping is that I could take data from the model and create the
SVG directly. I have the SVG drawing already done. The only thing I
would need the M2T tool to do is replace some values in XML elements in
the SVG. I don't want to re-create the drawing in GMF just to get the
SVG output.

Thanks for your time.
Re: Which EMFT should I use to output SVG? [message #621383 is a reply to message #486092] Fri, 18 September 2009 22:17 Go to previous message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
PaulHR pisze:
> What I was hoping is that I could take data from the model and create
> the SVG directly. I have the SVG drawing already done. The only thing
> I would need the M2T tool to do is replace some values in XML elements
> in the SVG. I don't want to re-create the drawing in GMF just to get
> the SVG output.
>
> Thanks for your time.
>
>

I am not sure what is the problem. Nevertheless M2T Xpand can be an answer.

Part of M2T Xpand is Xtend an model-to-model transformation language. In
Xpand/Xtend, XML file can be directly manipulated like a model, as long
as there is an XML Schema for it. So one can load the SVG file, load
data model and then merge them with Xtend. Things to know: Xtend, XSD
Adapter, MWE.
Here is old documentation of XSD Adapter, so you can check if this is
what you need
http://www.openarchitectureware.org/pub/documentation/4.3.1/ html/contents/xsd_reference.html

Unfortunately SVG is not the best formed XML file out there and many XSD
files need to be refined before they are usable as EMF metamodels.
Hence, using model-to-model transformation may be inefficient. That
depends on your exact context.

You can also split your existing SVG file and put it into some code
generation technology (thus, M2T projects). Xpand can handle that well,
as the rest of M2T projects.

All that said, I think it would be easiest to use Groovy, an EMF adapter
and one of template engine integrated with Groovy, that evaluate
${a.b.c} expressions. Or even plain Java. But that is a guess, as
problem definition is ambiguous.

Regards,
Krzysztof Kowalczyk
Previous Topic:number of change events when loading a resource
Next Topic:[Teneo] Text mapping instead of VarChar
Goto Forum:
  


Current Time: Sun Jun 13 12:38:35 GMT 2021

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

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

Back to the top