Package org.eclipse.m2m.atl.core.emf
Class EMFModelFactory
- java.lang.Object
-
- org.eclipse.m2m.atl.core.ModelFactory
-
- org.eclipse.m2m.atl.core.emf.EMFModelFactory
-
public class EMFModelFactory extends ModelFactory
The EMF implementation of theModelFactory.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMODEL_FACTORY_NAMEThe model factory name which is also the extractor/injector name.static java.lang.StringOPTION_CONTENT_TYPEContent type.static java.lang.StringOPTION_URIURI option.
-
Constructor Summary
Constructors Constructor Description EMFModelFactory()Creates a newEMFModelFactoryand initialize theResourceSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalizeResource(org.eclipse.emf.ecore.resource.Resource r)Finalizes r.IReferenceModelgetBuiltInResource(java.lang.String name)Returns the built-in resource matching the given name.java.lang.StringgetDefaultExtractorName()Returns a defaultIExtractorassociated with the current factory.java.lang.StringgetDefaultInjectorName()Returns a defaultIInjectorassociated with the current factory.EMFReferenceModelgetMetametamodel()Returns the Metametamodel.org.eclipse.emf.ecore.resource.ResourceSetgetResourceSet()EMFModelnewModel(EMFReferenceModel referenceModel, java.lang.String uri)Creates a newEMFModelusing the given uri.IModelnewModel(IReferenceModel referenceModel)Creates a newIModelusing default options and conforming to the givenIReferenceModel.IModelnewModel(IReferenceModel referenceModel, java.util.Map<java.lang.String,java.lang.Object> options)Creates a newIModelusing specified options and conforming to the givenIReferenceModel.IReferenceModelnewReferenceModel()Creates a newIReferenceModelusing default options.IReferenceModelnewReferenceModel(java.util.Map<java.lang.String,java.lang.Object> options)Creates a newIReferenceModelusing specified options.voidunload(EMFModel model)
-
-
-
Field Detail
-
MODEL_FACTORY_NAME
public static final java.lang.String MODEL_FACTORY_NAME
The model factory name which is also the extractor/injector name.- See Also:
- Constant Field Values
-
OPTION_CONTENT_TYPE
public static final java.lang.String OPTION_CONTENT_TYPE
Content type.- See Also:
- Constant Field Values
-
OPTION_URI
public static final java.lang.String OPTION_URI
URI option.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EMFModelFactory
public EMFModelFactory()
Creates a newEMFModelFactoryand initialize theResourceSet.
-
-
Method Detail
-
getMetametamodel
public EMFReferenceModel getMetametamodel()
Returns the Metametamodel.- Specified by:
getMetametamodelin classModelFactory- Returns:
- the Metametamodel
- See Also:
ModelFactory.getMetametamodel()
-
newReferenceModel
public IReferenceModel newReferenceModel(java.util.Map<java.lang.String,java.lang.Object> options)
Creates a newIReferenceModelusing specified options.- Specified by:
newReferenceModelin classModelFactory- Parameters:
options- the creation options- Returns:
- a new
IReferenceModel - See Also:
ModelFactory.newReferenceModel(java.util.Map)
-
newReferenceModel
public IReferenceModel newReferenceModel()
Creates a newIReferenceModelusing default options.- Specified by:
newReferenceModelin classModelFactory- Returns:
- a new
IReferenceModel - See Also:
ModelFactory.newReferenceModel()
-
newModel
public IModel newModel(IReferenceModel referenceModel, java.util.Map<java.lang.String,java.lang.Object> options)
Creates a newIModelusing specified options and conforming to the givenIReferenceModel.- Specified by:
newModelin classModelFactory- Parameters:
referenceModel- theIReferenceModeloptions- the creation options- Returns:
- a new
IModel - See Also:
ModelFactory.newModel(org.eclipse.m2m.atl.core.IReferenceModel, java.util.Map)
-
newModel
public IModel newModel(IReferenceModel referenceModel)
Creates a newIModelusing default options and conforming to the givenIReferenceModel.- Specified by:
newModelin classModelFactory- Parameters:
referenceModel- theIReferenceModel- Returns:
- a new
IModel - See Also:
ModelFactory.newModel(org.eclipse.m2m.atl.core.IReferenceModel)
-
newModel
public EMFModel newModel(EMFReferenceModel referenceModel, java.lang.String uri)
Creates a newEMFModelusing the given uri.- Parameters:
referenceModel- theIReferenceModeluri- the model uri- Returns:
- a new
IModel
-
getDefaultExtractorName
public java.lang.String getDefaultExtractorName()
Returns a defaultIExtractorassociated with the current factory.- Specified by:
getDefaultExtractorNamein classModelFactory- Returns:
- the default
IExtractor - See Also:
ModelFactory.getDefaultExtractorName()
-
getDefaultInjectorName
public java.lang.String getDefaultInjectorName()
Returns a defaultIInjectorassociated with the current factory.- Specified by:
getDefaultInjectorNamein classModelFactory- Returns:
- the default
IInjector - See Also:
ModelFactory.getDefaultInjectorName()
-
getResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
-
getBuiltInResource
public IReferenceModel getBuiltInResource(java.lang.String name) throws ATLCoreException
Returns the built-in resource matching the given name.- Specified by:
getBuiltInResourcein classModelFactory- Parameters:
name- the resource name- Returns:
- the built-in resource matching the given name
- Throws:
ATLCoreException- See Also:
ModelFactory.getBuiltInResource(java.lang.String)
-
unload
public void unload(EMFModel model)
- Parameters:
model- The model of which to remove theResource.
-
finalizeResource
protected void finalizeResource(org.eclipse.emf.ecore.resource.Resource r)
Finalizes r. This implementation does nothing, but allows for overriding in subclasses.- Parameters:
r- The resource to finalize.
-
-