Class DefaultEngine

All Implemented Interfaces:
AutoCloseable, nz.org.riskscape.engine.Engine, nz.org.riskscape.engine.Engine.Writeable, nz.org.riskscape.engine.IdentifiedLocator

public class DefaultEngine extends DefaultIdentifiedLocator implements nz.org.riskscape.engine.Engine.Writeable
  • Field Details

  • Constructor Details

    • DefaultEngine

      public DefaultEngine()
    • DefaultEngine

      public DefaultEngine(nz.org.riskscape.engine.BuildInfo buildInfo, List<nz.org.riskscape.engine.plugin.Plugin> plugins, nz.org.riskscape.engine.plugin.ExtensionPoints extensionPoints, Map<String,List<String>> settings)
  • Method Details

    • getFilterFactory

      public FilterFactory getFilterFactory()
      Specified by:
      getFilterFactory in interface nz.org.riskscape.engine.Engine
    • add

      public void add(nz.org.riskscape.engine.bind.ParameterBinder binder)

      Add a ParameterBinder to the engine for use with converting strings in to various engine objects that are used by Model and Bookmarks

    • add

      public void add(nz.org.riskscape.engine.data.BookmarkResolver bookmarkResolver)
    • getFeaturesOfType

      public <T> List<T> getFeaturesOfType(Class<T> featureClass)
      Specified by:
      getFeaturesOfType in interface nz.org.riskscape.engine.Engine
    • addFeature

      public void addFeature(Object implementation)

      Register a 'feature' implementation with the engine. This object will be returned by any calls to getFeaturesOfType(Class) where the registered object implements the given class. This is mostly here for tests to 'pickle' the engine and due consideration should be given before using this in 'real' code.

      Parameters:
      implementation - the feature to register.
    • isBetaPluginEnabled

      public boolean isBetaPluginEnabled()
      Specified by:
      isBetaPluginEnabled in interface nz.org.riskscape.engine.Engine
    • setProblemSink

      public void setProblemSink(nz.org.riskscape.problem.ProblemSink sink)
    • emptyProject

      public nz.org.riskscape.engine.Project emptyProject()
      Specified by:
      emptyProject in interface nz.org.riskscape.engine.Engine
    • buildProject

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.Project> buildProject(URI location, Consumer<nz.org.riskscape.problem.Problem> problems)
      Specified by:
      buildProject in interface nz.org.riskscape.engine.Engine
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface nz.org.riskscape.engine.Engine
    • getSetting

      public List<String> getSetting(String settingsKey)
      Specified by:
      getSetting in interface nz.org.riskscape.engine.Engine
    • getBookmarkResolvers

      public DefaultBookmarkResolvers getBookmarkResolvers()
      Specified by:
      getBookmarkResolvers in interface nz.org.riskscape.engine.Engine
    • getBinders

      public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.bind.ParameterBinder> getBinders()
      Specified by:
      getBinders in interface nz.org.riskscape.engine.Engine
    • getFormats

      public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.output.Format> getFormats()
      Specified by:
      getFormats in interface nz.org.riskscape.engine.Engine
    • getMessages

      public nz.org.riskscape.engine.i18n.Messages getMessages()
      Specified by:
      getMessages in interface nz.org.riskscape.engine.Engine
    • setMessages

      public void setMessages(nz.org.riskscape.engine.i18n.Messages messages)
    • getDiagnostics

      public DefaultDiagnostics getDiagnostics()
      Specified by:
      getDiagnostics in interface nz.org.riskscape.engine.Engine
    • getMemoryPressureGauge

      public MemoryMonitoring getMemoryPressureGauge()
    • getTupleStorage

      public nz.org.riskscape.engine.io.TupleStorage getTupleStorage()
      Specified by:
      getTupleStorage in interface nz.org.riskscape.engine.Engine
    • getProblemSink

      public nz.org.riskscape.problem.ProblemSink getProblemSink()
      Specified by:
      getProblemSink in interface nz.org.riskscape.engine.Engine
    • getResourceFactory

      public nz.org.riskscape.engine.resource.ResourceFactory getResourceFactory()
      Specified by:
      getResourceFactory in interface nz.org.riskscape.engine.Engine
    • setResourceFactory

      public void setResourceFactory(nz.org.riskscape.engine.resource.ResourceFactory resourceFactory)
    • getPipelineSteps

      public nz.org.riskscape.engine.pipeline.PipelineSteps getPipelineSteps()
      Specified by:
      getPipelineSteps in interface nz.org.riskscape.engine.Engine
    • getTypeRegistry

      public nz.org.riskscape.engine.types.TypeRegistry getTypeRegistry()
      Specified by:
      getTypeRegistry in interface nz.org.riskscape.engine.Engine
    • getPipelineExecutor

      public nz.org.riskscape.engine.pipeline.PipelineExecutor getPipelineExecutor()
      Specified by:
      getPipelineExecutor in interface nz.org.riskscape.engine.Engine
    • setPipelineExecutor

      public void setPipelineExecutor(nz.org.riskscape.engine.pipeline.PipelineExecutor pipelineExecutor)
    • getChildPipelineExecutor

      public nz.org.riskscape.engine.pipeline.PipelineExecutor getChildPipelineExecutor()
    • getBuildInfo

      public nz.org.riskscape.engine.BuildInfo getBuildInfo()
      Specified by:
      getBuildInfo in interface nz.org.riskscape.engine.Engine
    • getPlugins

      public List<nz.org.riskscape.engine.plugin.Plugin> getPlugins()
      Specified by:
      getPlugins in interface nz.org.riskscape.engine.Engine
    • getExtensionPoints

      public nz.org.riskscape.engine.plugin.ExtensionPoints getExtensionPoints()
      Specified by:
      getExtensionPoints in interface nz.org.riskscape.engine.Engine
    • getTempDirectory

      public Path getTempDirectory()
      Specified by:
      getTempDirectory in interface nz.org.riskscape.engine.Engine
    • getModelFrameworks

      public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.model.ModelFramework> getModelFrameworks()
      Specified by:
      getModelFrameworks in interface nz.org.riskscape.engine.Engine
    • getPipelineOutputStores

      public nz.org.riskscape.engine.output.PipelineOutputStores getPipelineOutputStores()
      Specified by:
      getPipelineOutputStores in interface nz.org.riskscape.engine.Engine
    • getFunctionFrameworks

      public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.function.FunctionFramework> getFunctionFrameworks()
      Specified by:
      getFunctionFrameworks in interface nz.org.riskscape.engine.Engine