jCleanCim is an open source tool for validation and documentation generation from Enterprise Architect UML models of IEC TC57 CIM and IEC61850 UML models.
Up until the end of 2015 it had been hosted by the CIM Methods & Tools for Enterprise Integration group on the CIM Users Group web site, with access limited to the CIM and IEC61850 users community members only. To make it accessible to non-CIMug members, in 2016 it was transitioned to a fully open source tool and hosted at Tanja’s web space.
In November of 2022, with Tanja Kostic’s approval, jCleanCim was officially migrated here as part of the CIMug’s Open Source Initiatives effort.
This is a non-GUI Java application and the Java code is fully platform independent. However, it unfortunately must be run on an MS Windows machine due to the usage of Enterprise Architect and MS Word automation libraries (.dlls).
For a full history of all release notes see here.
2.4.0
Check out the “Introduction to jCleanCim” presentation. It is available in both PDF and PPT formats.
Once you unzip a jCleanCim distribution, the doc directory contains the full documentation. The important parts of the source code are documented and that documentation is generated as so-called javadoc - namely, a set of web pages that allow for easy navigation.
doc/jCleanCimIntro.pptx (doc/jCleanCimIntro.pdf) - you may want to start from there.doc/api/index.html. The documentation of the root package org.tanjakostic.jcleancim (Description section) is a good starting point.doc/testReport/index.html. For most users this is not really of interest (but keeps our developer spirit in peace :-).jCleanCim 2.4.0 ships as two distributions: binary and source. That is the only distribution split — there is no separate 32-bit or 64-bit download. Both require Java 17 or later; which bitness of Java you install depends on the Enterprise Architect project file you are reading.
Support for Java 17+ was introduced in jCleanCim 2.4.0.
| Your EA project file | Enterprise Architect | Binary distribution needs | Source distribution needs |
|---|---|---|---|
.eap(x) |
15.x and earlier (32-bit) | 32- or 64-bit Java 17+ JRE | 32- or 64-bit Java 17+ JDK |
.qea(x) |
16.0+ (64-bit) | 64-bit Java 17+ JRE only | 64-bit Java 17+ JDK only |
A 64-bit Java installation is recommended. It generates documentation from both
.eap(x) and .qea(x) project files, so it is the only choice that works across
every project you are likely to encounter.
On 32-bit Java availability. If you specifically need a 32-bit runtime for the legacy
.eap(x)path, note that most current OpenJDK vendors have wound down 32-bit Windows builds: Eclipse Temurin publishes x86-32 Windows binaries through JDK 17 but not for JDK 21 or later. This constrains a 32-bit installation to the JDK 17 line, which satisfies jCleanCim’s Java 17+ floor. It is another reason to prefer 64-bit where your EA version allows.
To verify what you already have, open the console window and type java -version
(runtime) or javac -version (development kit).
Archive: jCleanCim-[version]-bin.zip
Intended use. Run jCleanCim from the console (cmd.exe). For the jCleanCim end-user.
Prerequisites
Installing
Unzip the distribution anywhere on your file system; it will uncompress into its own directory tagged with the version, so there is no danger of overwriting an older installation. Any archive tool will do — right-click the .zip in Windows Explorer and choose “Extract All”, or use the equivalent command in 7-Zip or WinZip.
Archive: jCleanCim-[version]-src.zip
Intended use. Run jCleanCim from the console (cmd.exe) or from within Eclipse. Develop and build it with Apache Ant or with Eclipse. For the jCleanCim developer, packager, and end-user.
Prerequisites — required
ant -version.If you are already developing in Java with Eclipse, you have what you need. If your only Eclipse is the runtime bundled with CIMTool, that is not sufficient — it is a runtime without Java code development support. On the Eclipse download site, the minimum required distribution is “Eclipse IDE for Java Developers”; you can then install the CIMTool plug-in into that (or a more recent) Eclipse.
Prerequisites — optional, at runtime
Prerequisites — optional, during the Ant build
dot -V. If Graphviz is not
installed, the target that depends on it is skipped and the rest of the build is
unaffected; only that one diagram is missing.Graphviz is the only external install needed for the build. The other build-time
tools — JUnit 4 and Grand — are bundled in the source
distribution’s lib directory and require no separate download; see
Dependencies.
Installing
Same as for the binary distribution (jCleanCim-[version]-bin.zip).
The source distribution contains the Eclipse project files. To use it with Eclipse, then after unzipping, start Eclipse and use Import -> Existing project and browse to the unzipped directory.
Note: This is the most flexible option if you are developing, as you can have the Eclipse project anywhere on your disk (not necessarily in an Eclipse workspace).
Note for source distribution (and if you need to create the distribution yourself): the Ant build file contains a target that invokes the GraphViz application to render the build target dependency graph as a PDF. If you do not have GraphViz installed on your local system, that target is simply skipped during the build. If you want to produce jCleanCim distributions complete with that diagram, install GraphViz.
To be self-contained, jCleanCim distributions bundle relevant third party open source/distributable libraries. Java jars are in the project’s lib directory, and MS Windows dlls are in the dlls directory.
The following libraries are packaged with all the distributions of jCleanCim:
.eap(x) or .qea(x) project file), before any XMI or other artefact generation takes place..eap/.eapx files are MS Access databases, read with the Jackcess library..qea/.qeax files are SQLite databases, read with the SQLite JDBC driver. This was added in release 2.4.0 alongside Jackcess — it does not replace it, since both project file formats remain supported..docx) documents, we bundle Apache POI (poi-ooxml).The following libraries are packaged only with source distribution of jCleanCim:
Since jCleanCim talks to EA and to MS Word through their automation APIs, the model building (as a first step in the application) and the MS Word document generation (if enabled) take time:
.eap(x), SQLite for .qea(x) (even for items in a collection!). Determinant factor for performance here are: number of elements (classes, attributes, …) and the number of diagrams that need to be saved to file. In release 1.7.0, we had provided a fully new implementation for reading the UML model from EA (with option model.useSql = true, in that release only). Since release 1.8.0, we added one more implementation (see Fast loading of .eap file) and replaced the model.useSql boolean option with the one taking one of three pre-defined string values. In short, if you need to export XMI for a model release, or diagrams for document generation, ensure you use model.builder=sqlxml, otherwise leave the option empty or set it to model.builder=db. See also hint on fixing ordering errors .docgen.saveReopenEvery that you should definitely use to speed up MS Word document generation . Default value is 12, but you should play with your document to find out whether higher value would make it faster. See also discussion on this option and its resulting performance improvement.Java processing - for validation, statistics calculation and documentation collection from in-memory model to pass to the actual writer (s), as well as XML document generation for web-access - takes a couple of seconds for all the models and scenarios tested.
Here are items that may be considered issues (but will likely not be addressed soon) and performance-related advice, so please take them into account when running jCleanCim:
If you run jCleanCim only to validate the model or generate XML or Word documents without diagrams, you should use model.builder=db as the fastest way; notice that no diagrams can be exported using this builder. With any other builder option, and when docgen.on=true, diagrams get exported from the EA model (in order to be used in the generated doc), while if docgen.on=false (or empty, or absent), document generation is disabled and we know that we don’t need diagrams, so they don’t get exported at all. Not exporting diagrams saves a lot of time: between 300-500 ms per normative diagram - for 100 normative diagrams, you save at least half a minute to read the model.
EA ordering errors. (since 1.8.0) In the initial, model building phase, you may see logged ERROR (+++ EA ordering error) for several UML elements (diagrams, packages, classes, etc.). This comes from the fact that EA internal storage for some reason does not always keep up to date the order of items in a container. When using API (very slow), we just follow the order of elements as returned by the EA API. However, when processing SQL query results (faster) or reading the tables directly (the fastest),those position indices may be uninitialised (that’s how they are stored in the repository). To ensure the order gets preserved, just open the model and manually move an item from the indicated list up and down - this should trigger the EA internal update mechanism - and then you’re set as the error should disappear on the next run.
model.builder=japi for reading from EA file:
If somebody finds a portable way without modifying user’s registry, please provide the code with test cases and I will integrate into baseline! Until then, if you are running non-English installation of MS Word, ensure you add custom caption labels in English (Figure, Table). If jCleanCim crashes and you are running a non-English installation of MS Word, it is most likely that you forgot to define for-your-language-non-native caption labels Figure and Table.
For an overview of all configuration options, unpack a release into your local directory and open doc/api/org/tanjakostic/jcleancim/common/Config.html. You can reach the same page from doc/api/index.html by selecting the class Config from the class list. The javadoc is generated at build time and ships inside each distribution, so it is not part of this site.
Starting with release 2.0.0, jCleanCim has been licensed under the terms of GNU LGPLv3 license and includes a modified copyright. The copyright as well as a reference to the license for this software is available at the download site, and is included in every distribution and in every java source file.
Have a look here for a relatively accessible comparison of licenses.