Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Metamodel in Superstructure.uml
Metamodel in Superstructure.uml [message #699887] Fri, 22 July 2011 10:40 Go to previous message
wws_ques wws_ques is currently offline wws_ques wws_ques
Messages: 64
Registered: July 2009
Member
I wrote a simple program to save a class diagram to a uml file. After
that I can read the elements such as Class in the uml
file using the following code:

if(resource.getContents().get(i) instanceof Model)
{
System.out.println("Model name is " + ((Model) resource.getContents().get(i)).getName());
}
else if (resource.getContents().get(i) instanceof Class)
System.out.println("Class name is " + ((Class) resource.getContents().get(i)).getName());
....

But when I try to load the UML Metamodel from the Superstructure.uml file, the above code failed. When I check Superstructure.uml, I find this file is different from the
uml file where I saved a class model created using UML2 api. The element in my created uml file is like UML:MetaClass such as UML:Class while Superstructure.uml has elements whose name is PackagedElement... In this case, how Superstructure.uml is created? It does not seem to be created by ECore... How can I read Superstructure.uml? Thanks.
Wuwei
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Adding a Double value to a Slot
Next Topic:How to draw diagrams in Indigo?
Goto Forum:
  


Current Time: Sun May 19 21:19:55 EDT 2013

Powered by FUDForum. Page generated in 0.02988 seconds