I am using the UML2 API to load a model that I have created previously with Papyrus. I want to parse this model to find and get all the classes. This is the code that I am using by now:
EList<Type> list4 = model.getOwnedTypes();
for (Type element : list4)
With this code I am able to get a lot of elements of the model, including classes, associations, etc. However, I just want to get the classes of a UML diagram. How can I achieve this? How can I check the type of the elements?
This must be quite simple to do but I am just browsing through the API and I can't find anything. Could you refer me to some examples?