Package de.spraener.nxtgen
Interface ModelLoader
public interface ModelLoader
A ModelLoader is responsible for creating an instane of Model from a given URI. It is called from the NextGen whenever a new instance of the model is needed. Typically every cartridge has at least one ModelLoader.
You should not buffer the model instances. This can lead to unpredictable side effects when transformations running on that model.
The ModelLoader is located via the java intern ServiceLoader-Mechanism. So it is possible that there are more than one model loader in a generation session.
The ModelLoader can tell via the canHandle method if it is able to handle the requested
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIs this instance of ModelLoader able to handle the requested model?default ModelElementFactoryLoad the Data from the given URI and return a fresh new instance of Model.
-
Method Details
-
canHandle
Is this instance of ModelLoader able to handle the requested model?- Parameters:
modelURI- and URI to the model. It could be a file, a URL ore any other URI- Returns:
- true if the ModelLoader can handle the model.
-
loadModel
Load the Data from the given URI and return a fresh new instance of Model.- Parameters:
modelURI-- Returns:
- Model
- See Also:
-
getModelElementFactory
-