org.eclipse.m2m.atl.engine
Class AtlEMFModelHandler

java.lang.Object
  extended by org.eclipse.m2m.atl.engine.AtlModelHandler
      extended by org.eclipse.m2m.atl.engine.AtlEMFModelHandler
Direct Known Subclasses:
AtlUML2ModelHandler

public class AtlEMFModelHandler
extends AtlModelHandler


Field Summary
protected  ASMEMFModel atlmm
           
protected  java.lang.String encoding
           
protected  EMFModelLoader ml
           
protected  ASMEMFModel mofmm
           
protected  boolean removeIDs
           
protected  boolean useIDs
           
 
Fields inherited from class org.eclipse.m2m.atl.engine.AtlModelHandler
AMH_EMF, logger
 
Constructor Summary
protected AtlEMFModelHandler()
           
 
Method Summary
 void disposeOfModel(ASMModel model)
          Performs necessary clean-up such as freeing memory.
 ASMModel getAtl()
           
 ASMModel getBuiltInMetaModel(java.lang.String name)
           
 ASMModel getMof()
           
static org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
           
 boolean isHandling(ASMModel model)
           
 ASMModel loadModel(java.lang.String name, ASMModel metamodel, java.io.InputStream in)
           
 ASMModel loadModel(java.lang.String name, ASMModel metamodel, java.lang.String uri)
           
 ASMModel loadModel(java.lang.String name, ASMModel metamodel, org.eclipse.emf.common.util.URI uri)
           
 ASMModel newModel(java.lang.String name, ASMModel metamodel)
          Deprecated.  
 ASMModel newModel(java.lang.String name, java.lang.String uri, ASMModel metamodel)
          Creates a new ASMModel.
 void saveModel(ASMModel model, org.eclipse.core.resources.IProject project)
           
 void saveModel(ASMModel model, java.io.OutputStream out)
           
 void saveModel(ASMModel model, java.lang.String uri)
           
 void saveModel(ASMModel model, java.lang.String path, boolean outputFileIsInWorkspace)
          Saves the provided model in/out of the Eclipse workspace using the given relative/absolute path.
 void saveModel(ASMModel model, java.lang.String fileName, org.eclipse.core.resources.IProject project)
           
protected  void saveModel(ASMModel model, org.eclipse.emf.common.util.URI uri, java.io.OutputStream out)
           
 
Methods inherited from class org.eclipse.m2m.atl.engine.AtlModelHandler
getDefault, getHandler, getHandlerName, getModelHandlers, registerDefaultHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mofmm

protected ASMEMFModel mofmm

atlmm

protected ASMEMFModel atlmm

ml

protected EMFModelLoader ml

useIDs

protected boolean useIDs

removeIDs

protected boolean removeIDs

encoding

protected java.lang.String encoding
Constructor Detail

AtlEMFModelHandler

protected AtlEMFModelHandler()
Method Detail

saveModel

public void saveModel(ASMModel model,
                      org.eclipse.core.resources.IProject project)
Specified by:
saveModel in class AtlModelHandler

saveModel

public void saveModel(ASMModel model,
                      java.lang.String fileName,
                      org.eclipse.core.resources.IProject project)
Specified by:
saveModel in class AtlModelHandler

saveModel

public void saveModel(ASMModel model,
                      java.lang.String uri)
Specified by:
saveModel in class AtlModelHandler

saveModel

public void saveModel(ASMModel model,
                      java.io.OutputStream out)
Specified by:
saveModel in class AtlModelHandler

saveModel

public void saveModel(ASMModel model,
                      java.lang.String path,
                      boolean outputFileIsInWorkspace)
Saves the provided model in/out of the Eclipse workspace using the given relative/absolute path.

Parameters:
model - The model to save.
path - The workspace relative path (e.g. "/ProjectXXX/fileName.ecore") if the outputFileIsInWorkspace boolean is set to true, or the absolute path if not (e.g. "C:/FolderXXX/fileName.ecore").
outputFileIsInWorkspace - Indicates if the model output file is stored into the Eclipse workspace.

saveModel

protected void saveModel(ASMModel model,
                         org.eclipse.emf.common.util.URI uri,
                         java.io.OutputStream out)

getMof

public ASMModel getMof()
Specified by:
getMof in class AtlModelHandler

getAtl

public ASMModel getAtl()
Specified by:
getAtl in class AtlModelHandler

loadModel

public ASMModel loadModel(java.lang.String name,
                          ASMModel metamodel,
                          java.io.InputStream in)
Specified by:
loadModel in class AtlModelHandler

loadModel

public ASMModel loadModel(java.lang.String name,
                          ASMModel metamodel,
                          org.eclipse.emf.common.util.URI uri)

loadModel

public ASMModel loadModel(java.lang.String name,
                          ASMModel metamodel,
                          java.lang.String uri)

newModel

public ASMModel newModel(java.lang.String name,
                         ASMModel metamodel)
Deprecated. 

Description copied from class: AtlModelHandler
Creates a new ASMModel. Only use this method if the model URI is not known.

Specified by:
newModel in class AtlModelHandler
Parameters:
name - The model name.
See Also:
ASMEMFModel.newASMEMFModel(String, ASMEMFModel, ModelLoader)

newModel

public ASMModel newModel(java.lang.String name,
                         java.lang.String uri,
                         ASMModel metamodel)
Description copied from class: AtlModelHandler
Creates a new ASMModel. Use this method whenever the model URI is known.

Specified by:
newModel in class AtlModelHandler
Parameters:
name - The model name.
uri - The model uri.

getBuiltInMetaModel

public ASMModel getBuiltInMetaModel(java.lang.String name)
Specified by:
getBuiltInMetaModel in class AtlModelHandler

isHandling

public boolean isHandling(ASMModel model)
Specified by:
isHandling in class AtlModelHandler

disposeOfModel

public void disposeOfModel(ASMModel model)
Description copied from class: AtlModelHandler
Performs necessary clean-up such as freeing memory. It should be redefined by any AtlModelHandler requiring specific clean-upon actions to be performed. This method should be called once the ASMModel is not needed any more.

Overrides:
disposeOfModel in class AtlModelHandler

getResourceSet

public static org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()

Copyright 2007 IBM Corporation and others.
All Rights Reserved.