Package org.eclipse.m2m.atl.engine.vm
Class ModelLoader
java.lang.Object
org.eclipse.m2m.atl.engine.vm.ModelLoader
- Direct Known Subclasses:
EMFModelLoader
Model loading and saving facility. Must be extended by concrete implementations
such as for EMF or MDR. This is only used in command-line mode at the present time.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtractor(String prefix, Class ext) voidaddInjector(String prefix, Class inj) voidabstract ASMModelgetATL()abstract ASMModelgetBuiltInMetaModel(String name) abstract ASMModelgetMOF()abstract ASMModelloadModel(String name, ASMModel metamodel, InputStream in) Loads a model with given name and metamodel from in.Loads a model from the URI represented by href.abstract ASMModelDeprecated.protected abstract ASMModelrealLoadModel(String name, ASMModel metamodel, String href) protected abstract voidvoidSaves the model to a writable URL.protected abstract voidsetParameter(String name, Object value) abstract void
-
Field Details
-
loadedModels
-
-
Constructor Details
-
ModelLoader
public ModelLoader()
-
-
Method Details
-
addInjector
-
addExtractor
-
loadModel
public abstract ASMModel loadModel(String name, ASMModel metamodel, InputStream in) throws IOException Loads a model with given name and metamodel from in. Use this method only if there is no real URI available!- Parameters:
name- The model name.metamodel- The metamodel of the model to be loaded.in- The input stream from which to load.- Returns:
- The loaded ASMModel.
- Throws:
IOException
-
realLoadModel
protected abstract ASMModel realLoadModel(String name, ASMModel metamodel, String href) throws IOException - Throws:
IOException
-
loadModel
Loads a model from the URI represented by href.- Parameters:
name- The model name.metamodel- The metamodel of the model to be loaded.href- The model URI.- Returns:
- The loaded ASMModel.
- Throws:
IOException
-
inject
-
newModel
Deprecated.UsenewModel(String, String, ASMModel)instead- Parameters:
name-metamodel-- Returns:
- A new ASMModel
-
newModel
- Parameters:
name-uri-metamodel-- Returns:
- A new ASMModel
-
setParameter
-
realSave
- Throws:
IOException
-
save
Saves the model to a writable URL.- Parameters:
model- The model to savehref- The writable URL- Throws:
IOException
-
extract
-
getMOF
-
getATL
-
getBuiltInMetaModel
-
unload
-
newModel(String, String, ASMModel)instead