Class DUUIReaderComposer
java.lang.Object
org.texttechnologylab.DockerUnifiedUIMAInterface.DUUIComposer
org.texttechnologylab.DockerUnifiedUIMAInterface.DUUIReaderComposer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.texttechnologylab.DockerUnifiedUIMAInterface.DUUIComposer
DUUIComposer.DebugLevel, DUUIComposer.PipelinePart -
Field Summary
Fields inherited from class org.texttechnologylab.DockerUnifiedUIMAInterface.DUUIComposer
_cas_poolsize, _clients, COMPONENT_COMPONENT_UNIQUE_KEY, V1_COMPONENT_ENDPOINT_COMMUNICATION_LAYER, V1_COMPONENT_ENDPOINT_FINALIZE, V1_COMPONENT_ENDPOINT_PROCESS, V1_COMPONENT_ENDPOINT_PROCESS_WEBSOCKET, V1_COMPONENT_ENDPOINT_STREAM, V1_COMPONENT_ENDPOINT_TYPESYSTEM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(DUUIDockerDriver.Component object) Adds a Docker component to the pipeline.add(DUUIPipelineComponent object) Adds a component to the pipeline.add(DUUIRemoteDriver.Component object) Adds a Docker component to the pipeline.add(DUUISwarmDriver.Component object) Adds a Docker Swarm component to the pipeline.add(DUUIUIMADriver.Component object) Adds a UIMA component to the pipeline.add(DUUIPipelineDescription desc) Adds a component to the pipeline.addDriver(IDUUIDriverInterface driver) Register a driver to use with the DUUI composer.addDriver(IDUUIDriverInterface... drivers) Register multiple drivers to use with the DUUI controller.asService(boolean service) When set to true the pipeline is not shutdown on completion but remains idle until a new request is made.instantiateReaderPipeline(Path filePath) Resets the DUUI pipeline to prepare a new run.withCasPoolsize(int poolsize) Set CAS poolsize.withDebugLevel(DUUIComposer.DebugLevel debugLevel) If debug is enabled Events will be written to standard outwithIgnoreErrors(boolean ignoreErrors) Enable error ignore.Directly sets the instantiated pipeline.withLuaContext(DUUILuaContext context) Set Lua context to use.withMonitor(DUUIMonitor monitor) Attach InfluxDB for monitoring.withOpenConnection(boolean open) withSkipVerification(boolean skipVerification) Enable or disable DUUI API verification step, by default verification is enabled.withStorageBackend(IDUUIStorageBackend storage) Attach a storage backend to collect metrics and errors of a run in a database.withWorkers(int workers) Set the amount of DUUI worker threads for processing, defaults to 1 if not set.Methods inherited from class org.texttechnologylab.DockerUnifiedUIMAInterface.DUUIComposer
addDocument, addDocuments, addEvent, addEvent, findDocumentByPath, fromInstantiatedPipeline, get_drivers, get_instantiatedPipeline, get_isServiceStarted, get_minimalTypesystem, get_pipeline, get_shutdownAtomic, get_skipVerification, get_storage, getDebugLevel, getDocumentPaths, getDocuments, getEvents, getIgnoreErrors, getInstantiatedPipeline, getInstantiatedTypeSystem, getInstantiationDuration, getLocalhost, getPipeline, getPipelineStatus, getProgress, getProgressAtomic, getWorkerCount, incrementProgress, instantiate_pipeline, interrupt, interrupt, isFinished, isService, isServiceStarted, main, printConcurrencyGraph, resetService, run, run, run, run, run, run, run, runSegmented, set_hasShutdown, set_isServiceStarted, setFinished, setInstantiatedTypeSystem, setInstantiationDuration, setPipelineStatus, setServiceStarted, shouldShutdown, shutdown
-
Constructor Details
-
DUUIReaderComposer
Composer constructor.- Throws:
URISyntaxException
-
-
Method Details
-
instantiateReaderPipeline
- Throws:
Exception
-
withMonitor
public DUUIReaderComposer withMonitor(DUUIMonitor monitor) throws UnknownHostException, InterruptedException Description copied from class:DUUIComposerAttach InfluxDB for monitoring.- Overrides:
withMonitorin classDUUIComposer- Parameters:
monitor- DUUI monitor object- Returns:
- this, for method chaining
- Throws:
UnknownHostExceptionInterruptedException
-
withSkipVerification
Description copied from class:DUUIComposerEnable or disable DUUI API verification step, by default verification is enabled.If enabled, DUUI tries to process sample data via every component in the pipeline to check for DUUI API compatibility before processing the actual CAS objects.
- Overrides:
withSkipVerificationin classDUUIComposer- Parameters:
skipVerification- true for skipping, else false- Returns:
- this, for method chaining
-
withStorageBackend
Description copied from class:DUUIComposerAttach a storage backend to collect metrics and errors of a run in a database.- Overrides:
withStorageBackendin classDUUIComposer- Parameters:
storage- Storage backend, e.g. SQLite.- Returns:
- this, for method chaining
-
withLuaContext
Description copied from class:DUUIComposerSet Lua context to use.This enables the configuration of sandbox features or globally usable libraries for Lua scripts.
- Overrides:
withLuaContextin classDUUIComposer- Parameters:
context- Lua context- Returns:
- this, for method chaining
-
withCasPoolsize
Description copied from class:DUUIComposerSet CAS poolsize.This is calculated by default (or if explicitly set to null) based on amount of workers.
- Overrides:
withCasPoolsizein classDUUIComposer- Parameters:
poolsize- CAS poolsize- Returns:
- this, for method chaining
-
withWorkers
Description copied from class:DUUIComposerSet the amount of DUUI worker threads for processing, defaults to 1 if not set.- Overrides:
withWorkersin classDUUIComposer- Parameters:
workers- Amount of workers to use.- Returns:
- this, for method chaining
-
withOpenConnection
- Overrides:
withOpenConnectionin classDUUIComposer- Parameters:
open-- Returns:
- this, for method chaining
-
addDriver
Description copied from class:DUUIComposerRegister a driver to use with the DUUI composer.By default, no driver is setup. To use the composer, at least one driver has to be added. Components depending on drivers that have not been added can not be processed.
- Overrides:
addDriverin classDUUIComposer- Parameters:
driver- The driver to register.- Returns:
- this, for method chaining
- See Also:
-
addDriver
Description copied from class:DUUIComposerRegister multiple drivers to use with the DUUI controller.By default, no driver is setup. To use the composer, at least one driver has to be added. Components depending on drivers that have not been added can not be processed.
- Overrides:
addDriverin classDUUIComposer- Parameters:
drivers- The drivers to register.- Returns:
- this, for method chaining
- See Also:
-
add
public DUUIReaderComposer add(DUUIDockerDriver.Component object) throws org.apache.uima.util.InvalidXMLException, IOException, SAXException, org.apache.commons.compress.compressors.CompressorException Description copied from class:DUUIComposerAdds a Docker component to the pipeline.- Overrides:
addin classDUUIComposer- Parameters:
object- Docker component- Returns:
- this, for method chaining
- Throws:
org.apache.uima.util.InvalidXMLExceptionIOExceptionSAXExceptionorg.apache.commons.compress.compressors.CompressorException
-
add
public DUUIReaderComposer add(DUUIUIMADriver.Component object) throws org.apache.uima.util.InvalidXMLException, IOException, SAXException, org.apache.commons.compress.compressors.CompressorException Description copied from class:DUUIComposerAdds a UIMA component to the pipeline.- Overrides:
addin classDUUIComposer- Parameters:
object- UIMA component- Returns:
- this, for method chaining
- Throws:
org.apache.uima.util.InvalidXMLExceptionIOExceptionSAXExceptionorg.apache.commons.compress.compressors.CompressorException
-
add
public DUUIReaderComposer add(DUUIRemoteDriver.Component object) throws org.apache.uima.util.InvalidXMLException, IOException, SAXException, org.apache.commons.compress.compressors.CompressorException Description copied from class:DUUIComposerAdds a Docker component to the pipeline.- Overrides:
addin classDUUIComposer- Parameters:
object- Docker component- Returns:
- this, for method chaining
- Throws:
org.apache.uima.util.InvalidXMLExceptionIOExceptionSAXExceptionorg.apache.commons.compress.compressors.CompressorException
-
add
public DUUIReaderComposer add(DUUISwarmDriver.Component object) throws org.apache.uima.util.InvalidXMLException, IOException, SAXException, org.apache.commons.compress.compressors.CompressorException Description copied from class:DUUIComposerAdds a Docker Swarm component to the pipeline.- Overrides:
addin classDUUIComposer- Parameters:
object- Docker Swarm component- Returns:
- this, for method chaining
- Throws:
org.apache.uima.util.InvalidXMLExceptionIOExceptionSAXExceptionorg.apache.commons.compress.compressors.CompressorException
-
add
public DUUIReaderComposer add(DUUIPipelineComponent object) throws org.apache.uima.util.InvalidXMLException, IOException, SAXException, org.apache.commons.compress.compressors.CompressorException Description copied from class:DUUIComposerAdds a component to the pipeline.- Overrides:
addin classDUUIComposer- Parameters:
object- component- Returns:
- this, for method chaining
- Throws:
org.apache.uima.util.InvalidXMLExceptionIOExceptionSAXExceptionorg.apache.commons.compress.compressors.CompressorException
-
add
public DUUIReaderComposer add(DUUIPipelineDescription desc) throws org.apache.uima.util.InvalidXMLException, IOException, SAXException, org.apache.commons.compress.compressors.CompressorException Description copied from class:DUUIComposerAdds a component to the pipeline.- Overrides:
addin classDUUIComposer- Parameters:
desc- component- Returns:
- this, for method chaining
- Throws:
org.apache.uima.util.InvalidXMLExceptionIOExceptionSAXExceptionorg.apache.commons.compress.compressors.CompressorException
-
resetPipeline
Description copied from class:DUUIComposerResets the DUUI pipeline to prepare a new run.- Overrides:
resetPipelinein classDUUIComposer- Returns:
- this, for method chaining
-
withInstantiatedPipeline
Description copied from class:DUUIComposerDirectly sets the instantiated pipeline.- Overrides:
withInstantiatedPipelinein classDUUIComposer- Parameters:
pipeline- Instantiated pipeline- Returns:
- this, for method chaining
-
withIgnoreErrors
Description copied from class:DUUIComposerEnable error ignore.- Overrides:
withIgnoreErrorsin classDUUIComposer- Parameters:
ignoreErrors- true to ignore errors, false by default- Returns:
- this, for method chaining
-
asService
Description copied from class:DUUIComposerWhen set to true the pipeline is not shutdown on completion but remains idle until a new request is made.- Overrides:
asServicein classDUUIComposer- Parameters:
service- Flag that prevents the shutdown of the pipeline .
-
withDebugLevel
Description copied from class:DUUIComposerIf debug is enabled Events will be written to standard out- Overrides:
withDebugLevelin classDUUIComposer- Parameters:
debugLevel- The level at which events are written to standard out.- Returns:
- This Composer
-