In this chapter we discuss the most powerful integration
mechanism provided by MetaEdit+: the API. API usage is described from both the
MetaEdit+ and client program point of view.
The main idea of an API is to provide users with a way to
access MetaEdit+ design data and functions from within their own applications.
The API interface in MetaEdit+ is implemented as a SOAP Web Service server.
Thus, an application interfacing with the MetaEdit+ API must implement a SOAP
client that takes care of establishing the connection and making calls to
MetaEdit+. As SOAP is a widely supported and open standard, there are many
frameworks already available that handle these aspects transparently. This makes
MetaEdit+ functions easily accessible with almost any programming language,
platform or environment.
What can you do with the API, then? Basically you can use
the API to access and change conceptual elements (Graphs, Objects,
Relationships, Roles, Properties and Ports) and representational elements
(diagrams, matrices, tables and their elements) within MetaEdit+. It is not
possible, however, to access or change metamodel elements. Also, because API
functions operate at a lower level than normal user-interface operations, and
with the API there is normally no possibility for feedback, functions that
create or modify data do not generally check that the data is legal according to
the current metamodel.
In addition to these data-centric functions, MetaEdit+
provides some additional features that can be accessed or controlled by the API,
like highlighting or animating diagram elements for simulation or tracing