UMLPrimitiveTyes [message #619924] |
Sat, 09 June 2007 21:41 |
Andrew Carton Messages: 104 Registered: July 2009 |
Senior Member |
|
|
Hi,
I'm trying to read a UML file and transform the UMLPrimitiveTypes into
other types defined by another profile. I can not figure out how to
compare an element to a UMLPrimitiveType (for example
UMLPrimitiveType::Boolean). There only seems to be a eProxyURI to get at.
I tried using the UMLProfile tutorial. I get the error
"java.net.MalformedURLException: unknown protocol: pathmap" when I try
to retrieve this.
Here is the code:
Model umlLibrary = (Model)
fileManager.load(URI.createURI(UMLResource.UML_PRIMITIVE_TYP ES_LIBRARY_URI));
Package load(URI uri)
{
Package package_ = null;
package_ = (Package) EcoreUtil.getObjectByType(resource.getContents(),
UMLPackage.Literals.PACKAGE);
return package_;
}
Thanks,
Andrew.
|
|
|
Powered by
FUDForum. Page generated in 0.02468 seconds