Package nz.org.riskscape.engine
Class DefaultEngine
java.lang.Object
nz.org.riskscape.engine.DefaultIdentifiedLocator
nz.org.riskscape.engine.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
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.Engine
nz.org.riskscape.engine.Engine.Writeable
-
Field Summary
Fields inherited from interface nz.org.riskscape.engine.Engine
EMPTY_PROJECT_LOCATION
-
Constructor Summary
ConstructorDescriptionDefaultEngine
(nz.org.riskscape.engine.BuildInfo buildInfo, List<nz.org.riskscape.engine.plugin.Plugin> plugins, nz.org.riskscape.engine.plugin.ExtensionPoints extensionPoints) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(nz.org.riskscape.engine.bind.ParameterBinder binder) Add aParameterBinder
to the engine for use with converting strings in to various engine objects that are used byModel
andBookmark
svoid
add
(nz.org.riskscape.engine.data.BookmarkResolver bookmarkResolver) void
addFeature
(Object implementation) Register a 'feature' implementation with the engine.nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.Project>
buildProject
(URI location, Consumer<nz.org.riskscape.problem.Problem> problems) void
close()
nz.org.riskscape.engine.Project
nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.bind.ParameterBinder>
nz.org.riskscape.engine.BuildInfo
nz.org.riskscape.engine.pipeline.PipelineExecutor
nz.org.riskscape.engine.plugin.ExtensionPoints
<T> List<T>
getFeaturesOfType
(Class<T> featureClass) nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.output.Format>
nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.function.FunctionFramework>
nz.org.riskscape.engine.i18n.Messages
nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.model.ModelFramework>
nz.org.riskscape.engine.pipeline.PipelineExecutor
nz.org.riskscape.engine.output.PipelineOutputStores
nz.org.riskscape.engine.pipeline.PipelineSteps
List<nz.org.riskscape.engine.plugin.Plugin>
nz.org.riskscape.problem.ProblemSink
nz.org.riskscape.engine.resource.ResourceFactory
nz.org.riskscape.engine.io.TupleStorage
nz.org.riskscape.engine.types.TypeRegistry
void
setMessages
(nz.org.riskscape.engine.i18n.Messages messages) void
setPipelineExecutor
(nz.org.riskscape.engine.pipeline.PipelineExecutor pipelineExecutor) void
setProblemSink
(nz.org.riskscape.problem.ProblemSink sink) void
setResourceFactory
(nz.org.riskscape.engine.resource.ResourceFactory resourceFactory) Methods inherited from class nz.org.riskscape.engine.DefaultIdentifiedLocator
getCollection, getCollectionByClass, getCollectionClasses, hasCollectionOf, put, registerCollection, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.Engine.Writeable
registerCollection
Methods inherited from interface nz.org.riskscape.engine.IdentifiedLocator
getCollection, getCollectionByClass, getCollectionClasses, hasCollectionOf
-
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)
-
-
Method Details
-
getFilterFactory
- Specified by:
getFilterFactory
in interfacenz.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 byModel
andBookmark
s -
add
public void add(nz.org.riskscape.engine.data.BookmarkResolver bookmarkResolver) -
getFeaturesOfType
- Specified by:
getFeaturesOfType
in interfacenz.org.riskscape.engine.Engine
-
addFeature
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.
-
setProblemSink
public void setProblemSink(nz.org.riskscape.problem.ProblemSink sink) -
emptyProject
public nz.org.riskscape.engine.Project emptyProject()- Specified by:
emptyProject
in interfacenz.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 interfacenz.org.riskscape.engine.Engine
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfacenz.org.riskscape.engine.Engine
-
getBookmarkResolvers
- Specified by:
getBookmarkResolvers
in interfacenz.org.riskscape.engine.Engine
-
getBinders
public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.bind.ParameterBinder> getBinders()- Specified by:
getBinders
in interfacenz.org.riskscape.engine.Engine
-
getFormats
public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.output.Format> getFormats()- Specified by:
getFormats
in interfacenz.org.riskscape.engine.Engine
-
getMessages
public nz.org.riskscape.engine.i18n.Messages getMessages()- Specified by:
getMessages
in interfacenz.org.riskscape.engine.Engine
-
setMessages
public void setMessages(nz.org.riskscape.engine.i18n.Messages messages) -
getDiagnostics
- Specified by:
getDiagnostics
in interfacenz.org.riskscape.engine.Engine
-
getMemoryPressureGauge
-
getTupleStorage
public nz.org.riskscape.engine.io.TupleStorage getTupleStorage()- Specified by:
getTupleStorage
in interfacenz.org.riskscape.engine.Engine
-
getProblemSink
public nz.org.riskscape.problem.ProblemSink getProblemSink()- Specified by:
getProblemSink
in interfacenz.org.riskscape.engine.Engine
-
getResourceFactory
public nz.org.riskscape.engine.resource.ResourceFactory getResourceFactory()- Specified by:
getResourceFactory
in interfacenz.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 interfacenz.org.riskscape.engine.Engine
-
getTypeRegistry
public nz.org.riskscape.engine.types.TypeRegistry getTypeRegistry()- Specified by:
getTypeRegistry
in interfacenz.org.riskscape.engine.Engine
-
getPipelineExecutor
public nz.org.riskscape.engine.pipeline.PipelineExecutor getPipelineExecutor()- Specified by:
getPipelineExecutor
in interfacenz.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 interfacenz.org.riskscape.engine.Engine
-
getPlugins
- Specified by:
getPlugins
in interfacenz.org.riskscape.engine.Engine
-
getExtensionPoints
public nz.org.riskscape.engine.plugin.ExtensionPoints getExtensionPoints()- Specified by:
getExtensionPoints
in interfacenz.org.riskscape.engine.Engine
-
getTempDirectory
- Specified by:
getTempDirectory
in interfacenz.org.riskscape.engine.Engine
-
getModelFrameworks
public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.model.ModelFramework> getModelFrameworks()- Specified by:
getModelFrameworks
in interfacenz.org.riskscape.engine.Engine
-
getPipelineOutputStores
public nz.org.riskscape.engine.output.PipelineOutputStores getPipelineOutputStores()- Specified by:
getPipelineOutputStores
in interfacenz.org.riskscape.engine.Engine
-
getFunctionFrameworks
public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.function.FunctionFramework> getFunctionFrameworks()- Specified by:
getFunctionFrameworks
in interfacenz.org.riskscape.engine.Engine
-