Innovator 13 Java API

This is the official Innovator Java API documentation initially released by MID GmbH in November 2005 describing the overall structure and usage of the object model.

See:
          Description

Client environment
de.mid.innovator.client The package contains classes that are useful for working with different kinds of Innovator clients.
de.mid.innovator.ui The classes in this package can be used to provide transparent user interfaces with a standard mechanism for supporting command line arguments or Java properties.

 

Server environment
de.mid.innovator.srv All classes in this package are used for communicating with the Innovator repository server and license server.
de.mid.innovator.srv.excellence  

 

Infrastructure
de.mid.innovator.srv2api.icw2meta Meta model and administration information.

 

Core
de.mid.innovator.srv2api.icw2elem  

 

BPMN
de.mid.innovator.srv2api.icw2bc  
de.mid.innovator.srv2api.icw2bp  
de.mid.innovator.srv2api.icw2br  
de.mid.innovator.srv2api.icw2bs  

 

UML
de.mid.innovator.srv2api.icw2ac Activity modeling emphasizes the sequence and conditions for coordinating lower-level behaviors, rather than which classifiers own those behaviors.
de.mid.innovator.srv2api.icw2be The Common Behaviors packages specify the core concepts required for dynamic elements and provides the infrastructure to support more detailed definitions of behavior.
de.mid.innovator.srv2api.icw2class The classes package deals with the basic modeling concepts of UML and, in particular, classes and their relationships.
de.mid.innovator.srv2api.icw2ia The Interaction package describes the concepts needed to express Interactions.
de.mid.innovator.srv2api.icw2model This packagage contains elements representing the logical model.
de.mid.innovator.srv2api.icw2sm The StateMachine package defines a set of concepts that can be used for modeling discrete behavior through finite statetransition systems.

 

BI
de.mid.innovator.srv2api.icw2db The DB package (spezialization of the IM package) describes the concepts needed for modeling a relational database.
de.mid.innovator.srv2api.icw2er The ER package (spezialization of the IM package) deals with the modeling concepts for the Entity Relationship Model and, in particular, entities, attributes and their relationships.
de.mid.innovator.srv2api.icw2im The IM package specify the Information Management Metamodel core concepts required for data modeling.

 

Concept
de.mid.innovator.srv2api.icw2gc  
de.mid.innovator.srv2api.icw2gcdia  

 

Presentation
de.mid.innovator.srv2api.icw2acdia  
de.mid.innovator.srv2api.icw2bpdia  
de.mid.innovator.srv2api.icw2brdia  
de.mid.innovator.srv2api.icw2bsdia  
de.mid.innovator.srv2api.icw2cldia  
de.mid.innovator.srv2api.icw2dbdia Database Diagramms and representations of tables and foreign keys, as well as views and from clauses.
de.mid.innovator.srv2api.icw2erdia Entity Relationship Diagramms and representations of entities and relationships, as well as conceptual views and from clauses.
de.mid.innovator.srv2api.icw2imdia Information Management Metamodel Diagramm is a subclass of Class Diagramm.
de.mid.innovator.srv2api.icw2pres Diagramms and grafical representations of model elements in diagramms.
de.mid.innovator.srv2api.icw2smdia  
de.mid.innovator.srv2api.icw2sqdia  

 

Documentation
de.mid.innovator.srv2api.icw2dg The documentation package deals with the model documentation configuration and generation.

 

Utilities
de.mid.innovator.net The package contains classes needed for the network communication via TCP/IP between Innovator network clients and servers.
de.mid.innovator.srv2api.icw2util  
de.mid.innovator.util  

 

This is the official Innovator Java API documentation initially released by MID GmbH in November 2005 describing the overall structure and usage of the object model.

Requirements

Overall Structure

Most parts of this API are generated according to model-driven architecture principals. This means that the structure of the interfaces primarily relies on the Innovator repository server's meta model. The API enables a Java application to work with Innovator components that can be reached via the TCP/IP network. This means that it supports, for example, a client interface to a running Innovator server or provides the ability to communicate to local Innovator client programs.

