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 void
finalizeResource
(org.eclipse.emf.ecore.resource.Resource r) Finalizes r.getBuiltInResource
(String name) Returns the built-in resource matching the given name.Returns a defaultIExtractor
associated with the current factory.Returns a defaultIInjector
associated with the current factory.Returns the Metametamodel.org.eclipse.emf.ecore.resource.ResourceSet
newModel
(EMFReferenceModel referenceModel, String uri) Creates a newEMFModel
using the given uri.newModel
(IReferenceModel referenceModel) Creates a newIModel
using default options and conforming to the givenIReferenceModel
.newModel
(IReferenceModel referenceModel, Map<String, Object> options) Creates a newIModel
using specified options and conforming to the givenIReferenceModel
.Creates a newIReferenceModel
using default options.newReferenceModel
(Map<String, Object> options) Creates a newIReferenceModel
using 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 newEMFModelFactory
and initialize theResourceSet
.
-
-
Method Details
-
getMetametamodel
Returns the Metametamodel.- Specified by:
getMetametamodel
in classModelFactory
- Returns:
- the Metametamodel
- See Also:
-
newReferenceModel
Creates a newIReferenceModel
using specified options.- Specified by:
newReferenceModel
in classModelFactory
- Parameters:
options
- the creation options- Returns:
- a new
IReferenceModel
- See Also:
-
newReferenceModel
Creates a newIReferenceModel
using default options.- Specified by:
newReferenceModel
in classModelFactory
- Returns:
- a new
IReferenceModel
- See Also:
-
newModel
Creates a newIModel
using specified options and conforming to the givenIReferenceModel
.- Specified by:
newModel
in classModelFactory
- Parameters:
referenceModel
- theIReferenceModel
options
- the creation options- Returns:
- a new
IModel
- See Also:
-
newModel
Creates a newIModel
using default options and conforming to the givenIReferenceModel
.- Specified by:
newModel
in classModelFactory
- Parameters:
referenceModel
- theIReferenceModel
- Returns:
- a new
IModel
- See Also:
-
newModel
Creates a newEMFModel
using the given uri.- Parameters:
referenceModel
- theIReferenceModel
uri
- the model uri- Returns:
- a new
IModel
-
getDefaultExtractorName
Returns a defaultIExtractor
associated with the current factory.- Specified by:
getDefaultExtractorName
in classModelFactory
- Returns:
- the default
IExtractor
- See Also:
-
getDefaultInjectorName
Returns a defaultIInjector
associated with the current factory.- Specified by:
getDefaultInjectorName
in 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:
getBuiltInResource
in 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.
-