public abstract class ChartItem extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ChartItemSpecification |
chartItemSpecification |
static int |
CONTINUE |
protected FlowChartInstance |
flowChartinstance |
static int |
NEWITERATION |
static int |
TERMINATE |
Constructor and Description |
---|
ChartItem() |
Modifier and Type | Method and Description |
---|---|
ChartElement |
getChartElement(java.lang.String key)
Returns the chart element in the flow chart system description
|
ChartItemSpecification |
getChartItemSpecification()
Returns a chart item specification
|
FlowChartInstance |
getFlowChartInstance()
Returns the flow chart instance that the chart item belongs to
|
int |
getOptionContainerIndex()
Returns the option container index
|
void |
initialize(FlowChartInstance flowChartinstance,
ChartItemSpecification chartItemSpecification)
Initialize the chart item
|
abstract int |
postprocess(int signal)
Cause the chart item to perform the postprocess tasks
|
abstract int |
preprocess(int signal)
Cause the chart item to perform the preprocess tasks
|
abstract int |
process(int signal)
Cause the chart item to perform the process task (for every sentence)
|
void |
setChartItemSpecification(ChartItemSpecification chartItemSpecification)
Sets the specification of the chart item
|
protected void |
setFlowChartInstance(FlowChartInstance flowChartinstance)
Sets the flow chart instance that the chart item belongs to
|
abstract void |
terminate()
Terminates and cleans up the chart item
|
protected FlowChartInstance flowChartinstance
protected ChartItemSpecification chartItemSpecification
public static final int CONTINUE
public static final int TERMINATE
public static final int NEWITERATION
public ChartItem()
public void initialize(FlowChartInstance flowChartinstance, ChartItemSpecification chartItemSpecification) throws MaltChainedException
flowChartinstance
- the flow chart instance that the chart item belongs tochartItemSpecification
- a specification of the chart itemMaltChainedException
public abstract int preprocess(int signal) throws MaltChainedException
signal
- returned by the previous chart itemMaltChainedException
public abstract int process(int signal) throws MaltChainedException
signal
- returned by the previous chart itemMaltChainedException
public abstract int postprocess(int signal) throws MaltChainedException
signal
- returned by the previous chart itemMaltChainedException
public abstract void terminate() throws MaltChainedException
MaltChainedException
public FlowChartInstance getFlowChartInstance()
protected void setFlowChartInstance(FlowChartInstance flowChartinstance)
flowChartinstance
- a flow chart instancepublic int getOptionContainerIndex()
public ChartElement getChartElement(java.lang.String key)
key
- a chart element keypublic ChartItemSpecification getChartItemSpecification()
public void setChartItemSpecification(ChartItemSpecification chartItemSpecification)
chartItemSpecification
- a chart item specificationCopyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.