Package nz.org.riskscape.engine.model
Class BaseModel2
java.lang.Object
nz.org.riskscape.engine.model.BaseModel2
- All Implemented Interfaces:
Model
The base Model2 implementation. (This is basically just some lombok boilerplate that all models need, but it reduces clutter in the sub-class implementations)
-
Constructor Summary
ConstructorDescriptionBaseModel2
(ModelFramework framework, BoundParameters frameworkParameters, BoundParameters boundParameters, List<? extends ModelParameter> modelParameters) -
Method Summary
Modifier and TypeMethodDescriptionReturns the parameters used by theModelFramework
to build this model (e.g.List<? extends ModelParameter>
Returns the model's parameters.abstract ResultOrProblems<RealizedPipeline>
realize
(ExecutionContext context) Produces an executable pipeline that will 'run' the model and produce results.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.model.Model
getModelParameter
-
Constructor Details
-
BaseModel2
public BaseModel2(ModelFramework framework, BoundParameters frameworkParameters, BoundParameters boundParameters, List<? extends ModelParameter> modelParameters)
-
-
Method Details
-
realize
Description copied from interface:Model
Produces an executable pipeline that will 'run' the model and produce results.
- Specified by:
realize
in interfaceModel
- Returns:
- a
RealizedPipeline
that can be executed, or a list of Problems that occurred during realization.
-
getFramework
- Specified by:
getFramework
in interfaceModel
- Returns:
- what sort of
ModelFramework
was used to build this model.
-
getFrameworkParameters
Description copied from interface:Model
Returns the parameters used by the
ModelFramework
to 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.- Specified by:
getFrameworkParameters
in interfaceModel
-
getBoundParameters
- Specified by:
getBoundParameters
in interfaceModel
- 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.
-
getModelParameters
Description copied from interface:Model
Returns the model's parameters. A
ModelParameter
contains more detailed metadata about a model's parameter compared to a regularParameter
- Specified by:
getModelParameters
in interfaceModel
-