This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need to read XMI file through java code  RSS feed

 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Is there any way i can read an XMI file by writing java code rather that using nay tool(like EMF, MDI etc)? I want to write a java program which can read all the classes and attributes in an xmi file and then load then in the memory.

Please help.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several file formats using the .XMI extension; assuming you're talking about this one, it looks like an XML format, so you should be able to use any XML library you like.
 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lester,

thanks for your reply. Actually i want to create a domain model for my project which will parse/read the different excel sheets and then will get the values of classes, relations and their instances. Hence i can not code the classes in the domain model directly as Java classes, and i have to implement a generic framework that can read any domain model (UML class diagram) from a file in a suitable format (XMI?).

So, i thought about the using xmi format for defining the uml classes format. Could you please tell me that am i going in right direction(by reading the xmi and store the classes,relationships in some variables and collection). Can you give me any other idea how to handle this situation?

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!