Have created the Sequence diagram using ArgoUML and exported it as XMI.
I need to identify the class,function and their relationships by parsing the XMI.
I can able to parse the class and their corresponding operation and attribute as explained in http://www.ibm.com/developerworks/library/x-wxxm24/#resources
Can any one help me in parsing the association role and classifier role in order to obtain their relationship?
The main thing that you need to know is that it's UML 1.4/1.5 serialized using XMI 1.2. ArgoUML uses the NetBeans UML/XMI support for writing these files, but it's been long since retired.
Good luck!
Related
PhpStorm has a feature to create UML diagrams based on existing classes
But I need to create and save my own diagrams, that will have objects for not existing classes. For example, I need to create a database diagram and a UML diagram for some classes of new feature.
Can I do it via phpstorm?
No, going by the Documentation Jetbrains Confluence on UML Diagrams in Phpstorm and this post phpstorm only allows you to create different UML diagram views of your code base, the only model is your code base itself. Thus you cannot have classes just in a diagram.
If it is still of your interest, you can use an extension like this to write your custom UMLs. You can find the documentation here
I want to represent UML models in a serialized document using the most standard conventions available. I am looking for a canonical schema document that explicitly dictates the best way to do this. I suspect that, if such a document exists, then it would be written in either XSD, RDF and OWL. So far, I have only been able to find OMG specification documents and academic papers on the subject. I have found some XSD schemas, but they only apply to a particular aspect of the implementation.
Is there a canonical document schema? Where can I find it? If not, what are the most common representation formats and where can I find their schemas?
Are there any libraries that facilitate the generation of mappings from well-formed documents of this kind to graphical representations (e.g. SVG)? The library would ideally be .NET compatible, but this is not a requirement.
Are you looking for XMI (XML Metadata Interchange)? It's an OMG spec for XML representations of UML models; the current version appears to be 2.4.1, and the spec page links to two XSD schema documents.
In theory, XMI should answer part of your first question. XMI is not, however, without perils. From my own experience trying to achieve exactly the same, I would think that the first thing to do is to understand what others did about it, and how these standard documents would be used. These days I would suggest a system setup that involves IBM RSA and Sparx Enterprise Architect (eval versions available, registration may be required, and I am not affiliated with any of these companies). Build at least one comprehensive UML model which would give you the coverage you need, in one tool, then use the XMI export/import function to move the model between them. See what happens. Take a look at a company such as this (the makers of TOOLBUS, not affiliated with them) and think how XMI should affect their business model, and yet it seems that it doesn't...
I would think that success is achievable, but may prove feasible for a (very) narrow scope - scoping is key here.
As for the second part, I don't think you're going to find it, particularly for .NET.
XMI is the keyword you need. But XMI specifies only the document format. It does specify the document structure or contents. The UML metamodel does this. A library which does both for you is org.eclipse.uml2 - it implements the UML 2.4 metamodel and allows to store and restore it in XMI. IBM RSA uses this library as well. As several other Java Tools do.
I'm not aware of a UML2 implementation in a .NET language.
UML 2.x has 14 diagram types - grouped into structural and behavioral diagrams. For a system modelled in UML, there is inter-linking between diagrams, for example:
A class with a state variable should have a corresponding state-machine diagram which models its behavior.
Similarly, the life-line in sequence diagram is an instance of a class: usually shown as :.
What are the other links possible between the 14 diagrams?
Is there a tool independent way of specifying these?
Are these linkages exported in a standard way in the XMI output file, if XMI export is supported?
In UML2 you can now create almost any model element in any diagram. I mean that you can have structural elements inside the same diagram.
alt text http://www.forum-omondo.com/download/file.php?id=194&mode=view
Having said that you can also use the EclipseUML2 editor which is open source. You create manually your model and for example create a State then a child Class. Once created you open the model with a compatible UML tool and drag and drop inside an empty diagram what has been manually model. You will get a graphical representation.
I do it every day with Omondo EclipseUML Helios and it works really well. I have previously tried RSA 6.5 and it was also possible. My graphical diagram allows me to create as many as needed views from my model. I can manipulate my model with the editor or with the diagram. Really cool !!
We have an application that generates a XSD file that represents database tables.
I now need to convert the XSD in to a UML model. This will allow clients to change the model using a modelling tool (such as Magicdraw, RSA, Eclipse, ct) and then run another of our tools to generate other artifacts.
How can I convert from XSD to UML ?
We own MagicDraw so I was looking in to the Transformations functionality that should do this for me but for some reason I can't import the XSD, although it is valid.
I'm also confused when it talks about XML Schemas and XMI format. How do these differ from my XSD file?
Thanks.
Sarah
The best tool that I have found for this purpose is the XML modelling tool. Its been a while since it was updated, but it works. I blogged about it at Modelling wsdl as uml
There are some tools able to transform XML schemas into UML diagrams (see a list here, read the comments in the post) but the XML/XMI import of MagicDraw (and in general of any other UML tool) will not work in your schema since they expect a specific type of XML file (XMI format) which is the standard used to provide a XML-based definition of a UML model.
That is, XMI files are used to store UML models in XML and they follow a predefined XSD. In theory UML tools should be able to exchange UML models stored in XMI but unfortunately, this "model once open anywhere" is not true (but this is another story)
You can try to use the Eclipse Dali plugin which would generate a java code directly from your database. Once you get the code you can reverse into UML.
From UML to database you could try to add java persistence annotations in your code coming from your UML class diagram. When you have the annotated code then try hibernate to create your database.
This would do the job but having multiple layers means that you loose tracability between your original data model and UML and back. This is called the pojo cycle.
All of my Visio experience is with LAN/WAN documentation. I recently had a desire to visualize the relationship between objects in the Nagios configuration and I realized I didn't know how to do it properly and moved on to something more important. I was reading the responses to this thread and realized this is something software developers must do a lot.
So this is probably a soft-pitch question, but what is the proper method for documenting object relationships in Visio? Is there a better template to use? What stencil collection is the proper stencil in?
In my probably naive view I imagine an object being a large box with a single "reception" connector and containing multiple smaller boxes, each of which represents an object member and having its own connector. So, each object member field would connect out to the "reception" connector on the object of the member's type. In and of itself those objects are fairly easy to build. The problem I ran into is that the connector lines didn't respect the objects and ran over the top of them, making an awful, unusable mess.
Thanks for any pointers.
You can use a UML static class diagram with << stereotype >> annotations, which is the kind of thing you would do in Rational Rose for using UML for things that aren't necessarily classes and methods, such as databases.
I've been using these UML stencils for diagramming object models and entity relationship diagrams. It is fairly comprehensive. Be sure to take a look at the "tips" document... very important.