java: isac.util.tactics .. end renamed, formatted, inst_var_, import cleaned
2 * Created on Feb 22, 2005
4 * To change the template for this generated file go to
5 * Window>Preferences>Java>Code Generation>Code and Comments
7 package isac.util.usersettings;
10 * @author Alan Krempler
12 * The UserModel is a class to gather statistics about one user's interaction
13 * with the system. Statistis are gathered per user and per interactional
16 public class UserModel {
18 // special value for retrieving the statistics regardless of the dialog atom
19 // used in the interaction
20 public static final int DIALOG_ATOM_ANY = 0;
22 // counter for identifying pending interactions
23 private static int interaction_nr_ = 1;
27 * ID of the item being queried, a tactic for example
29 * ID of the interactional context use DIALOG_ATOM_ANY if asking
30 * for statistics for all dialog atoms
31 * @return count of previously recorded interactions with this item
33 public int getTouchedCount(int item_id, int dialog_atom) {
34 // FIXME: returning dummy value in absence of valid statistics
40 * ID of the item being queried, a tactic for example
42 * ID of the interactional context use DIALOG_ATOM_ANY if asking
43 * for statistics for all dialog atoms
44 * @return count of previously recorded successful interactions with this
47 public int getSuccessCount(int item_id, int dialog_atom) {
48 // FIXME: returning dummy value in absence of valid statistics
54 * ID of the item being queried, a tactic for example
56 * ID of the interactional context use DIALOG_ATOM_ANY if asking
57 * for statistics for all dialog atoms
58 * @return time of last recorded interaction with this item
60 public java.util.Date getTouchedLast(int item_id, int dialog_atom) {
61 // FIXME: returning dummy value in absence of valid statistics
62 return new java.util.Date();
67 * ID of the item being queried, a tactic for example
69 * ID of the interactional context use DIALOG_ATOM_ANY if asking
70 * for statistics for all dialog atoms
71 * @return time of last recorded successful interaction with this item
73 public java.util.Date getSuccessLast(int item_id, int dialog_atom) {
74 // FIXME: returning dummy value in absence of valid statistics
75 return new java.util.Date();
80 * ID of the item being queried, a tactic for example
82 * ID of the interactional context use DIALOG_ATOM_ANY if asking
83 * for statistics for all dialog atoms
84 * @return average time (seconds) spent in interactions with this item
86 public int getTimeSpentAvg(int item_id, int dialog_atom) {
87 // FIXME: returning dummy value in absence of valid statistics
93 * ID of the item being queried, a tactic for example
95 * ID of the interactional context use DIALOG_ATOM_ANY if asking
96 * for statistics for all dialog atoms
97 * @return maximum time (seconds) spent in interactions with this item
99 public int getTimeSpentMax(int item_id, int dialog_atom) {
100 // FIXME: returning dummy value in absence of valid statistics
106 * ID of the item being queried, a tactic for example
108 * ID of the interactional context use DIALOG_ATOM_ANY if asking
109 * for statistics for all dialog atoms
110 * @return standard deviation of time spent in interactions with this item
112 public float getTimeSpentStddev(int item_id, int dialog_atom) {
113 // FIXME: returning dummy value in absence of valid statistics
118 * Mark the beginning of an interaction with an item.
121 * ID of the item being acted upon, a tactic for example
123 * ID of the interactional context
124 * @return unique number to indentify the end of the transaction
126 public int startInteraction(int item_id, int dialog_atom) {
127 // FIXME: insert code to record statistics
130 // new java.util.Date(); ...
132 // save in static vector of currently open interactions
135 return interaction_nr_++;
139 * Mark the end of an interaction with an item.
141 * @param interaction_id
142 * ID of the interaction returned from the call to
143 * {@link # startInteraction() }
145 * information about the success of the interaction
146 * @return false in case of failure - no matching start could be found, true
149 public boolean endInteraction(int interaction_id, int success) {
150 // FIXME: insert code to record statistics
152 // record end timestamp
153 // new java.util.Date(); ...
157 // delete from static vector of currently open interactions