edu.indiana.iucbrf.ccbr.conversationblock
Class ConversationBlockCollection

java.lang.Object
  extended by edu.indiana.iucbrf.ccbr.conversationblock.ConversationBlockCollection
All Implemented Interfaces:
SwingRepresentableWithDomain, SwingRepresentable

public class ConversationBlockCollection
extends java.lang.Object
implements SwingRepresentableWithDomain

A ConversationBlockCollection is a collection of conversation blocks that are related in particular ways. Specifically, the blocks are governed by a ConversationBlockSelector, and the blocks together define a certain context. That is, the questions in a ConversationBlockCollection may be presented in any context, and they will make sense. In addition, the context is complete and closed once the ConversationBlockCollection has presented all its questions. There may optionally also be a summary question that summarizes the answers given to the Collection's questions.


Field Summary
protected  ConversationBlockSelector selector
           
protected  FeatureKey summaryFeatureKey
           
protected  java.lang.String title
           
 
Fields inherited from interface edu.indiana.util.swing.SwingRepresentable
TITLE_FONT
 
Constructor Summary
ConversationBlockCollection(ConversationBlockSelector selector)
          Creates a new instance of ConversationBlockCollection
 
Method Summary
 ConversationBlock getNextBlock(Problem problemSoFar, RetrievalResults casesUnderConsideration, CCBRDomain domain)
          The conversation block returned should not be a question to which problemSoFar already has an answer.
 Question getSummaryQuestion()
           
 java.lang.String getTitle()
           
 void reset()
          Reset the state of the conversation block selector, to prepare for a new conversation.
 void setTitle(java.lang.String title)
           
 javax.swing.JComponent toSwing(Domain domain)
          Obtain a JComponent representation of this ConversationBlockSelector.
 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
 

Field Detail

selector

protected ConversationBlockSelector selector

title

protected java.lang.String title

summaryFeatureKey

protected FeatureKey summaryFeatureKey
Constructor Detail

ConversationBlockCollection

public ConversationBlockCollection(ConversationBlockSelector selector)
Creates a new instance of ConversationBlockCollection

Method Detail

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getNextBlock

public ConversationBlock getNextBlock(Problem problemSoFar,
                                      RetrievalResults casesUnderConsideration,
                                      CCBRDomain domain)
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


getSummaryQuestion

public Question getSummaryQuestion()

reset

public void reset()
Reset the state of the conversation block selector, to prepare for a new conversation. For some conversation block selectors, this may be a dummy operation.


toSwing

public javax.swing.JComponent toSwing(Domain domain)
Obtain a JComponent representation of this ConversationBlockSelector.

Specified by:
toSwing in interface SwingRepresentableWithDomain

toSwing

public javax.swing.JComponent toSwing(int detailLevel)
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