Reverse engineer DataBase (episode 2) Generating Class Diagram Image from XMI.

in my last article (Reverse engineer DataBase to XMI.)

I wrote how to reverse  engineer DataBase and produce XMI file from the data base using andromda Schema2xmi plug-in.

in this article I will speak about how to produce PNG (Portable Network Graphics) Image or any other type of Image that produces the Class Diagram representation from the XMI file that we produced earlier from our Data Base.

ok lets start.

I will use XSLT, and graphviz to achieve this task.

Prerequisites:

   1. XSLT 2.0.

   2. graphviz.

Requiered steps to generate the png class diagram from our xmi file are:

  1. Write XSL file that generate the dot file from our xmi.
  2. Generate the dot file using the XSL file.
  3. Use graphviz to generate the png image from the dot file.

1. Writing the XSL transformer file that generate the dot file from our xmi:

the following is the XSL file (XMITransformer.xsl) that applies to our xmi file and produces the dot file from it.

­


<xsl:stylesheet version="2.0"      
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"      
                xmlns:xlink="http://www.w3.org/1999/xlink"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes"
                xmlns:UML="org.omg.xmi.namespace.UML"     
                exclude-result-prefixes="xs xdt UML">

    <!--xsl:key name="class" match="UML:Class" use="@xmi.id" /-->
    <xsl:output method="text" media-type="text/xml" indent="yes" encoding="ISO-8859-1" />
    <xsl:variable name="from" select="0"/>
    <xsl:variable name="to" select="NON"/>
    <xsl:template match="XMI.header"/>
    <xsl:template match="XMI.content">
        <xsl:call-template name="pre-graph"/>
        <xsl:apply-templates
                    select="UML:Model/UML:Namespace.ownedElement/UML:Package/UML:Namespace.ownedElement/UML:Class" />     
        <xsl:apply-templates
                    select="UML:Model/UML:Namespace.ownedElement/UML:Package/UML:Namespace.ownedElement/UML:Association"/>
        <xsl:call-template name="post-graph"/>
        <!--xsl:call-template name="attributes"/>
        <xsl:call-template name="functions"/-->
    </xsl:template>
      
    <xsl:template name="attributes">
        int x;
    </xsl:template>
      
    <xsl:template name="functions">
        public static void main(String[] args){
        }
    </xsl:template>
      
    <xsl:template name="pre-graph">
        digraph g {      
        graph [      
        rankdir = "LR"      
        ];

        node [      
        fontsize = "16"      
        shape = "ellipse"
        ];
      
        edge [
        ];
    </xsl:template>
      
    <xsl:template name="post-graph">
        }
    </xsl:template>
      
    <xsl:template match="UML:Namespace.ownedElement/UML:Class">
        <!--"<xsl:value-of select="@xmi.id"/>" [
        label = "<xsl:value-of select="@name"/>"
        shape = "record"
        ];-->
        "<xsl:value-of select="@xmi.id"/>" [
        label = "<xsl:value-of select="@name"/> | <xsl:value-of select="@visibility"/> |  "
        shape = "record"
        ];
      
        <!--xsl:text>  </xsl:text>
        <xsl:value-of select="@visibility"/-->
        <!-- new Line character-->
        <!--xsl:text>&#xa;        </xsl:text-->
    </xsl:template>
      
    <xsl:template match="UML:Association.connection">
        <xsl:apply-templates select="UML:AssociationEnd/UML:AssociationEnd.participant/UML:Class"/>
    </xsl:template>

    <xsl:template match="UML:Association">
        <xsl:variable name="f"
                      select="UML:Association.connection/UML:AssociationEnd/UML:AssociationEnd.participant/UML:Class/@xmi.idref"/>
        "<xsl:value-of select="$f[1]"/>" -> "<xsl:value-of select="$f[2]"/>" [
        id = <xsl:value-of select="@xmi.id"/>
        ];
    </xsl:template>

    <xsl:template match="UML:Attribute">
    </xsl:template>      
</xsl:stylesheet>

­

2. Generate the dot file using the XSL file:

 java net.sf.saxon.Transform -o dotFileName.dot transformed.xmi XMITransformer.xsl

3. Use graphviz to generate the png image from the dot file:

dot -Tpng -o Diagram.png dotFileName.dot

It is Enjoyable subtle

