Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MDT (Model Development Tools) » [SBVR] load sbvr vocabulary from .xmi file(How to load vocabulary model from .xmi file (help))
[SBVR] load sbvr vocabulary from .xmi file [message #504128] Thu, 17 December 2009 11:39
Giuseppe Ciulla is currently offline Giuseppe Ciulla
Messages: 3
Registered: November 2009
Junior Member
Hi.
My name is Giuseppe.
I'm building an application to load sbvr vocabulary from .xmi file.
I'm using .xmi file provided in this post http://dev.eclipse.org/mhonarc/lists/mdt-sbvr.dev/msg00093.html.
The author of the post wrote "The CMOF model for SBVR exchange document XMI format is also checked into org.eclipse.sbvr.xmi"
I'm looking in the project org.eclipse.sbvr.xmi and the class org.eclipse.sbvr.xmi.util.SBVRXMISwitch (I suppose that it is the class I nedd), but I have no idea about it's functioning or if it is the the class I need.
At the moment I'm able to load .sbvr file provided in the post I linked and to do this I use this code:

ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
resourceSet.getPackageRegistry().put(MrvPackage.eNS_URI, MrvPackage.eINSTANCE);
File file = new File("myfile.sbvr");
URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()): URI.createURI(args[0]);
Resource resource = resourceSet.getResource(uri, true);
EList<EObject> myObjectList = resource.getContents();


Regards,
Giuseppe Ciulla
Previous Topic:Survey on the application of UML in the maintainence of legacy systems.
Next Topic:[SBVR] load sbvr vocabulary from .xmi file
Goto Forum:
  


Current Time: Tue Oct 21 15:30:54 GMT 2014

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

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