public class JCleanCim
extends java.lang.Object
Most of configuration currently needs to be specified in ./config/ "config.properties" file. Command line arguments allow you to:
We use apache command line argument library here as it gives nice help :-) If we need more configuration/filtering, best would be to do that in ./config/ "config.properties" file and not with command line options (we could end up in a mess of what is defined on cmd line, and what in properties file).
Implementation note: To add new command line arguments, follow examples in the constructor. To
add functionality for validation, statistics, profile crosschek and doc generation (from UML or
from profiles), implement methods on UmlModel
class and call them from
validate(UmlModel)
, collectStatistics(UmlModel)
,
crossCheck(UmlModel, UmlModel)
and generateDoc(UmlModel)
methods, respectively.
Modifier and Type | Method and Description |
---|---|
UmlModel |
buildFromEA()
Builds the model from EA file given in configuration or on command line.
|
UmlModel |
buildFromProfiles()
Builds the model from all profiles found under the /input/profiles directory.
|
void |
collectStatistics(UmlModel model)
Collects statistics for the model and logs them.
|
UmlModel |
createEmptyModel()
Creates empty model.
|
void |
crossCheck(UmlModel profilesModel,
UmlModel umlModel)
Performs cross-check between the set of profiles and the UML model.
|
void |
generateDoc(UmlModel model)
Generates documentation for the model in the format specified in configuration through output
file extension.
|
static void |
main(java.lang.String[] args)
This command-line application first populates its model from full .eap file and/or profiles
(to allow for different kinds of analysis afterwards), then selectively runs validation,
statistics, profile-model cross-checking and MS Word document generation.
|
void |
validate(UmlModel model)
Validates the model.
|
public static void main(java.lang.String[] args) throws ApplicationException, java.io.IOException
-propFile
command line option).
usage: jCleanCim -help print this message -version print application version -modelFile <*.eap> name of the model file to use instead of one defined in config properties -propFile <*.properties> name of the config properties file to use instead of default
ApplicationException
java.io.IOException
public UmlModel buildFromEA() throws ApplicationException
ApplicationException
public UmlModel buildFromProfiles() throws ApplicationException
ApplicationException
public UmlModel createEmptyModel() throws ApplicationException
ApplicationException
public void validate(UmlModel model)
model
- public void collectStatistics(UmlModel model)
model
- public void crossCheck(UmlModel profilesModel, UmlModel umlModel)
profilesModel
- umlModel
- public void generateDoc(UmlModel model) throws ApplicationException, java.io.IOException
UnsupportedOutputFormatException
- if the requested format (extension) of the output file is not supported.java.io.IOException
- on any file system-related problem.ApplicationException
Copyright 2009-2016 Tatjana (Tanja) Kostic