|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.engine.ModelProcessor
public class ModelProcessor
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.
| Method Summary | |
|---|---|
protected void |
filterAndSortValidationMessages(java.util.List messages,
Filters constraints)
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. |
void |
initialize(Configuration configuration)
Initializes this model processor instance with the given configuration. |
protected java.util.List |
loadModelIfNecessary(Model model)
Loads the model into the repository only when necessary (the model has a timestamp later than the last timestamp of the loaded model). |
static ModelProcessor |
newInstance()
Creates a new instance the ModelProcessor. |
protected void |
printConsoleHeader()
Prints the console header. |
ModelValidationMessage[] |
process(Configuration configuration)
Re-configures this model processor from the given configuration
instance (if different from that of the one passed in during the call to
initialize(Configuration)), and runs the model processor. |
void |
setCartridgeFilter(java.lang.String namespaces)
Sets the current cartridge filter. |
void |
setFailOnValidationErrors(boolean failOnValidationErrors)
Sets whether or not processing should fail when validation errors occur, default is true. |
void |
setLoggingConfigurationUri(java.lang.String loggingConfigurationUri)
Sets the loggingConfigurationUri for AndroMDA. |
void |
setModelValidation(boolean modelValidation)
Sets whether or not model validation should occur. |
void |
setOutputEncoding(java.lang.String outputEncoding)
Sets the encoding (UTF-8, ISO-8859-1, etc) for all output produced during model processing. |
void |
setXmlValidation(boolean xmlValidation)
Sets xmlValidation to be true/false. |
protected boolean |
shouldProcess(java.lang.String namespace)
Indicates whether or not the namespace should be processed. |
void |
shutdown()
Shuts down the model processor (reclaims any resources). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ModelProcessor newInstance()
public ModelValidationMessage[] process(Configuration configuration)
configuration
instance (if different from that of the one passed in during the call to
initialize(Configuration)), and runs the model processor.
configuration - the configuration from which to configure this model
processor instance.
public void initialize(Configuration configuration)
process(Configuration)
configuration - the configuration instance by which to initialize this
model processor instance.protected final java.util.List loadModelIfNecessary(Model model)
model - the model to be loaded.protected void printConsoleHeader()
public void setModelValidation(boolean modelValidation)
true.
modelValidation - true/false on whether model validation should be performed or not.public void setFailOnValidationErrors(boolean failOnValidationErrors)
true.
failOnValidationErrors - whether or not processing should fail if any validation errors are present.protected boolean shouldProcess(java.lang.String namespace)
namespace should be processed. This is determined in conjunction with
setCartridgeFilter(String). If the cartridgeFilter is not defined and the namespace is
present within the configuration, then this method will ALWAYS return true.
namespace - the name of the namespace to check whether or not it should be processed.
public void setCartridgeFilter(java.lang.String namespaces)
namespaces - a comma seperated list of the cartridge namespaces to be processed.public void setOutputEncoding(java.lang.String outputEncoding)
outputEncoding - the encoding.public void setXmlValidation(boolean xmlValidation)
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.
xmlValidation - true/false on whether we should validate XML resources used by AndroMDApublic void setLoggingConfigurationUri(java.lang.String loggingConfigurationUri)
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.commonpackage, customize
it, and then specify the location of this logging file with this operation.
loggingConfigurationUri - the URI to the external logging configuation file.public void shutdown()
protected void filterAndSortValidationMessages(java.util.List messages,
Filters constraints)
messages first by type (i.e. the metafacade class)
and then by the name of the model element to which the validation message applies.
messages - the collection of messages to sort.constraints - any constraint filters to apply to the validation messages.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||