Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Loading a Profile
Loading a Profile [message #626050] Mon, 18 February 2008 20:02
Eclipse UserFriend
Originally posted by: flavio.p.duarte.gmail.com

Hi,
I am trying to load a standard profile into my model, but although I am
being able to get the resource (resourceSet.getResource) I can not get the
profile out of it (EcoreUtil.getObjectByType); it returns null.
Since the profile I am reading was created using UML 2.0, I believe the
migration rules don't apply, am I right ? Assuming the previous assertion
is true, the code to read the profile should be similiar to the one in the
document "Introduction to UML2 Profiles", which is my case. My code is:
URI uri =
URI.createURI(" file:/C:\\UML_Profile_for_Schedulabilty,_Performance_and_Tim e_Specification.profile.uml ");

Resource res = RESOURCE_SET.getResource(uri, true);

prof=(org.eclipse.uml2.uml.Profile) EcoreUtil.getObjectByType(
res.getContents(), UMLPackage.Literals.PACKAGE);

The profile that I am trying to read is Standard Profile for
Schedulability, Performance and Time Specification and it was created by
OMG.
Any ideas ?

-Flávio
Previous Topic:Uni / Bi Directional Associations 3x different
Next Topic:stereotypes with MagicDraw
Goto Forum:
  


Current Time: Sat Aug 20 06:57:03 GMT 2022

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

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

Back to the top