It is Enjoyable subtle components and amounts, numerous a lot obliged regarding portray regarding Lisa Olson Pregnancy Miracle Review. It is limitless to me today, however usually, the comfort and recommendation is mind-boggling. Much appreciated over again plus good prospects,

Later in the day, he

Later in the day, he examined the responsibility list and discovered his name allocated again for the next morning's objective over opponent landscape. He faced Doc Daneeka with a less than diplomatic, nearly endless sequence of expletives. next story

pest control san antonio

I'm generally so that you can writing a blog and that i seriously many
thanks for information. This article has really peaks the awareness. Let
me search for your website and looking at for first time data.

pest control san
antonio

The employers in our

The employers in our database have no problem hiring our members both
because we are established with them and they trust us to send them
qualified members to work for them. more help at www.rebelmouse.com/conversational_hypnosis/the-power-of-conversational-hypnosis-pdf-review-1054924280.html

With a qualified SEO experts

With a qualified SEO experts group available to you, your website look for place on Search engines would enhance definitely. Doubtlessly this would help enhance traffic to your website coming about into better benefits. https://www.americanbridgeproject.org/

Analisa Forex

Butuh Tips Trading atau Anda ingin tau analisa forex hari ini Yang di update setiap hari silakan anda bisa cek di sini
Analisa Forex
Prediksi Forex Hari Ini
Analisa Forex Hari Ini    
Belajar Forex

Trading Emas

Masih Ragu bagaimana mengambil keputusan untuk posisi Trading Emas agan, silakan Simak dulu Tips dan Analisa Investasi Emas di sini
Trading Emas
Cara Investasi Emas
Grafik Harga Emas

A regular SEO service may

A regular SEO service may give all these alternatives under a individual marketing. With a qualified SEO experts group available to you, your website look for place on Search engines would enhance definitely. Doubtlessly this would help enhance traffic to your website coming about into better benefits. Homepage

Awesome blog. I enjoyed

Awesome blog. I enjoyed reading your articles. This is truly a great
read for me. I have bookmarked it and I am looking forward to reading
new articles. Keep up the good work!

SEO is well-organized than

SEO is well-organized than the local SEO because they could focus on even the least aspect of the web page also it focuses on the other features and benefit profit towards the SEO organizations Ranking In Google Just in 5 Dollar

you do not want to waste

you do not want to waste your hard-earned savings for nothing, right? Financial planners will be able to give you great advices when it comes to things like these. more

Well Done

It is perfect time to make some plans for the future and it is time to
be happy. I’ve read this post and if I could I desire to suggest you few
interesting things or tips. Perhaps you could write next articles
referring to this article. I want to read more things about it! bonuses on www.rebelmouse.com

Thanks for this informative

Thanks for this informative post.

get soundcloud likes

voyance retour amour

A
good blog always comes-up with new and exciting information and while
reading I have feel that this blog is really have all those quality that
qualify a blog to be a one.I wanted to leave a little comment to
support you and wish you a good continuation. Wishing you the best of
luck for all your blogging efforts.

voyance retour
amour

If there are 100 people in a

If there are 100 people in a day going to your website and 60 out of it are turning in to your clients then consider that your SEO techniques are efficiently working. important link

Purposeful content

Purposeful content Understand the significance of filled with significance material because without which it is not possible to make an impression on viewers or Look for engines. here are the findings

Local SEO In Indian has

Local SEO In Indian has several gaining aspects apart from attaining your focus on viewers. address

SEO methods, it is possible

SEO methods, it is possible to make video clips clip appear great in YouTube's positions as well as Google. zsongs

A reasonable SEO

A reasonable SEO organization will motivate you to comprehend the whole procedure, even if they are doing it for you, because they will in many situations depend on well crafted and professional material than can often come from the webmaster, rather than the SEO company. click for more

thank youbossalreadywilling

thank youbossalreadywilling to sharehisknowledge.

vakum payudara

wow incredible celana hernia

wow incredible celana hernia

So, the better option, as

So, the better option, as most professionals find, is to employ both, without really overpowering one on another. Both are equally important and thus you need to invest your time and money on both in order to achieve good ROI for your business. click here to investigate

This is a truly good

This is a truly
good site post. Not too many people would actually, the way you just did. I
am really impressed that there is so much information about this subject that
have been uncovered and you’ve done your best, with so much class. If wanted
to know more about green smoke reviews, than by all means come in and check
our stuff.
https://www.rebelmouse.com/languageoflustreviews

In this way you increase not

