edu.indiana.iucbrf.ccbr.conversationblock.selector.flowchart
Class FlowChartConversationBlockSelector

java.lang.Object
  extended by edu.indiana.iucbrf.ccbr.conversationblock.selector.flowchart.FlowChartConversationBlockSelector
All Implemented Interfaces:
ConversationBlockSelector, SwingRepresentableWithDomain, SwingRepresentable, java.io.Serializable

public class FlowChartConversationBlockSelector
extends java.lang.Object
implements ConversationBlockSelector

A ConversationBlockSelector that is based on a FlowChart.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface edu.indiana.util.swing.SwingRepresentable
TITLE_FONT
 
Constructor Summary
protected FlowChartConversationBlockSelector()
          Creates a new instance of FlowChartConversationBlockSelector
  FlowChartConversationBlockSelector(FlowChart flowChart)
          Creates a new instance of FlowChartConversationBlockSelector
 
Method Summary
 FlowChart getFlowChart()
           
 ConversationBlock getNextBlock(Problem problemSoFar, RetrievalResults casesUnderConsideration, CCBRDomain domain)
          The conversation block returned should not be a question to which problemSoFar already has an answer.
 FeatureKey getNextFeatureKey(Problem problemSoFar, RetrievalResults casesUnderConsideration, CCBRDomain domain)
           
 void initConversation(Problem initialProblem)
          Reset the state of the conversation block selector and prepare for a new conversation on the given problem.
 void reset()
          Return the state of this question selector to the beginning of the flow chart.
 javax.swing.JComponent toSwing(Domain domain)
           
 javax.swing.JComponent toSwing(int detailLevel)
          Detail level may be ignored by implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowChartConversationBlockSelector

protected FlowChartConversationBlockSelector()
Creates a new instance of FlowChartConversationBlockSelector


FlowChartConversationBlockSelector

public FlowChartConversationBlockSelector(FlowChart flowChart)
Creates a new instance of FlowChartConversationBlockSelector

Method Detail

getFlowChart

public FlowChart getFlowChart()

getNextBlock

public ConversationBlock getNextBlock(Problem problemSoFar,
                                      RetrievalResults casesUnderConsideration,
                                      CCBRDomain domain)
Description copied from interface: ConversationBlockSelector
The conversation block returned should not be a question to which problemSoFar already has an answer. Returns null if there are no more conversation blocks to ask

Specified by:
getNextBlock in interface ConversationBlockSelector

getNextFeatureKey

public FeatureKey getNextFeatureKey(Problem problemSoFar,
                                    RetrievalResults casesUnderConsideration,
                                    CCBRDomain domain)
Specified by:
getNextFeatureKey in interface ConversationBlockSelector

reset

public void reset()
Return the state of this question selector to the beginning of the flow chart.

Specified by:
reset in interface ConversationBlockSelector

initConversation

public void initConversation(Problem initialProblem)
Description copied from interface: ConversationBlockSelector
Reset the state of the conversation block selector and prepare for a new conversation on the given problem. For some conversation block selectors, this may be a dummy operation.

Specified by:
initConversation in interface ConversationBlockSelector

toSwing

public javax.swing.JComponent toSwing(Domain domain)
Specified by:
toSwing in interface SwingRepresentableWithDomain

toSwing

public javax.swing.JComponent toSwing(int detailLevel)
Description copied from interface: SwingRepresentable
Detail level may be ignored by implementations. If used, the standard is for detailLevel 0 to be least detail, with higher values growing more detailed. 0 is least detail, higher numbers are more

Specified by:
toSwing in interface SwingRepresentable