Re: Re: Python plug-in -- UML: how to access the association end?



Thanks for your answer.

But I still don't get what I am looking for.

I installed "export-object.py" and ran it on my UML diagram : it does not export the multiplicities and roles of UML associations.

Here is the XML description of an UML association, extracted from the (uncompressed :-) .dia file :

    1        <dia:object type="UML - Association" version="1" id="O2">
    2          <dia:attribute name="obj_pos"> ... </dia:attribute>
    3          <dia:attribute name="obj_bb"> ... </dia:attribute>
    4          <dia:attribute name="orth_points"> ... </dia:attribute>
    5          <dia:attribute name="orth_orient"> ... </dia:attribute>
    6          <dia:attribute name="autorouting"> ... </dia:attribute>
    7          <dia:attribute name="name">
    8            <dia:string>#XX#</dia:string>
    9          </dia:attribute>
   10          <dia:attribute name="direction"> ... </dia:attribute>
   11          <dia:attribute name="ends">
   12            <dia:composite>
   13              <dia:attribute name="role">
   14                <dia:string>#fff#</dia:string>
   15              </dia:attribute>
   16              <dia:attribute name="multiplicity">
   17                <dia:string>#1..*#</dia:string>
   18              </dia:attribute>
   19              <dia:attribute name="arrow"> ... </dia:attribute>
   20              <dia:attribute name="aggregate"> ... </dia:attribute>
   21              <dia:attribute name="visibility"> ... </dia:attribute>
   22            </dia:composite>
   23            <dia:composite>
   24              <dia:attribute name="role">
   25                <dia:string>#sss#</dia:string>
   26              </dia:attribute>
   27              <dia:attribute name="multiplicity">
   28                <dia:string>#0..1#</dia:string>
   29              </dia:attribute>
   30              <dia:attribute name="arrow"> ... </dia:attribute>
   31              <dia:attribute name="aggregate"> ... </dia:attribute>
   32              <dia:attribute name="visibility"> ... </dia:attribute>
   33            </dia:composite>
   34          </dia:attribute>
   35          <dia:connections>
   36            <dia:connection handle="0" to="O0" connection="10"/>
   37            <dia:connection handle="1" to="O1" connection="10"/>
   38          </dia:connections>
   39        </dia:object>

I am trying to access the "ends" at line 11, and even more specifically the multiplicities (16 and 27) and the roles (13 and 23). The .diapyo file does not show these. All my attempts at getting them from
python failed. What is the secret magic formula?

Thanks

Georges




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]