Package com.gengoai.hermes.workflow
Class SequentialWorkflow
- java.lang.Object
-
- com.gengoai.hermes.workflow.SequentialWorkflow
-
- All Implemented Interfaces:
Workflow
,Serializable
public final class SequentialWorkflow extends Object implements Workflow
Entry point to sequentially processing a corpus via one ore more
Action
s. The list of processors can be defined either via the--processors
command line argument (which expects a comma separated list of processor class names) or via the--desc
argument, which specifies the processing description file to load.Description files are in Mango's
Config
format. IndividualAction
s are implemented as beans, which can have their options set via configuration using Mango's capability to parameterize objects.- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SequentialWorkflow(@NonNull Iterable<Action> actions)
Instantiates a new Workflow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Context
getStartingContext()
Gets starting context.String
getType()
Gets type.DocumentCollection
process(@NonNull DocumentCollection input, @NonNull Context context)
Process corpus.void
setStartingContext(Context context)
Sets starting context.protected JsonEntry
toEntry()
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStartingContext
public Context getStartingContext()
Description copied from interface:Workflow
Gets starting context.- Specified by:
getStartingContext
in interfaceWorkflow
- Returns:
- the starting context
-
process
public final DocumentCollection process(@NonNull @NonNull DocumentCollection input, @NonNull @NonNull Context context) throws Exception
Process corpus.
-
setStartingContext
public void setStartingContext(Context context)
Description copied from interface:Workflow
Sets starting context.- Specified by:
setStartingContext
in interfaceWorkflow
- Parameters:
context
- the context
-
toEntry
protected JsonEntry toEntry()
-
-