org.activemath.studentmodel2.data
Class AffectiveModel

java.lang.Object
  extended by org.activemath.studentmodel2.data.AffectiveModel

public class AffectiveModel
extends Object

This class holds information about the motivations and affective states of a specific user.

Since:
2009-09-24

Nested Class Summary
static class AffectiveModel.Factor
          Constants defining supported and modeled affective factors: intrinsic value perceived competence fear of failure attainment value
 
Field Summary
protected static Category log
           
 String version
          For XStream
 
Constructor Summary
AffectiveModel(String userId)
          Constructs the motivational model for a user
 
Method Summary
 double getAffectiveFactorValue(AffectiveModel.Factor factor)
           
 double getMotivation()
           
 String getUserId()
           
 void handleResult(ExerciseResult result)
          Updates the factors modeled for the user based on this result
 AffectiveModel initializeModel()
          Sets initial values for the supported factors - should always be called after creation
 void setAffectiveFactorValue(AffectiveModel.Factor factor, double value)
          Sets the value of an affective factor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public String version
For XStream


log

protected static Category log
Constructor Detail

AffectiveModel

public AffectiveModel(String userId)
Constructs the motivational model for a user

Parameters:
userId -
Method Detail

initializeModel

public AffectiveModel initializeModel()
Sets initial values for the supported factors - should always be called after creation

Returns:
The object itself

getUserId

public String getUserId()
Returns:
The user id of the user whose motivations/affective states are modeled

getAffectiveFactorValue

public double getAffectiveFactorValue(AffectiveModel.Factor factor)
Parameters:
factor -
Returns:
A value between 0.0 and 100.0 describing the level of the affective factor. -1 will be returned if the factor is not (yet) modeled.

setAffectiveFactorValue

public void setAffectiveFactorValue(AffectiveModel.Factor factor,
                                    double value)
Sets the value of an affective factor

Parameters:
factor -
value -

getMotivation

public double getMotivation()
Returns:
An estimation of the motivation based on the modeled affective states

handleResult

public void handleResult(ExerciseResult result)
Updates the factors modeled for the user based on this result

Parameters:
result - The result/event happened