| java.lang.Object org.andromda.core.engine.ModelProcessor
ModelProcessor | public class ModelProcessor (Code) | |
Handles the processing of models. Facilitates Model Driven
Architecture by enabling the generation of source code, configuration files, and other such artifacts from a single
or multiple models.
author: Chad Brandon |
filterAndSortValidationMessages | protected void filterAndSortValidationMessages(List messages, Filters constraints)(Code) | | Filters out any messages that should not be applied according to the AndroMDA configuration's
constraints and sorts the resulting messages first by type (i.e. the metafacade class)
and then by the name of the model element to which the validation message applies.
Parameters: messages - the collection of messages to sort. Parameters: constraints - any constraint filters to apply to the validation messages. |
initialize | public void initialize(Configuration configuration)(Code) | | Initializes this model processor instance with the given
configuration. This configuration information is overridden (if changed)
when calling
ModelProcessor.process(Configuration) Parameters: configuration - the configuration instance by which to initialize thismodel processor instance. |
loadIfNecessary | final List loadIfNecessary(org.andromda.core.configuration.Repository[] repositories)(Code) | | Checks to see if any of the repositories contain models
that need to be reloaded, and if so, re-loads them.
Parameters: repositories - the repositories from which to load the model(s). |
loadModelIfNecessary | final protected List loadModelIfNecessary(Model model)(Code) | | Loads the model into the repository only when necessary (the model has a timestamp
later than the last timestamp of the loaded model).
Parameters: model - the model to be loaded. |
newInstance | public static ModelProcessor newInstance()(Code) | | Creates a new instance the ModelProcessor.
the shared ModelProcessor instance. |
printConsoleHeader | protected void printConsoleHeader()(Code) | | Prints the console header.
|
process | public ModelValidationMessage[] process(Configuration configuration)(Code) | | Re-configures this model processor from the given configuration
instance (if different from that of the one passed in during the call to
ModelProcessor.initialize(Configuration) ), and runs the model processor.
Parameters: configuration - the configuration from which to configure this modelprocessor instance. any model validation messages collected during model processing (ifmodel validation is enabled). |
setCartridgeFilter | public void setCartridgeFilter(String namespaces)(Code) | |
Sets the current cartridge filter. This is a comma seperated list of namespaces (matching cartridges names) that
should be processed.
If this filter is defined, then any cartridge names found in this list will be processed , while
any other discovered cartridges will not be processed .
Parameters: namespaces - a comma seperated list of the cartridge namespaces to be processed. |
setFailOnValidationErrors | public void setFailOnValidationErrors(boolean failOnValidationErrors)(Code) | | Sets whether or not processing should fail when validation errors occur, default is true .
Parameters: failOnValidationErrors - whether or not processing should fail if any validation errors are present. |
setLoggingConfigurationUri | public void setLoggingConfigurationUri(String loggingConfigurationUri)(Code) | |
Sets the loggingConfigurationUri for AndroMDA. This is the URI to an external logging configuration
file. This is useful when you want to override the default logging configuration of AndroMDA.
You can retrieve the default log4j.xml contained within the
org.andromda.core.common package, customize
it, and then specify the location of this logging file with this operation.
Parameters: loggingConfigurationUri - the URI to the external logging configuation file. |
setModelValidation | public void setModelValidation(boolean modelValidation)(Code) | | Sets whether or not model validation should occur. This is useful for
performance reasons (i.e. if you have a large model it can significatly descrease the amount of time it takes for
AndroMDA to process a model). By default this is set to true .
Parameters: modelValidation - true/false on whether model validation should be performed or not. |
setOutputEncoding | public void setOutputEncoding(String outputEncoding)(Code) | | Sets the encoding (UTF-8, ISO-8859-1, etc) for all output
produced during model processing.
Parameters: outputEncoding - the encoding. |
setXmlValidation | public void setXmlValidation(boolean xmlValidation)(Code) | | Sets xmlValidation to be true/false. This defines whether XML resources loaded by AndroMDA (such as
plugin descriptors) should be validated. Sometimes underlying parsers don't support XML Schema validation and in
that case, we want to be able to turn it off.
Parameters: xmlValidation - true/false on whether we should validate XML resources used by AndroMDA |
shouldProcess | protected boolean shouldProcess(String namespace)(Code) | | Indicates whether or not the namespace should be processed. This is determined in conjunction with
ModelProcessor.setCartridgeFilter(String) . If the cartridgeFilter is not defined and the namespace is
present within the configuration, then this method will ALWAYS return true.
Parameters: namespace - the name of the namespace to check whether or not it should be processed. true/false on whether or not it should be processed. |
shutdown | public void shutdown()(Code) | | Shuts down the model processor (reclaims any
resources).
|
|
|