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 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.3.0
Check out the “Introduction to jCleanCim” presentation. It is available in both PDF and PPT formats.
Once you unzip a jCleanCim distribution, 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/jCleanCim-[_version_].pdf
(source distribution contains the Apache ant build script to produce this document, so it is not packaged in source distributions).doc/testReport/index.html
. For most users this is not really of interest (but keeps our developer spirit in peace :-).jCleanCim is available in two distributions, depending on how you want to use it.
Even if you have a 64-bit Windows OS, ensure you install a 32-bit Java (JRE: runtime) or SDK (software development kit) and have it appear on your PATH before the potentially already installed 64-bit Java, because Enterprise Architect is still a 32-bit application and requires a 32-bit Java. See the commented text in the run.bat script.
Distribution | User Kind | Prerequisites | Installing |
---|---|---|---|
Binary distribution jCleanCim-[version]-bin.zip | Run jCleanCim from the console (cmd.exe). | <ul><li>32-bit Java 7+ runtime (JRE). To verify whether you already have it installed, open the console window and type java -version <li>Enterprise Architect build 834+ (version 7.1+)<li>(optional: to run doc generation) MS Word 2003+</ul> |
Unzip the distribution anywhere on your file system; it will uncompress in its own directory tagged with the version so there is no danger of overwriting an older installation. For example, using WinZip, select “Extract to here” command. |
Source distribution jCleanCim-[version]-bin.zip | Run jCleanCim from the console (cmd.exe) or from within eclipse. Develop and build it with Apache ant or with eclipse. |
<ul><li>32-bit Java 7+ software development kit (SDK). To verify whether you already have it installed, open the console window and type javac -version <li>Something to compile the code and create executable, e.g.:<ul><li>Apache ant 1.7.1+. To verify whether you already have it installed, open the console window and type ant -version .<li>or an IDE if you are already a Java developer.</ul><li>Enterprise Architect build 834+ (version 7.1+)<li>(optional, runtime: to run doc generation) MS Word 2003+<li>(optional, during ant build: to build javadoc with UML for any distribution, and to document ant build targets dependencies graph) GraphViz application. To verify whether you already have it installed, open the console window and type dot -version </ul> |
Same as for binary distribution (jCleanCim-[version]-bin.zip). If used with eclipse, start eclipse SDK and after unzipping, 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): Ant build file contains targets that invoke GraphViz application for creation of graphical elements for the documentation (UML-enhanced javadoc, and javadoc in pdf format). If you do not have GraphViz installed on your local system, these targets will be just skipped during the build (even if you get exceptions from the doclet, the javadoc gets generated, just without the UML diagrams). However, if you want to produce jCleanCim distributions, you should install GraphViz in order to have nicer documentation.
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:
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:
model.useSql = true
, in that release only). Since release 01v08, 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 items thay may be considered as issues (but will likely not be addressed soon) and performance-related advice, so please take them into account when running jCleanCim:
model.builder=db
as the fastest way; notice that no digrams can ever get exported with 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.model.builder=japi
for reading from EA file:
This should run correctly only on an English version of MS Office. Reason: We create MS Word documents primarily for IEC, and these need to be in English. We have tried hard, but it is literally impossible to have implementation portable among different language versions of MS Word.
Note that caption labels and styles are notoriously non-portable among installations of MS Word (same user - 2 computers; different users on the same computer; different installation languages). Caption labels are said to be contained in the user’s Normal.dotm template, see here, but not really so, see here. Additionally, it seems that MS Word sometimes decides and changes things on its own, which affects the global template and/or registry in a way nobody sees it (and every document you’ll edit). For example, if you happen to somehow get language for captions changed, see for example Word is in English but �Figure?, �Equation? and �Table? appear in Spanish. jCleanCim does NOT want to modify any user-specific installation of MS Word ! You may need to add by yourself into your Word installation what is missing and what you would like to see printed (e.g., caption label in English if you have German MS Word).
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, once you have unpacked the release into your local directory, this link to the javadoc documentation should work: Config. You can access the same page from your installation subdirectory doc/api/index.html, by selecting from the class list the class Config
.
Starting with release 02v00, 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.
Built on 2019-12-20T22:05:24