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 end of 2015 it has 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 also to non-CIMug members, since 2016, I decided to share it as a full open source tool and host it at my web space.
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).
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
- 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). |
|
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]-src.zip | Run jCleanCim from the console (cmd.exe) or from within eclipse.
Develop and build it with Apache ant or with eclipse. |
|
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 we talk 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=db
or model.builder=sqlxml
in 01v08, or model.useSql=true
in 01v07
(which you should, because they are orders of magnitude faster), 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 (we have seen this already with attributes order before). When
using API, we just follow the order of elements as returned by the EA API. However, when
processing SQL query results or reading the tables directly, we may find those position
indexes totally 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:
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.
This software has been developed in my free time. The contained IP is not related in any way to my previous or current employer.
Since 2016, jCleanCim has new home at my web space - which is accessible also to non-CIMug members.
Credit: Prototype by Laurent Guise (thanks!) has inspired the implementation in this release.
This (by IEC 61850 community) long awaited feature is in and it is controlled by a new
configuration option,
docgen.word.useHyperlinks
. To not incure performance penalty, the default is 'disabled' (i.e., you need to set it to
true
explicitly .
The hyperlinks are introduced for those classes and enumeration literals that have been printed in the same document. For example:
In this release, we have added three new placeholders for MS Word document generation:
startUmlClass.{packageName.className}.endUml
: This was on request by IEC
61850 community, but is generally useful if you want to quickly print a couple of classes
only. You don't need to modify the UML model (to put them into a package) only to be able to
print them. However, please do not misuse the feature to end up with a proliferation of
individual class placeholders (it is always wiser and better maintainable to mainly include
full packages).startUmlDiagNote{packageName}.{diagramName}.endUml
: We added this for a
custom document generation, where we want to have a table with two columns: diagram in one
column, its description in the other. Feature is now available, so you can experiment with
your own layouts if you need.We have also added examples in the base-small-template.docx to show how to use the new placeholders.
In more recent versions of EA, on XMI import, EA refuses to import the original class with stereotype "enumeration", but transforms it automatically to the new Enumeration type. We found no way to force EA to keep enumeration stereotype imported through XMI. The result was that the enumeration classes were then not recognised in jCleanCim as enumerated types and one had to manually add enumeration stereotype.
This release provides proper handling for this case, as well - i.e., the EA Enumeration type is now recognised as enumerated type, the same way as a class with "enumeration" stereotype.
None. Note however that newer versions of Enterprise Architect seem to always be somewhat slower than the older ones (we noticed the slow down in diagram generation).
docgen.word.printHtml
has been renamed to docgen.printHtml
, incidating that this choice is not anymore
limited to MS Word. By default, the value remains false
, which means no change
for MS Word output, but change for Web Access XML output (now printing raw text instead of
markup). Note: Enabling markup for MS Word still does NOT work properly (and probably
never will), so it is wise to stay with the default.
startUmlIec61850NsName.{className}.endUml
to allow correct printing of derived IEC 61850 name space name. Word API didn't behave as
expected. If there are no separator between placeholders, it doesn’t recognise a
placeholder, so we either miss a piece of information or need to introduce the space
character between e.g. '2007' and 'B'. This is not to be acceptable for namespace.name, so
this new placeholder is the clean resolution for the issue.
Built on 2016-07-23T22:39:05