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
The EMF implementation of the
ModelFactory.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinalizeResource(org.eclipse.emf.ecore.resource.Resource r) Finalizes r.getBuiltInResource(String name) Returns the built-in resource matching the given name.Returns a defaultIExtractorassociated with the current factory.Returns a defaultIInjectorassociated with the current factory.Returns the Metametamodel.org.eclipse.emf.ecore.resource.ResourceSetnewModel(EMFReferenceModel referenceModel, String uri) Creates a newEMFModelusing the given uri.newModel(IReferenceModel referenceModel) Creates a newIModelusing default options and conforming to the givenIReferenceModel.newModel(IReferenceModel referenceModel, Map<String, Object> options) Creates a newIModelusing specified options and conforming to the givenIReferenceModel.Creates a newIReferenceModelusing default options.newReferenceModel(Map<String, Object> options) Creates a newIReferenceModelusing specified options.void
-
Field Details
-
MODEL_FACTORY_NAME
The model factory name which is also the extractor/injector name.- See Also:
-
OPTION_CONTENT_TYPE
Content type.- See Also:
-
OPTION_URI
URI option.- See Also:
-
-
Constructor Details
-
EMFModelFactory
public EMFModelFactory()Creates a newEMFModelFactoryand initialize theResourceSet.
-
-
Method Details
-
getMetametamodel
Returns the Metametamodel.- Specified by:
getMetametamodelin classModelFactory- Returns:
- the Metametamodel
- See Also:
-
newReferenceModel
Creates a newIReferenceModelusing specified options.- Specified by:
newReferenceModelin classModelFactory- Parameters:
options- the creation options- Returns:
- a new
IReferenceModel - See Also:
-
newReferenceModel
Creates a newIReferenceModelusing default options.- Specified by:
newReferenceModelin classModelFactory- Returns:
- a new
IReferenceModel - See Also:
-
newModel
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:
-
newModel
Creates a newIModelusing default options and conforming to the givenIReferenceModel.- Specified by:
newModelin classModelFactory- Parameters:
referenceModel- theIReferenceModel- Returns:
- a new
IModel - See Also:
-
newModel
Creates a newEMFModelusing the given uri.- Parameters:
referenceModel- theIReferenceModeluri- the model uri- Returns:
- a new
IModel
-
getDefaultExtractorName
Returns a defaultIExtractorassociated with the current factory.- Specified by:
getDefaultExtractorNamein classModelFactory- Returns:
- the default
IExtractor - See Also:
-
getDefaultInjectorName
Returns a defaultIInjectorassociated with the current factory.- Specified by:
getDefaultInjectorNamein classModelFactory- Returns:
- the default
IInjector - See Also:
-
getResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet() -
getBuiltInResource
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:
-
unload
- 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.
-