jcolibri.extensions.recommendation.casesDisplay
Class UserChoice

java.lang.Object
  extended by jcolibri.extensions.recommendation.casesDisplay.UserChoice
Direct Known Subclasses:
CriticalUserChoice

public class UserChoice
extends java.lang.Object

Object that encapsulates the user answer when cases are shown.
This object keeps an internal integer with posible values:

It also contains the chosen case from the list.
If the answer is BUY, the selected case is the final result.
If the answer is REFINE QUERY, the selected case can be used in Navigation by Proposing to elicit the query.
The subclass CriticalUserChoice is an extension that also contains the critiques to the chosen case.

Version:
1.0
Author:
Juan A. Recio-Garcia, Developed at University College Cork (Ireland) in collaboration with Derek Bridge.
See Also:
CriticalUserChoice

Field Summary
static int BUY
          BUY constant
static int QUIT
          QUIT constant
static int REFINE_QUERY
          REFINE_QUERY constant
 
Constructor Summary
UserChoice(int choice, CBRCase selectedCase)
          Constructor
 
Method Summary
 int getChoice()
          Returns the user choice
 CBRCase getSelectedCase()
          Returns the critiqued case.
 CBRQuery getSelectedCaseAsQuery()
          Returns the critiqued case as a CBRQuery object.
 boolean isBuy()
          Returns true if the choice is a case
 boolean isQuit()
          Returns true if the choice is QUIT
 boolean isRefineQuery()
          Returns true if the choice is REFINE_QUERY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUIT

public static final int QUIT
QUIT constant

See Also:
Constant Field Values

REFINE_QUERY

public static final int REFINE_QUERY
REFINE_QUERY constant

See Also:
Constant Field Values

BUY

public static final int BUY
BUY constant

See Also:
Constant Field Values
Constructor Detail

UserChoice

public UserChoice(int choice,
                  CBRCase selectedCase)
Constructor

Parameters:
choice - is the user's choice
Method Detail

getChoice

public int getChoice()
Returns the user choice


isQuit

public boolean isQuit()
Returns true if the choice is QUIT


isRefineQuery

public boolean isRefineQuery()
Returns true if the choice is REFINE_QUERY


isBuy

public boolean isBuy()
Returns true if the choice is a case


getSelectedCaseAsQuery

public CBRQuery getSelectedCaseAsQuery()
Returns the critiqued case as a CBRQuery object.


getSelectedCase

public CBRCase getSelectedCase()
Returns the critiqued case.


GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es