Interface Engine

All Superinterfaces:
AutoCloseable, IdentifiedLocator
All Known Subinterfaces:
Engine.Writeable

public interface Engine extends IdentifiedLocator, AutoCloseable

An Engine is the central part of the application that offers core services for doing data processing.

  • Field Details

    • EMPTY_PROJECT_LOCATION

      static final URI EMPTY_PROJECT_LOCATION

      Null-equivalent to give to buildProject to signal you want to create an empty project

  • Method Details

    • getBookmarkResolvers

      BookmarkResolvers getBookmarkResolvers()
    • getPipelineSteps

      PipelineSteps getPipelineSteps()
    • getFilterFactory

      org.geotools.api.filter.FilterFactory getFilterFactory()

      Get a filter factory.

      Note that this filter factory does not have access to Riskscape RiskscapeFunctions so will not be able to create filter expressions that defer to them.

      Returns:
      filter factory
    • getTypeRegistry

      TypeRegistry getTypeRegistry()
      Returns:
      a TypeRegistry used for storing meta-type information, i.e. classes of classes
    • getResourceFactory

      ResourceFactory getResourceFactory()

      Factory able to convert URIs into a Resource able to access them.

    • getTupleStorage

      TupleStorage getTupleStorage()

      A place for parts of the engine to use for storage

    • getProblemSink

      ProblemSink getProblemSink()

      A place for problems to go. See interface on ProblemSink for usage.

      TODO some objects will be created with a sink, so best bet is to sit this early on in the engine's construction so that it will be passed on to any child objects that reference the engine, e.g. during cli boot up.

    • getBinders

      IdentifiedCollection of ParameterBinders to use for converting strings to model parameters.

    • getFormats

      IdentifiedCollection of Formats that may be used to write output files.

    • getPipelineExecutor

      PipelineExecutor getPipelineExecutor()
      Returns:
      a PipelineExecutor that can actually perform data processing for a Project
    • getBuildInfo

      BuildInfo getBuildInfo()
      Returns:
      version information for the Engine
    • getDiagnostics

      Diagnostics getDiagnostics()

      A place to record and query various diagnostics related to this Engine instance.

    • getFunctionFrameworks

      IdentifiedCollection<FunctionFramework> getFunctionFrameworks()
    • getFeaturesOfType

      <T> List<T> getFeaturesOfType(Class<T> featureClass)

      A generic look up method for features registered with the engine.

      Parameters:
      featureClass - the API/SPI class for the feature
      Returns:
      a List, in priority order, of the implementations of this feature
    • getExtensionPoints

      ExtensionPoints getExtensionPoints()

      A collection of extension points that this engine was initialized with. For a long time, we've dealt with extensions in a pretty haphazard way, but I think we've got so many different ways and places now of 'plugging in' that it's time to standardize.

    • getModelFrameworks

      IdentifiedCollection<ModelFramework> getModelFrameworks()
    • getPipelineOutputStores

      PipelineOutputStores getPipelineOutputStores()
      Returns:
      the PipelineOutputStores that are available to the engine
    • buildProject

      ResultOrProblems<Project> buildProject(URI location, Consumer<Problem> problems)

      Construct a project from resources at the given location.

      Parameters:
      location - a URI that points to the project - for now this can only be a project.ini file.
      problems - a place for partial-error problems related to constructing the project can go. These can be errors that stopped part of the project being built, but not enough to stop a result from being computed.
      Returns:
      a built project, or problems describing why it couldn't be built. Note that this result should be checked for warnings, too - they aren't guaranteed to all go to the consumer.
    • emptyProject

      Project emptyProject()
      Returns:
      an freshly minted empty project. The returned project is suitable for use as a project placeholder but shouldn't really be used for much more than that.
    • getPlugins

      List<Plugin> getPlugins()
      Returns:
      The list of plugins that were used to construct and populate this engine
    • getTempDirectory

      Path getTempDirectory()
      Returns:
      a Path that temporary files can be stored for this engine instance. These are likely to be cleaned up on engine shutdown.
    • close

      void close()

      Closes the engine and removes any temporary resources that it has created.

      Specified by:
      close in interface AutoCloseable