Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Convert AnyTypeImpl to UML elements
Convert AnyTypeImpl to UML elements [message #627282] Mon, 15 December 2008 07:01
David BY Chan is currently offline David BY ChanFriend
Messages: 40
Registered: July 2009
Member
I loaded an UML model file(e.g. House.uml) into memory using standalone
manner.

ResourceSet rs = new ResourceSetImpl();

rs.getResourceFactoryRegistry().getExtensionToFactoryMap().p ut(UMLResource.FILE_EXTENSION,new
UMLResourceFactoryImpl());
URI uml_model_path = URI.createFileURI("model/House.uml");
UMLResource res = (UMLResource) rs.getResource(uml_model_path,true);
TreeIterator<EObject> iter = res.getAllContents();
while (iter.hasNext())
{
EObject obj = iter.next();
System.out.println(obj.getClass().getName());
}

but the output indicated that all types are
org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl, how can I convert them
to UML model elements, such as Package, Class, Property, Operation etc..

Thanks a lot!
Previous Topic:Change ID of element
Next Topic:Convert AnyTypeImpl to UML elements
Goto Forum:
  


Current Time: Thu Apr 25 19:08:05 GMT 2024

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

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

Back to the top