Interface Model
- All Known Implementing Classes:
BaseModel2
Represents the new style of Riskscape model. A model fits into a predefined
framework that defines how it will behave. The user can then configure
parameters that customize how the model behaves. The underlying
data-processing work that the model actually carries out is achieved using a
Pipeline.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the parameters used by theModelFrameworkto build this model (e.g.default Optional<? extends ModelParameter>getModelParameter(String parameterName) List<? extends ModelParameter>Returns a view the model's bound parameters (e.g.realize(ExecutionContext context) Produces an executable pipeline that will 'run' the model and produce results.
-
Method Details
-
getFramework
ModelFramework getFramework()- Returns:
- what sort of
ModelFrameworkwas used to build this model.
-
getBoundParameters
BoundParameters getBoundParameters()- Returns:
- the configurable parameters that will be applied to the model when it is run. Note these parameters are subservient to the framework parameters that were used to create the model - change the framework parameters will likely result in a totally different set of model parameters.
-
getFrameworkParameters
BoundParameters getFrameworkParameters()Returns the parameters used by the
ModelFrameworkto build this model (e.g. "template = default"). These parameters are so central to the model that it doesn't really make sense to override them at all, once the user has defined them. -
getModelParameters
List<? extends ModelParameter> getModelParameters()Returns a view the model's bound parameters (e.g. the data in
getBoundParameters()), but asModelParameters, which contains more detailed metadata.This view of the data is typically used for building user interfaces and validation, whereas the boundParameters version is there as reference for what was bound, but they should both contain the same set of parameter names.
Thinking ahead, I suspect we might want to introduce a RealizedModel class, that is returned from
realize(ExecutionContext), and that version can return the model's parameters. -
getModelParameter
- Returns:
- the ModelParameter that matches the given name
-
realize
Produces an executable pipeline that will 'run' the model and produce results.
- Returns:
- a
RealizedPipelinethat can be executed, or a list of Problems that occurred during realization.
-