Some classes are coded by hand to ease the integration into the java runtime environment. Please refer to the package description to get information about using those classes. The API is designed for and implemented using Java 5, which provides the user with a lot of new features and advantages. Generics, in particular, enable type-safe calling of the interface methods and should reduce the need to use unsafe type casting.

The binaries of the API can be found under your Innovator installation path in the {INSTALL}/inodir/java/lib/ext directory. They are automatically added to your class path if you use the Innovator virtual machine launcher (inojava). Otherwise, you have to add this jar archive manually to your class path.

Interfaces and Implementer

There are several interfaces in the API structured in a package structure listed above. The structure and names of these interfaces represent an Innovator meta model entity. We have developed our model in such a way that it is easily understood by anyone familiar with UML. The Innovator meta model was designed similarly to the UML 2 specification using Innovator. An interface normally has an implementation that has to be chosen at creation time. The implementation classes are hidden to the user within the Innovator Java API because the real work is done by the server. That means every call to an interface method will result in a TCP/IP communication where the request is answered, for example, by the repository server; the result then automatically creates the implementer for the resulting interfaces. The implementers can be seen as proxy elements to the server side instances, that encapsulate the communication layer but do not contain any further useful information. This means that you should never need to program with implementation classes and, consequently, there is no description about those implementers in this documentation; in fact, they are not even mentioned, except in this paragraph.

The structure of interfaces and implementers, however, raises some problems and traps that you should be aware of:

  1. The Java instanceof operator should be handled with care. For example, if an API method returns a CLClassifier and you want to know which type of classifier you have, calling the result instanceof CLClass will always return false, because CLClass is an interface and the implementer of CLClass that is instantiated by the method call does not extend CLClass but implements CLClass. Consequently, you should always use the Java reflection method isAssignableFrom to check if a CLClassifier implementer also implements CLClass.
  2. An interface describes a list of instance methods, which means that any static method cannot be called using the interface. According to CORBA calls in Java, they can be called through helper classes. There are several helper classes in the Innovator Java API which contain all static methods to a corresponding interface. For example, the static methods to CLClass can be found in CLClassHelper.
  3. The creation of new instances cannot be performed by calling new but must be done with help of a static method named create, which also can be found in the corresponding helper class.

Quickstart

The easiest way to write a Java program that can be run from an Innovator client is to use the following code template. The example uses the base class InnovatorApplicationDefault for implementing the interface InnovatorApplication. In general, every Java application (class with a 'main' static method) can be configured to be executed from the Innovator clients. However, if you want to use a transparent way, either run a standalone application or you can extend the default application inside the Innovator context, if you prefer. This enables your program to react on standard global property values or use an existing Innovator environment to contact a repository.

The 'run' method is your starting point to navigate through an Innovator model. It can be accessed using, for example, the protected default application member variable 'model'. If you did start your application within Innovator client context, the java program will use the same login and model which is currently open in your Innovator model browser.

import java.util.ArrayList;
import java.util.List;

import de.mid.innovator.client.InoClientContext;
import de.mid.innovator.srv2api.icw2elem.ELElement;
import de.mid.innovator.ui.InnovatorApplication;
import de.mid.innovator.ui.InnovatorApplicationDefault;
import de.mid.innovator.ui.PropertyCfg;
import de.mid.innovator.util.InoNlsException;


public class Main extends InnovatorApplicationDefault implements InnovatorApplication {

        private static PropertyCfg[] argumentsCfg = new PropertyCfg[0];

        public static void main(String[] args) throws Exception {
                InnovatorApplicationDefault.create(Main.class, argumentsCfg, args);
        }
        public void run() throws InoNlsException {
                List sel = new ArrayList();
                if (InoClientContext.hasContext())
                        sel = InoClientContext.getInstance().getSelection();

                // TODO: code your program here
                // use instance variable 'model' or InoClientContext to start server queries            
        }

        public String Usage() {
                return "My own usage";
        }        
}