net.sourceforge.nrl.parser.model.xsd
Class XSDModelLoader

java.lang.Object
  extended by net.sourceforge.nrl.parser.model.xsd.XSDModelLoader
All Implemented Interfaces:
IXSDUserData

public class XSDModelLoader
extends Object
implements IXSDUserData

The main XML Schema model loader class. Call load(File) to load a file and its includes and imports as an NRL model or load(Resource, File) if you already have a handle on the EMF resource containing the schema.


Field Summary
 
Fields inherited from interface net.sourceforge.nrl.parser.model.xsd.IXSDUserData
CONTAINING_TYPE, NAMESPACE, SUBSTITUTABLE, SUBSTITUTION_FOR
 
Constructor Summary
XSDModelLoader()
           
 
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)
          Load with no options.
 IPackage load(org.eclipse.emf.ecore.resource.Resource res, File file, Map<?,?> options)
          Load using an ECore resource and an option map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSDModelLoader

public XSDModelLoader()
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
Load with no options.

Throws:
Exception

load

public IPackage load(org.eclipse.emf.ecore.resource.Resource res,
                     File file,
                     Map<?,?> options)
              throws Exception
Load using an ECore resource and an option map. Used for testing.

Throws:
Exception


Copyright © 2006-2010 Christian Nentwich and others