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
ConstructorsConstructorDescriptionBaseModel2(ModelFramework framework, BoundParameters frameworkParameters, BoundParameters boundParameters, List<? extends ModelParameter> modelParameters) -
Method Summary
Modifier and TypeMethodDescriptionReturns the parameters used by theModelFrameworkto 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, waitMethods 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:ModelProduces an executable pipeline that will 'run' the model and produce results.
- Specified by:
realizein interfaceModel- Returns:
- a
RealizedPipelinethat can be executed, or a list of Problems that occurred during realization.
-
getFramework
- Specified by:
getFrameworkin interfaceModel- Returns:
- what sort of
ModelFrameworkwas used to build this model.
-
getFrameworkParameters
Description copied from interface:ModelReturns 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.- Specified by:
getFrameworkParametersin interfaceModel
-
getBoundParameters
- Specified by:
getBoundParametersin 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:ModelReturns the model's parameters. A
ModelParametercontains more detailed metadata about a model's parameter compared to a regularParameter- Specified by:
getModelParametersin interfaceModel
-