net.sourceforge.nrl.parser.model.loader
Interface IModelLoader

All Known Implementing Classes:
AbstractModelLoader, ConfigurableModelLoader, StandaloneModelLoader

public interface IModelLoader

URI-based loader for NRL models. Pass instances to the NRLParser to resolve referenced models.

Since:
1.4.9

Method Summary
 IPackage loadModel(File baseFile, String modelURI)
          Convenience method that converts baseFile to a URI and modelURI to a URI taking care to escape illegal characters.
 IPackage loadModel(File baseFile, URI modelURI)
          Convenience method that converts baseFile to a URI.
 IPackage loadModel(URI uri)
          Loads any supported model format, provided the targeted file has an appropriate extension.
 IPackage loadModel(URI baseURI, String modelURI)
          Convenience method that converts modelURI to a URI taking care to escape illegal characters.
 IPackage loadModel(URI baseURI, URI modelURI)
          Loads any supported model format, provided the targeted file has an appropriate extension.
 

Method Detail

loadModel

IPackage loadModel(URI uri)
                   throws ModelLoadingException
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.

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

loadModel

IPackage loadModel(URI baseURI,
                   URI modelURI)
                   throws ModelLoadingException
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.

Parameters:
baseURI - An absolute URI used to resolve modelURI if it is relative.
modelURI - An absolute or relative (to baseURI) URI referencing a model file.
Returns:
An IPackage representing the XSD or UML model referenced by modelURI, never null
Throws:
ModelLoadingException - If an error is encountered loading the model

loadModel

IPackage loadModel(File baseFile,
                   URI modelURI)
                   throws ModelLoadingException
Convenience method that converts baseFile to a URI. See loadModel(URI, URI).

Throws:
ModelLoadingException

loadModel

IPackage loadModel(URI baseURI,
                   String modelURI)
                   throws ModelLoadingException
Convenience method that converts modelURI to a URI taking care to escape illegal characters. See loadModel(URI, URI).

Throws:
ModelLoadingException

loadModel

IPackage loadModel(File baseFile,
                   String modelURI)
                   throws ModelLoadingException
Convenience method that converts baseFile to a URI and modelURI to a URI taking care to escape illegal characters. See loadModel(URI, URI).

Throws:
ModelLoadingException


Copyright © 2006-2013. All Rights Reserved.