|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.m2m.atl.engine.vm.ModelLoader
org.eclipse.m2m.atl.drivers.emf4atl.EMFModelLoader
public class EMFModelLoader
Loads EMF models into a ResourceSet
. Make sure to use the same model loader for all EMF models used
in a model transformation! Use different model loaders for different threads.
Field Summary | |
---|---|
protected static ASMModel |
atlmm
|
protected java.util.Map |
bimm
|
protected static org.osgi.framework.Bundle |
bundle
|
protected java.lang.String |
encoding
|
protected static org.eclipse.emf.common.util.URI |
mofURI
|
protected boolean |
removeIDs
|
protected org.eclipse.emf.ecore.resource.ResourceSet |
resourceSet
|
protected java.util.Map |
saveOptions
|
protected boolean |
useIDs
|
Fields inherited from class org.eclipse.m2m.atl.engine.vm.ModelLoader |
---|
loadedModels |
Constructor Summary | |
---|---|
EMFModelLoader()
EMFModelLoader constructor. |
Method Summary | |
---|---|
protected void |
adaptMetamodel(ASMEMFModel model,
ASMEMFModel metamodel)
Adapts model if its metamodel is MOF, such that its NsURI is registered and primitive datatypes are mapped to Java types. |
protected ASMEMFModel |
createASMEMFModel(java.lang.String name,
org.eclipse.emf.ecore.resource.Resource extent,
ASMModel metamodel,
boolean isTarget)
Creates a new ASMEMFModel . |
protected void |
finalize()
|
protected void |
finalizeResource(org.eclipse.emf.ecore.resource.Resource r)
Finalizes r. |
ASMModel |
getATL()
|
ASMModel |
getBuiltInMetaModel(java.lang.String name)
|
ASMModel |
getMOF()
|
org.eclipse.emf.ecore.resource.ResourceSet |
getResourceSet()
Returns the internal ResourceSet that contains all models explicitly loaded by this loader. |
ASMModel |
loadModel(java.lang.String name,
ASMModel metamodel,
java.io.InputStream in)
Loads a model with given name and metamodel from in. |
ASMEMFModel |
loadModel(java.lang.String name,
ASMModel metamodel,
org.eclipse.emf.common.util.URI uri)
Loads an ASMEMFModel with the given name, metamodel and uri. |
ASMModel |
newModel(java.lang.String name,
ASMModel metamodel)
Deprecated. |
ASMModel |
newModel(java.lang.String name,
java.lang.String uri,
ASMModel metamodel)
|
protected ASMModel |
realLoadModel(java.lang.String name,
ASMModel metamodel,
java.lang.String href)
|
protected void |
realSave(ASMModel model,
java.lang.String href)
|
protected void |
setParameter(java.lang.String name,
java.lang.Object value)
|
void |
unload(ASMModel model)
|
Methods inherited from class org.eclipse.m2m.atl.engine.vm.ModelLoader |
---|
addExtractor, addInjector, extract, inject, loadModel, save |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.osgi.framework.Bundle bundle
protected static org.eclipse.emf.common.util.URI mofURI
protected static ASMModel atlmm
protected org.eclipse.emf.ecore.resource.ResourceSet resourceSet
protected java.util.Map bimm
protected boolean useIDs
protected boolean removeIDs
protected java.lang.String encoding
protected java.util.Map saveOptions
Constructor Detail |
---|
public EMFModelLoader()
Method Detail |
---|
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
ResourceSet
that contains all models explicitly loaded by this loader.
ResourceSet
.public ASMModel getMOF()
getMOF
in class ModelLoader
ModelLoader.getMOF()
public ASMModel getATL()
getATL
in class ModelLoader
ModelLoader.getATL()
protected ASMEMFModel createASMEMFModel(java.lang.String name, org.eclipse.emf.ecore.resource.Resource extent, ASMModel metamodel, boolean isTarget)
ASMEMFModel
.
name
- the model nameextent
- the resource extentmetamodel
- the metamodelisTarget
- true if the model is a target model
public ASMModel loadModel(java.lang.String name, ASMModel metamodel, java.io.InputStream in) throws java.io.IOException
loadModel
in class ModelLoader
name
- The model name.metamodel
- The metamodel of the model to be loaded.in
- The input stream from which to load.
java.io.IOException
ModelLoader.loadModel(java.lang.String,
org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel, java.io.InputStream)
public ASMEMFModel loadModel(java.lang.String name, ASMModel metamodel, org.eclipse.emf.common.util.URI uri) throws java.io.IOException
ASMEMFModel
with the given name, metamodel and uri.
name
- The name of the model to load.metamodel
- The metamodel for the model to load.uri
- The URI to load the model from.
java.io.IOException
protected ASMModel realLoadModel(java.lang.String name, ASMModel metamodel, java.lang.String href)
realLoadModel
in class ModelLoader
ModelLoader.realLoadModel(java.lang.String,
org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel, java.lang.String)
public ASMModel newModel(java.lang.String name, ASMModel metamodel)
newModel
in class ModelLoader
ModelLoader.newModel(java.lang.String,
org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel)
public ASMModel newModel(java.lang.String name, java.lang.String uri, ASMModel metamodel)
newModel
in class ModelLoader
ModelLoader.newModel(java.lang.String, java.lang.String,
org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel)
public ASMModel getBuiltInMetaModel(java.lang.String name)
getBuiltInMetaModel
in class ModelLoader
ModelLoader.getBuiltInMetaModel(String)
protected void setParameter(java.lang.String name, java.lang.Object value)
setParameter
in class ModelLoader
ModelLoader.setParameter(java.lang.String, java.lang.Object)
protected void realSave(ASMModel model, java.lang.String href) throws java.io.IOException
realSave
in class ModelLoader
java.io.IOException
ModelLoader.realSave(org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel,
java.lang.String)
protected void adaptMetamodel(ASMEMFModel model, ASMEMFModel metamodel) throws java.io.IOException
model
- The model to adapt.metamodel
- The model's metamodel.
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Object.finalize()
protected void finalizeResource(org.eclipse.emf.ecore.resource.Resource r)
r
- The Resource
to finalize.public void unload(ASMModel model)
unload
in class ModelLoader
ModelLoader.unload(ASMModel)
|
Copyright 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |