Class BaseModel2

java.lang.Object
nz.org.riskscape.engine.model.BaseModel2
All Implemented Interfaces:
Model

public abstract class BaseModel2 extends Object implements 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 Details

  • Method Details

    • realize

      public abstract ResultOrProblems<RealizedPipeline> realize(ExecutionContext context)
      Description copied from interface: Model

      Produces an executable pipeline that will 'run' the model and produce results.

      Specified by:
      realize in interface Model
      Returns:
      a RealizedPipeline that can be executed, or a list of Problems that occurred during realization.
    • getFramework

      public ModelFramework getFramework()
      Specified by:
      getFramework in interface Model
      Returns:
      what sort of ModelFramework was used to build this model.
    • getFrameworkParameters

      public BoundParameters 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 interface Model
    • getBoundParameters

      public BoundParameters getBoundParameters()
      Specified by:
      getBoundParameters in interface Model
      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

      public List<? extends ModelParameter> 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 regular Parameter

      Specified by:
      getModelParameters in interface Model