In this way you increase not just the opportunities of discovering a regular circulation of on the internet guests to your web page and also gaining customers who're inside the mind-set to purchase item at least be responsive as to what you're providing. Heroin Treatment Orange County

But let me just situation

But let me just situation this before we history the causes why you would need professional SEO talking to alternatives, if you want something done right from the begin, you need an personal that knows the organization and how aspects are done. Sports Chiropractic

Local Lead Magnet Theme is

Local Lead Magnet Theme is simply fantastic, as it offers an easy way to create seo optimized landing pages get cheap coupons discount promos reviews bonus..local lead magnet theme discount

Father's Day 2015 Quotes

Nice Post With Awesome Content With unique Content For All Peoples.Father's Day 2015 Is Coming Soon On 21st june .This Very Big Day All Father's.

Father's Day 2015 Quotes For Dad

Father's Day 2015 Pictures For Dad

Father's Day 2015 Images For Dad

Father's Day 2015 Wishes For Dad

Father's Day 2015 Cards For Dad

Father's Day 2015 Messages For Dad

Father's Day 2015 Photos For Dad

Father's Day 2015 Sms For Dad

Father's Day 2015 Thoughts For Dad

very sweet post.

You have shared very nice information regarding this social media. Really I got some new things from here.  Movers And Packers Pune

You might discover that they

You might discover that they will use community records relevant to your area and may even make public networking information for the company. I loved this

Effective on the internet

Effective on the internet marketing strategies: SEO solutions in London, uk apply all possible techniques that can secure extensive positions. click for more

I’ve been searching for

I’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!..
www.textyourexbackmichaelfiore.com

Excellent .. Amazing ..

Excellent .. Amazing .. I’ll bookmark your blog and take the feeds also…I’m happy to find so many useful info here in the post, we need work out more techniques in this regard, thanks for sharing.

WP Smart Member

This can be done via various

This can be done via various marketing and MLM techniques. You can choose paid promotional initiatives as well as multilevel promotion to get more industry attention for your web page. official website

Before including the

Before including the hyperlinks, consider the quality of these hyperlinks and whether they have any relevance in your web page. click to investigate

Many thanks for this

Many thanks for this brilliant post! Many points have extremely useful,    

mitsubishi eclipse 2015 price

SEO organizations from

SEO organizations from Indian are known to be the most efficient and perhaps the best amongst other countries. click to investigate

csnk

Actually every entrepreneur and professional needs to deal with the
point that SEO does not happen over night. It's not like you set out
your Xmas saving on the fire place and the next morning hours, it's
loaded with offerings. clothing
manufacturer

This website rocks! I'm so

This website rocks! I'm so happy to discover this gem.    

harga honda jazz 2015

Article Submitting and

Article Submitting and Marketing Services etc. So whether you are working a small or a large-scale business, one must set up these SEO techniques to enhance their web page. check this site out

But then, be sure to point

But then, be sure to point several backlinks from other websites to it clip.Use Transcripts and Subtitles. Another way to add search phrases to video clips clip is to offer an entire records of the spoken audio. auto lawyers

Actually every entrepreneur

Actually every entrepreneur and professional needs to deal with the point that SEO does not happen over night. It's not like you set out your Xmas saving on the fire place and the next morning hours, it's loaded with offerings. Warren Sulmasy

The important part to high

The important part to high quality writing is that when a audience areas on your content and seems that you have offered them with the item or details they were looking for, they will simply simply select the weblink that back-link support professionals offered them to get to your web page. additional info read

SEO professionals are

SEO professionals are capable enough to convert the audiences into prospective customers. This is one of the best advantages that such organizations offer. LinksManagement

To be able to use it

To be able to use it effectively to market your organization's items and solutions it allows if your business has someone able to create a excellent information of the items and solutions your business provides using Look for Motor Marketing or SEO. anonymous

detail in high park residences

Nice
information, valuable and excellent design, as share good stuff with
good ideas and concepts, lots of great information and inspiration, both
of which I need, thanks to offer such a helpful information here.

detail in high park
residences

Being the preeminent online

Being the preeminent online search motor, Look for search engines is continuously helping the way it positions sites according to importance. Go Here

The second aspect of On-Page

The second aspect of On-Page is about developing particular webpages in the right way so that there is no question that they are all about the keywords and phrases you are concentrating on. http://lionessebeautybar.jigsy.com/

Powered by Drupal - Design by artinet