Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Read sequence diagram by its Xmi
Read sequence diagram by its Xmi [message #1746584] Tue, 01 November 2016 12:04 Go to next message
Danny Deina is currently offline Danny DeinaFriend
Messages: 7
Registered: December 2015
Junior Member

I am trying to read sequence diagram xmi generated by IBM Rational software architect , by using EMF but i still can't read the xmi file. Is it possible to read the sequence diagram xmi file using EMF ?!

Re: Read sequence diagram by its Xmi [message #1746615 is a reply to message #1746584] Tue, 01 November 2016 19:43 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1262
Registered: July 2009
Location: Canada
Senior Member


You will have to be more specific about what you are trying to do.

By "read the sequence diagram XMI file" do you mean to read it not using the Eclipse UML2 and Eclipse GMF Notation model APIs? I would strongly recommend using these APIs; anything else will result in tearing your hair out.

Are you trying to read the semantics of the UML Interaction that is pictured in a sequence diagram, or are you trying to analyze the diagram, itself (the visualization of the interaction as a sequence diagram)? In the latter case, you should know that RSA sequence diagrams are "canonical" and often omit much if not most of the actual layout information, including even which lifelines, messages, and various interaction fragments are shown in the diagram. It can be extremely difficult to reconstruct the visual content of the diagram outside of the RSA environment, and I cannot begin to help with that.

Also worth noting is that RSA uses a very old version of the Eclipse UML2 API, one that implements OMG UML 2.2. UML is up to version 2.5 by now and has changed considerably. The current Eclipse UML2 API can read and convert the contents of an RSA model, but the results may sometimes have a few surprises. See the migration guides from release to release on the UML2 pages in the Eclipse Wiki.


Re: Read sequence diagram by its Xmi [message #1746616 is a reply to message #1746615] Tue, 01 November 2016 20:01 Go to previous message
Danny Deina is currently offline Danny DeinaFriend
Messages: 7
Registered: December 2015
Junior Member
Hi Christian,
Thank you so much.
to be more specific, i am trying to build a tool. The input will be sequence diagram generated by RSA and read
the .xmi content to get its nodes (lifeline, messages,..) and the user can select which lifeline or messages
want to delete from the diagram, and the output to generate another sequence diagram based on the actions which
the user did (some nodes will be deleted).
I used before eclipse UML2 and GMF with class diagrams generated by papyrus, but for sequence diagrams i still
have problems of how to get the nodes (lifeline, messages).
can you please recommend me a tutorial about how to do that, my .xmi file look like this:

  <uml:Package xmi:id="_TGHOYJuGEeapgJGdwfQEkw">
    <packagedElement xmi:type="uml:Collaboration" xmi:id="_TGTboJuGEeapgJGdwfQEkw">
      <ownedBehavior xmi:type="uml:Interaction" xmi:id="_TGTboZuGEeapgJGdwfQEkw">
        <ownedConnector xmi:id="_bTJhQJuGEeapgJGdwfQEkw">
          <end xmi:id="_bTJhQZuGEeapgJGdwfQEkw" role="_Xx4Z8JuGEeapgJGdwfQEkw"/>
          <end xmi:id="_bTKIUJuGEeapgJGdwfQEkw" role="_UyvvUJuGEeapgJGdwfQEkw"/>
        <lifeline xmi:id="_UxZrgJuGEeapgJGdwfQEkw" name="Property" represents="_UyvvUJuGEeapgJGdwfQEkw" coveredBy="_bTF24JuGEeapgJGdwfQEkw _bTI6MpuGEeapgJGdwfQEkw"/>
        <lifeline xmi:id="_Xx3y4JuGEeapgJGdwfQEkw" name="Property2" represents="_Xx4Z8JuGEeapgJGdwfQEkw" coveredBy="_bTGd8JuGEeapgJGdwfQEkw _bTITIJuGEeapgJGdwfQEkw _bTI6MJuGEeapgJGdwfQEkw"/>
        <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_bTF24JuGEeapgJGdwfQEkw" covered="_UxZrgJuGEeapgJGdwfQEkw" message="_bS5CkJuGEeapgJGdwfQEkw"/>
        <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_bTGd8JuGEeapgJGdwfQEkw" covered="_Xx3y4JuGEeapgJGdwfQEkw" message="_bS5CkJuGEeapgJGdwfQEkw"/>
        <fragment xmi:type="uml:BehaviorExecutionSpecification" xmi:id="_bTITIJuGEeapgJGdwfQEkw" covered="_Xx3y4JuGEeapgJGdwfQEkw" start="_bTGd8JuGEeapgJGdwfQEkw" finish="_bTI6MJuGEeapgJGdwfQEkw"/>
        <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_bTI6MJuGEeapgJGdwfQEkw" covered="_Xx3y4JuGEeapgJGdwfQEkw" message="_bTI6MZuGEeapgJGdwfQEkw"/>
        <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_bTI6MpuGEeapgJGdwfQEkw" covered="_UxZrgJuGEeapgJGdwfQEkw" message="_bTI6MZuGEeapgJGdwfQEkw"/>
        <message xmi:id="_bS5CkJuGEeapgJGdwfQEkw" name="message1" receiveEvent="_bTGd8JuGEeapgJGdwfQEkw" sendEvent="_bTF24JuGEeapgJGdwfQEkw" connector="_bTJhQJuGEeapgJGdwfQEkw"/>
        <message xmi:id="_bTI6MZuGEeapgJGdwfQEkw" name="message1" messageSort="reply" receiveEvent="_bTI6MpuGEeapgJGdwfQEkw" sendEvent="_bTI6MJuGEeapgJGdwfQEkw" connector="_bTJhQJuGEeapgJGdwfQEkw"/>
      <ownedAttribute xmi:id="_UyvvUJuGEeapgJGdwfQEkw" name="lifeline1"/>
      <ownedAttribute xmi:id="_Xx4Z8JuGEeapgJGdwfQEkw" name="lifeline2"/>
    <profileApplication xmi:id="_TUK4gJuGEeapgJGdwfQEkw">
      <eAnnotations xmi:id="_TVIh0JuGEeapgJGdwfQEkw" source="">
        <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbnfB2L_5w"/>
      <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
    <profileApplication xmi:id="_TVS54JuGEeapgJGdwfQEkw">
      <eAnnotations xmi:id="_TVTg8JuGEeapgJGdwfQEkw" source="">
        <references xmi:type="ecore:EPackage" href="pathmap://UML2_MSL_PROFILES/Default.epx#_fNwoAAqoEd6-N_NOT9vsCA?Default/Default?"/>
      <appliedProfile href="pathmap://UML2_MSL_PROFILES/Default.epx#_a_S3wNWLEdiy4IqP8whjFA?Default?"/>
    <profileApplication xmi:id="_TVTg8ZuGEeapgJGdwfQEkw">
      <eAnnotations xmi:id="_TVUIAJuGEeapgJGdwfQEkw" source="">
        <references xmi:type="ecore:EPackage" href="pathmap://UML2_MSL_PROFILES/Deployment.epx#_4OVBUD0TEeKt-L0gyEptgQ?Deployment/Deployment?"/>
      <appliedProfile href="pathmap://UML2_MSL_PROFILES/Deployment.epx#_vjbuwOvHEdiDX5bji0iVSA?Deployment?"/>

Previous Topic:read uml model program
Next Topic:order of the ends of a binary association
Goto Forum:

Current Time: Thu Aug 11 06:38:18 GMT 2022

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

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

Back to the top