com.sodius.mdw.core.model.io
Interface ModelWriter

All Known Implementing Classes:
EMFModelWriter, EMFXMIModelWriter, EMFXMLModelWriter

public interface ModelWriter

Base interface to be implemented by a connector that write models.

The implementation class specified by the connector descriptor must :

If you intent to write XML documents, the framework provides facilities you should consider.

Clients may implement this interface.

See Also:
XMLWriter

Method Summary
 void write(String uri, Model model, ConnectorContext context)
          Writes a model to the specified uri (resource locator).
 

Method Detail

write

void write(String uri,
           Model model,
           ConnectorContext context)
           throws CoreException
Writes a model to the specified uri (resource locator).

The uri denotes a resource location to handle. The form of the uri depends on the connector kind. If this is a file connector, this uri is expected to be a valid file path. If this is a "no uri" connector, this uri is expected to be null or an empty String.

The specified model contains model elements to be persisted. Model elements can be retrieved from the model using getInstances methods.

The context can be used to access a variery of properties and is to be used to check for cancellation.

Parameters:
uri - the location of a resource to write (can be null).
model - the model to be persisted.
context - the context in which this writer runs.
Throws:
CoreException - if anything prevents the connector to write the model.
See Also:
ConnectorDescriptor.getKind()