com.sodius.mdw.core.model.emf
Class EMFXMIModelReader

java.lang.Object
  extended by com.sodius.mdw.core.model.emf.EMFModelReader
      extended by com.sodius.mdw.core.model.emf.EMFXMIModelReader
All Implemented Interfaces:
ModelReader

public class EMFXMIModelReader
extends EMFModelReader

Default EMF based implementation to handle XMI uris. This implementation is able to deal with XMI versions from 1.0 to 2.1.


Field Summary
 
Fields inherited from class com.sodius.mdw.core.model.emf.EMFModelReader
MDW_CONNECTOR_CONTEXT, OPTION_DISABLE_AUTO_RESOLVE_PROXIES
 
Constructor Summary
EMFXMIModelReader()
           
 
Method Summary
protected  Map<String,Object> createOptions(ConnectorContext context)
          Sets default XMI options.
protected  Resource createResource(URI uri, ConnectorContext context)
          This implementation reads the XMI header and creates a resource that can handle the XMI version found.
protected  Resource createXMIResource(URI uri, ConnectorContext context, XMIHeader header)
          Creates a resource that can handle the XMI version found
 
Methods inherited from class com.sodius.mdw.core.model.emf.EMFModelReader
createResourceSet, logError, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EMFXMIModelReader

public EMFXMIModelReader()
Method Detail

createResource

protected Resource createResource(URI uri,
                                  ConnectorContext context)
This implementation reads the XMI header and creates a resource that can handle the XMI version found.

Specified by:
createResource in class EMFModelReader
Parameters:
uri - the URI to load.
context - the context in which the connector runs
Returns:
the created resource.

createXMIResource

protected Resource createXMIResource(URI uri,
                                     ConnectorContext context,
                                     XMIHeader header)
Creates a resource that can handle the XMI version found


createOptions

protected Map<String,Object> createOptions(ConnectorContext context)
Sets default XMI options.

Overrides:
createOptions in class EMFModelReader
Parameters:
context - the context in which the connector runs
Returns:
the options to pass to the resource.