net.sourceforge.nrl.parser.model.uml2
Class UML2ModelLoader

java.lang.Object
  extended by net.sourceforge.nrl.parser.model.uml2.UML2ModelLoader

public class UML2ModelLoader
extends Object

A model loader that uses the UML2 and EMF classes to populate an NRL model.


Constructor Summary
UML2ModelLoader()
           
 
Method Summary
 List<String> getWarnings()
          Return the list of warning strings created during the last load operation.
 IPackage load(File file)
          Load a model contained in the specified file.
 IPackage load(org.eclipse.emf.ecore.resource.Resource res, File file)
          Internal function to load using an ECore resource.
 IPackage loadFromInitialisedResource(org.eclipse.emf.ecore.resource.Resource res, String fileName)
          Load a UML2 model out of an already initialised resource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UML2ModelLoader

public UML2ModelLoader()
Method Detail

getWarnings

public List<String> getWarnings()
Return the list of warning strings created during the last load operation.

Returns:
the warnings

load

public IPackage load(File file)
              throws Exception
Load a model contained in the specified file. This will break up the model into an NRL model.

The method currently also ignores all ClassNotFoundException and PackageNotFoundException errors, to ignore problems where a profile is not found.

Parameters:
file - the file to load
Returns:
the model
Throws:
Exception

load

public IPackage load(org.eclipse.emf.ecore.resource.Resource res,
                     File file)
              throws Exception
Internal function to load using an ECore resource. Used for testing.

Throws:
Exception

loadFromInitialisedResource

public IPackage loadFromInitialisedResource(org.eclipse.emf.ecore.resource.Resource res,
                                            String fileName)
                                     throws Exception
Load a UML2 model out of an already initialised resource. The resource must have already been loaded without errors, and an NRL model is constructed from it.

Parameters:
res - the resource
fileName - the file name, for error reporting purposes
Returns:
the model
Throws:
Exception


Copyright © 2006-2010 Christian Nentwich and others