Innovator 16.1 Java API

This is the official Innovator Java API documentation describing the overall structure and usage of the object model.

Requirements

  • Java Development Kit 21 or higher (available at http://www.oracle.com/)
  • Innovator Java API binaries inojapi.jar

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 21, 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 $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<ELElement> sel = new ArrayList<ELElement>();
                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";
        }        
}
Package
Description
The package contains classes that are useful for working with different kinds of Innovator clients.
The package contains classes needed for the network communication via TCP/IP between Innovator network clients and servers.
All classes in this package are used for communicating with the Innovator repository server and license server.
The package contains classes for connecting to an Innovator model for manipulation and evaluation purposes.
Activity modeling emphasizes the sequence and conditions for coordinating lower-level behaviors, rather than which classifiers own those behaviors.
Diagrams and graphical representations for elements of the icw2ac package.
Package for Business Object Modeling.
The Common Behaviors package specifies the core concepts required for dynamic elements and provides the infrastructure to support more detailed definitions of behavior.
Package for Business Process Model and Notation (BPMN).
BPMN Diagrams and graphical representations for elements of the icw2bp package.
Business resource modeling package.
Diagrams and graphical representations for elements of the icw2br package.
State machine for Business Object Modeling.
Diagrams and graphical representations for elements of the icw2bs package.
The classes package deals with the basic modeling concepts of UML and, in particular, classes and their relationships.
Diagrams and graphical representations for elements of the icw2class package.
The DB package (specialization of the IM package) describes the concepts needed for modeling a relational database.
Database Diagrams and representations of tables and foreign keys, as well as views and from clauses.
The documentation package deals with the model documentation configuration and generation.
The purpose of DMN is to provide the constructs that are needed to model decisions, so that organizational decision-making can be readily depicted in diagrams, accurately defined by business analysts, and (optionally) automated.
The decision requirements level of a decision model in DMN consists of a Decision Requirement Graph depicted in one or more Decision Requirement Diagrams.
Describes the common behavior of all elements stored in a model server repository even configuration elements in profiles and schema elements of the meta model.
The ER package (specialization of the IM package) deals with the modeling concepts for the Entity Relationship Model and, in particular, entities, attributes and their relationships.
In addition it deals with the concepts of Online Analytical Processing (OLAP) to build a data warehouse for business intelligence (BI) matters.
Entity Relationship Diagrams and representations of entities and relationships, as well as conceptual views and from clauses.
Package for concept modeling.
Concept diagrams and graphical representations for elements of the icw2gc package.
The Interaction package describes the concepts needed to express interactions.
The IM package specify the Information Management Metamodel core concepts required for data modeling.
Information Management Metamodel Diagram is a subclass of Class Diagram.
Meta model and administration information.
This packagage contains elements representing the logical model.
Diagrams and graphical representations of model elements in diagrams.
The StateMachine package defines a set of concepts that can be used for modeling discrete behavior through finite statetransition systems.
Diagrams and graphical representations for elements of the icw2sm package.
Diagrams and graphical representations for elements of the icw2ia package.
Utilities for the cooperation of Innovator components and programs.
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.
The package contains some useful utilities for Innovator API applications.