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.

Author:
Christian Nentwich

Constructor Summary
UML2ModelLoader()
           
 
Method Summary
 List<String> getWarnings()
          Return the list of warning strings created during the last load operation.
 IPackage load(File file)
          Deprecated. Use the IModelLoader interface to load models.
 IPackage load(org.eclipse.emf.ecore.resource.Resource res)
          Load a UML2 model out of an already initialised resource.
 IPackage load(org.eclipse.emf.ecore.resource.Resource res, File file)
          Deprecated. Use the IModelLoader interface to load models.
 IPackage loadFromInitialisedResource(org.eclipse.emf.ecore.resource.Resource res, String fileName)
          Deprecated. Use the IModelLoader interface to load models, or #load(Resource, Map) if you must.
protected  void traverse(org.eclipse.uml2.uml.Classifier umlClassifier, UML2Package current, boolean setAsSupplementary)
          Traverse a classifier, store its generalizations and attributes
protected  void traverse(org.eclipse.uml2.uml.DataType umlDataType, UML2Package current, boolean setAsSupplementary)
          Traverse a data type
protected  void traverse(org.eclipse.uml2.uml.Enumeration umlEnumeration, UML2Package current, boolean setAsSupplementary)
          Traverse a classifier, store its generalizations and attributes
protected  void traverse(org.eclipse.uml2.uml.Package umlPackage, UML2Package current, boolean setAsSupplementary, List<org.eclipse.uml2.uml.Association> associations)
          Traverse a package and store all its classifier members
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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

@Deprecated
public IPackage load(File file)
              throws Exception
Deprecated. Use the IModelLoader interface to load models.

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

@Deprecated
public IPackage load(org.eclipse.emf.ecore.resource.Resource res,
                                File file)
              throws Exception
Deprecated. Use the IModelLoader interface to load models.

Internal function to load using an ECore resource. Used for testing.]#

Throws:
Exception

loadFromInitialisedResource

@Deprecated
public IPackage loadFromInitialisedResource(org.eclipse.emf.ecore.resource.Resource res,
                                                       String fileName)
                                     throws Exception
Deprecated. Use the IModelLoader interface to load models, or #load(Resource, Map) if you must.

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

load

public IPackage load(org.eclipse.emf.ecore.resource.Resource res)
              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
Returns:
the model
Throws:
Exception

traverse

protected void traverse(org.eclipse.uml2.uml.Package umlPackage,
                        UML2Package current,
                        boolean setAsSupplementary,
                        List<org.eclipse.uml2.uml.Association> associations)
Traverse a package and store all its classifier members

Parameters:
umlPackage - package
current - the current package to add to

traverse

protected void traverse(org.eclipse.uml2.uml.Classifier umlClassifier,
                        UML2Package current,
                        boolean setAsSupplementary)
Traverse a classifier, store its generalizations and attributes

Parameters:
umlClassifier - the classifier
current - the package to add to

traverse

protected void traverse(org.eclipse.uml2.uml.Enumeration umlEnumeration,
                        UML2Package current,
                        boolean setAsSupplementary)
Traverse a classifier, store its generalizations and attributes

Parameters:
umlEnumeration - the classifier
current - the package to add to

traverse

protected void traverse(org.eclipse.uml2.uml.DataType umlDataType,
                        UML2Package current,
                        boolean setAsSupplementary)
Traverse a data type

Parameters:
umlDataType - the data type
current - the package to add to


Copyright © 2006-2013. All Rights Reserved.