com.sodius.mdw.core.model.diagram
Interface DiagramProvider


public interface DiagramProvider

Provides diagram images related to a model element.

A ModelReader can support diagrams by subclassing this interface. The subclass must be referenced in the metamodels.xml or connectors.xml file using the property PROPERTY_DIAGRAM_PROVIDER.

Please note that many model readers won't be able to support diagrams (XMI reader for example). To support diagrams, a model reader should generally have a live connection with a CASE tool, through COM APIs for example, to be able to dynamically retrieve images.

Clients may implement this interface.

Since:
2.1.0
See Also:
ModelReader, ConnectorDescriptor.PROPERTY_DIAGRAM_PROVIDER

Method Summary
 DiagramImage getDiagram(MDWObject object, DiagramOptions options, ConnectorContext context)
          Get the diagram image for a specific model element.
 

Method Detail

getDiagram

DiagramImage getDiagram(MDWObject object,
                        DiagramOptions options,
                        ConnectorContext context)
                        throws CoreException
Get the diagram image for a specific model element.

Once the returned DiagramImage is not used anymore, client should invoke DiagramImage.dispose().

Parameters:
object - a model element which is a logical diagram, or which has an attached diagram.
options - some options used to retrieve the diagram image (may be null).
context - the context used by the ModelReader to load the model.
Returns:
the diagram image.
Throws:
CoreException - if no diagram image could be retrieved.