edu.indiana.iucbrf.ccbr.conversationblock.selector
Class OrderedConversationBlockSelector

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

public class OrderedConversationBlockSelector
extends AbstractConversationBlockSelector

An OrderedConversationBlockSelector assumes that the conversation blocks passed to it either directly or through the domain are in an order-sensitive data structure. The conversation blocks are returned by getNextBlock() in this order.

See Also:
Serialized Form

Field Summary
protected  java.util.Collection blockCollection
           
protected  java.util.Iterator blockIter
           
 
Fields inherited from class edu.indiana.iucbrf.ccbr.conversationblock.selector.AbstractConversationBlockSelector
differentiator
 
Fields inherited from interface edu.indiana.util.swing.SwingRepresentable
TITLE_FONT
 
Constructor Summary
protected OrderedConversationBlockSelector()
           
  OrderedConversationBlockSelector(CCBRDomain domain)
          Creates a new instance of OrderedConversationBlockSelector An OrderedConversationBlockSelector created with this constructor will only return Questions, in the ordered they are specified in the domain.
  OrderedConversationBlockSelector(java.util.Collection blockCollection)
          Creates a new instance of OrderedConversationBlockSelector
 
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.
protected  FeatureKey getNextFeatureKeyImpl(Problem problemSoFar, RetrievalResults casesUnderConsideration, CCBRDomain domain)
           
protected  void initConversationImpl(Problem initialProblem)
           
 void reset()
          Reset the state of the conversation block selector, to prepare for a new conversation.
 javax.swing.JComponent toSwing(Domain domain)
           
 javax.swing.JComponent toSwing(int detailLevel)
          Detail level may be ignored by implementations.
 
Methods inherited from class edu.indiana.iucbrf.ccbr.conversationblock.selector.AbstractConversationBlockSelector
getNextFeatureKey, initConversation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blockCollection

protected java.util.Collection blockCollection

blockIter

protected java.util.Iterator blockIter
Constructor Detail

OrderedConversationBlockSelector

protected OrderedConversationBlockSelector()

OrderedConversationBlockSelector

public OrderedConversationBlockSelector(CCBRDomain domain)
Creates a new instance of OrderedConversationBlockSelector An OrderedConversationBlockSelector created with this constructor will only return Questions, in the ordered they are specified in the domain.


OrderedConversationBlockSelector

public OrderedConversationBlockSelector(java.util.Collection blockCollection)
Creates a new instance of OrderedConversationBlockSelector

Method Detail

reset

public void reset()
Description copied from interface: ConversationBlockSelector
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.


initConversationImpl

protected void initConversationImpl(Problem initialProblem)
Specified by:
initConversationImpl in class AbstractConversationBlockSelector

getNextBlock

public ConversationBlock getNextBlock(Problem problemSoFar,
                                      RetrievalResults casesUnderConsideration,
                                      CCBRDomain domain)
Description copied from class: AbstractConversationBlockSelector
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
Overrides:
getNextBlock in class AbstractConversationBlockSelector

getNextFeatureKeyImpl

protected FeatureKey getNextFeatureKeyImpl(Problem problemSoFar,
                                           RetrievalResults casesUnderConsideration,
                                           CCBRDomain domain)
Specified by:
getNextFeatureKeyImpl in class AbstractConversationBlockSelector

toSwing

public javax.swing.JComponent toSwing(Domain domain)

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