Interface Engine
- All Superinterfaces:
AutoCloseable
,IdentifiedLocator
- All Known Subinterfaces:
Engine.Writeable
An Engine is the central part of the application that offers core services for doing data processing.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
An extension of the Engine interface with extra methods that are only safe to call during engine bootstrapping -
Field Summary
Modifier and TypeFieldDescriptionstatic final URI
Null-equivalent to give to buildProject to signal you want to create an empty project -
Method Summary
Modifier and TypeMethodDescriptionbuildProject
(URI location, Consumer<Problem> problems) Construct a project from resources at the given location.void
close()
Closes the engine and removes any temporary resources that it has created.IdentifiedCollection
ofParameterBinder
s to use for converting strings to model parameters.A place to record and query various diagnostics related to thisEngine
instance.A collection of extension points that this engine was initialized with.<T> List<T>
getFeaturesOfType
(Class<T> featureClass) A generic look up method for features registered with the engine.org.geotools.api.filter.FilterFactory
Get a filter factory.IdentifiedCollection
ofFormat
s that may be used to write output files.A place for problems to go.A place for parts of the engine to use for storageMethods inherited from interface nz.org.riskscape.engine.IdentifiedLocator
getCollection, getCollectionByClass, getCollectionClasses, hasCollectionOf
-
Field Details
-
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
RiskscapeFunction
s 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() -
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<ParameterBinder> getBinders()IdentifiedCollection
ofParameterBinder
s to use for converting strings to model parameters. -
getFormats
IdentifiedCollection<Format> getFormats()IdentifiedCollection
ofFormat
s that may be used to write output files. -
getMessages
Messages getMessages()- Returns:
- messages that can be used for i18n
-
getPipelineExecutor
PipelineExecutor getPipelineExecutor()- Returns:
- a
PipelineExecutor
that can actually perform data processing for aProject
-
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
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
PipelineOutputStore
s that are available to the engine
-
buildProject
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
- 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 interfaceAutoCloseable
-