net.sourceforge.nrl.parser.model.loader
Class StandaloneModelLoader

java.lang.Object
  extended by net.sourceforge.nrl.parser.model.loader.AbstractModelLoader
      extended by net.sourceforge.nrl.parser.model.loader.StandaloneModelLoader
All Implemented Interfaces:
IModelLoader
Direct Known Subclasses:
ConfigurableModelLoader

public class StandaloneModelLoader
extends AbstractModelLoader


Field Summary
static Set<String> PERMITTED_URI_SCHEMES
           
 
Fields inherited from class net.sourceforge.nrl.parser.model.loader.AbstractModelLoader
PERMITTED_MODEL_FILE_EXTENSIONS
 
Constructor Summary
StandaloneModelLoader()
           
StandaloneModelLoader(ClassLoader classLoader)
           
 
Method Summary
protected  org.eclipse.emf.ecore.resource.Resource createUMLResource(URI resolvedModelURI)
           
protected  org.eclipse.emf.ecore.resource.Resource createXSDResource(URI resolvedModelURI)
           
protected  Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> getCustomURIMap()
           
 IPackage loadModel(URI uri)
          Loads any supported model format, provided the targeted file has an appropriate extension.
protected  void validateBaseURI(URI baseURI)
           
protected  void validateModelURI(URI modelURI)
           
 
Methods inherited from class net.sourceforge.nrl.parser.model.loader.AbstractModelLoader
loadModel, loadModel, loadModel, loadModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERMITTED_URI_SCHEMES

public static final Set<String> PERMITTED_URI_SCHEMES
Constructor Detail

StandaloneModelLoader

public StandaloneModelLoader()

StandaloneModelLoader

public StandaloneModelLoader(ClassLoader classLoader)
Method Detail

getCustomURIMap

protected Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> getCustomURIMap()

loadModel

public IPackage loadModel(URI uri)
                   throws ModelLoadingException
Description copied from interface: IModelLoader
Loads any supported model format, provided the targeted file has an appropriate extension. URI arguments may use the classpath or file schemes. When invoked with equivalent URIs the loader will return the same IPackage.

Specified by:
loadModel in interface IModelLoader
Overrides:
loadModel in class AbstractModelLoader
Parameters:
uri - the URI identifying the model location
Returns:
An IPackage representing the XSD or UML model referenced by modelURI, never null
Throws:
ModelLoadingException - If an error is encountered loading the model

createUMLResource

protected org.eclipse.emf.ecore.resource.Resource createUMLResource(URI resolvedModelURI)
Specified by:
createUMLResource in class AbstractModelLoader

createXSDResource

protected org.eclipse.emf.ecore.resource.Resource createXSDResource(URI resolvedModelURI)
Specified by:
createXSDResource in class AbstractModelLoader

validateBaseURI

protected void validateBaseURI(URI baseURI)
                        throws ModelLoadingException
Specified by:
validateBaseURI in class AbstractModelLoader
Throws:
ModelLoadingException

validateModelURI

protected void validateModelURI(URI modelURI)
                         throws ModelLoadingException
Specified by:
validateModelURI in class AbstractModelLoader
Throws:
ModelLoadingException


Copyright © 2006-2013. All Rights Reserved.