public interface ModelFactory
Model.
The factory design pattern is used here to allow various Model implementations, although it is expected that in most cases DefaultModelFactory in dragom-core will be adequate.
To provide a high degree of flexibility, initialization Properties are passed
to the getModel method. The caller (generally an ExecContextFactory
that is itself invoked by the initialization code of a tool) is free to provide
Properties as required, enabling the passing of initialization data from the
outside to the Model creation process.
A typical strategy is to provide a cascade of Properties initialized from various sources, such as a Properties file in the classpath, system Properties and user properties specified at tool invocation time. Such a strategy is implemented by Util.setupExecContext in dragom-core which many tools use. But ModelFactory implementations should not care about such a strategy. They should simply read properties from the provided initialization Properties.
| Modifier and Type | Method and Description |
|---|---|
Model |
getModel(Properties propertiesInit)
Returns a
Model. |
Model getModel(Properties propertiesInit)
Model.propertiesInit - Initialization properties.Copyright © 2015–2017 AZYVA INC.. All rights reserved.