[Uml-devel] Fw: How to extract associations between states in state diagram?

funkyworklehead at yahoo.com funkyworklehead at yahoo.com
Fri Jun 1 21:44:36 UTC 2007


Phooie.  As soon as you frame a question, you have the answer...

Element <UML:AssocWidget ...> has 2 attributes widgetbid and 
widgetaid.  The numbers contained in these attributes associate
the transition with the attribute xmi.id for their respective  StateWidgets.


----- Original Message ----
From: "funkyworklehead at yahoo.com" <funkyworklehead at yahoo.com>
To: umbrello-devel at kde.org
Sent: Friday, June 1, 2007 2:38:04 PM
Subject: [Uml-devel] Fw: How to extract associations between states in state diagram?

Hello.

I've drawn a simple finite state machine(FSM)
in Umbrello as a "State Diagram"


     +---+   EVENT_A   +---+
     | A |------------>| B |
     +---+             +---+

Given this FSM I would like to extract the
associations from the XML. i.e. I would
 like
to read the xml file produced by this drawing
and gain the following information:

 There are 2 states: 
    - A
    - B
 There is 1 association (transition): 
     - <transition_1>:
        type = directed
 (i.e. 1 endpoint)
       text = EVENT_A
       begin point = state A
        endpoint = state B

Does anyone know what attributes of the XML will
give me this information?  I can't seem to find 
a pattern.  I don't see how the states and 
transition arrow are linked by looking at the 
attributes of the XML.
Example StateWidget:
<--! FOR STATE A -->
<UML:StateWidget statetype="1" statename="A" usesdiagramfillcolour="1" width="47" usesdiagramusefillcolour="1" x="172" linecolour="none" y="185" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="27" usefillcolor="1" isinstance="0" xmi.id="11" documentation="" font="Sans Serif,10,-1,5,50,0,0,0,0,0" >
<--! FOR STATE B -->
<UML:StateWidget statetype="1" statename="B" usesdiagramfillcolour="1" width="47" usesdiagramusefillcolour="1" x="342" linecolour="none" y="195" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="27" usefillcolor="1" isinstance="0" xmi.id="12" documentation="" font="Sans Serif,10,-1,5,50,0,0,0,0,0" >

<--!
 Association widget -->
<associations>
     <UML:AssocWidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="12" widgetaid="11" roleBdoc="" roleAdoc="" type="514" changeabilityA="900" changeabilityB="900" visibilityA="200" >
      <linepath>
       <startpoint startx="219" starty="198" />
       <endpoint endx="342" endy="208" />
      </linepath>
      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="120" usesdiagramusefillcolour="1" x="280" linecolour="none" y="203" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="20" usefillcolor="1" pretext="" isinstance="0" xmi.id="-1" text="EVENT_A" font="Sans Serif,10,-1,5,50,0,0,0,0,0" />
     
 <UML:FloatingTextWidget usesdiagramfillcolour="1" width="16" usesdiagramusefillcolour="1" x="221" linecolour="none" y="200" instancename="" posttext="" usesdiagramlinecolour="1" role="709" fillcolour="none" height="20" usefillcolor="1" pretext="+" isinstance="0" xmi.id="-1" text="" font="Sans Serif,10,-1,5,50,0,0,0,0,0" />
      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="16" usesdiagramusefillcolour="1" x="324" linecolour="none" y="186" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="20" usefillcolor="1" pretext="+" isinstance="0" xmi.id="-1" text="" font="Sans Serif,10,-1,5,50,0,0,0,0,0" />
     </UML:AssocWidget>
    </associations>

I don't want to try to extract the information from the X,Y position
co-ordinates, because who is to say that some of the consumers of my
code in process won't overlap states...

Does anyone know?  Could a developer give me a hint?

Thanks.








      Pinpoint customers who are looking for what you sell. 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Uml-devel mailing list
umbrello-devel at kde.org
https://mail.kde.org/mailman/listinfo/umbrello-devel







       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20070601/5b2a5c53/attachment.html>


More information about the umbrello-devel mailing list