com.sodius.mdw.core.model.emf
Class EMFXMIModelWriter
java.lang.Object
com.sodius.mdw.core.model.emf.EMFModelWriter
com.sodius.mdw.core.model.emf.EMFXMIModelWriter
- All Implemented Interfaces:
- ModelWriter
public class EMFXMIModelWriter
- extends EMFModelWriter
Default EMF based implementation to handle XMI uris.
This implementation is able to deal with XMI versions from 1.0 to 2.1.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_XMI_VERSION
public static final String PROPERTY_XMI_VERSION
- Name of the property that specifies the expected XMI version.
This property is mandatory.
- See Also:
- Constant Field Values
EMFXMIModelWriter
public EMFXMIModelWriter()
createResource
protected Resource createResource(URI uri,
ConnectorContext context)
- This implementation creates a resource to handle XMI based on the XMI version specified
in the connector descriptor properties.
This method fails if the XMI version property is not set.
- Specified by:
createResource in class EMFModelWriter
- Parameters:
uri - the URI to write.context - the context in which the connector runs
- Returns:
- the created resource.
- See Also:
PROPERTY_XMI_VERSION
createOptions
protected Map<String,Object> createOptions(ConnectorContext context)
- Registers UTF-8 as the default encoding to use.
- Overrides:
createOptions in class EMFModelWriter
- Parameters:
context - the context in which the connector runs
- Returns:
- the options to pass to the resource.