org.activemath.events.types
Class ExerciseRunEvent

java.lang.Object
  extended by org.activemath.events.ActivemathEvent
      extended by org.activemath.events.types.ExerciseRunEvent
All Implemented Interfaces:
Serializable, Comparable, BookEventTag, InteractionEventTag, InteractionExerciseEventTag, ItemEventTag, SessionEventTag, UserEventTag
Direct Known Subclasses:
ExerciseRun

public class ExerciseRunEvent
extends ActivemathEvent
implements InteractionExerciseEventTag, BookEventTag

Event representation of an exercise run. Usually created from external exercise systems, such as STACK.

See Also:
Serialized Form

Field Summary
static String EVENT_TYPE
           
static String FINISHED
           
static String GAVE_UP
           
protected static Logger log
           
static String UNFINISHED
           
protected  boolean wasFinished
           
protected  boolean wasGivenUp
           
 
Fields inherited from class org.activemath.events.ActivemathEvent
bookId, groupId, id, itemId, sessionId, source, timestamp, type, userId
 
Constructor Summary
ExerciseRunEvent()
           
ExerciseRunEvent(String exerciseId, double successRate, int durationSecs, int numSteps, int numHints, boolean wasGivenUp)
          Constructor for direct event
 
Method Summary
 String getBookId()
           
 int getDurationSecs()
           
 String getEndState()
           
 String getExerciseSystem()
           
 String getItemId()
           
 List<org.jdom.Element> getMetadata()
           
 String getMetadataText()
           
 int getNumHints()
           
 int getNumSteps()
           
 String getSessionId()
           
 double getSuccessRate()
           
 String getUserId()
           
 boolean getWasGivenUp()
           
 boolean isWasFinished()
           
 boolean isWasGivenUp()
           
 void setBookId(String string)
           
 void setDurationSecs(int durationSecs)
           
 void setEndState(String endState)
           
 void setExerciseSystem(String exerciseSystem)
           
 void setItemId(String string)
           
 void setMetadataText(String xmltext)
           
 void setNumHints(int numHints)
           
 void setNumSteps(int value)
           
 void setSessionId(String string)
           
 void setSuccessRate(double successRate)
           
 void setUserId(String string)
           
 void setWasFinished(boolean wasFinished)
           
 void setWasGivenUp(boolean wasGivenUp)
           
 boolean wasFinished()
           
 boolean wasGivenup()
           
 
Methods inherited from class org.activemath.events.ActivemathEvent
compareTo, dispatchFinished, getGroupId, getId, getSource, getTimestamp, getType, setGroupId, setId, setSource, setTimestamp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.activemath.events.tags.UserEventTag
getGroupId, setGroupId
 

Field Detail

log

protected static Logger log

EVENT_TYPE

public static final String EVENT_TYPE
See Also:
Constant Field Values

FINISHED

public static final String FINISHED
See Also:
Constant Field Values

GAVE_UP

public static final String GAVE_UP
See Also:
Constant Field Values

UNFINISHED

public static final String UNFINISHED
See Also:
Constant Field Values

wasFinished

protected boolean wasFinished

wasGivenUp

protected boolean wasGivenUp
Constructor Detail

ExerciseRunEvent

public ExerciseRunEvent()

ExerciseRunEvent

public ExerciseRunEvent(String exerciseId,
                        double successRate,
                        int durationSecs,
                        int numSteps,
                        int numHints,
                        boolean wasGivenUp)
Constructor for direct event

Method Detail

getNumSteps

public int getNumSteps()

setNumSteps

public void setNumSteps(int value)

getNumHints

public int getNumHints()

setNumHints

public void setNumHints(int numHints)

getDurationSecs

public int getDurationSecs()

setDurationSecs

public void setDurationSecs(int durationSecs)

getSuccessRate

public double getSuccessRate()
Returns:
0.0..1.0, -1 if not finished

setSuccessRate

public void setSuccessRate(double successRate)

setWasGivenUp

public void setWasGivenUp(boolean wasGivenUp)

isWasGivenUp

public boolean isWasGivenUp()

wasGivenup

public boolean wasGivenup()

getWasGivenUp

public boolean getWasGivenUp()

wasFinished

public boolean wasFinished()

setWasFinished

public void setWasFinished(boolean wasFinished)

isWasFinished

public boolean isWasFinished()

getExerciseSystem

public String getExerciseSystem()

setExerciseSystem

public void setExerciseSystem(String exerciseSystem)

setEndState

public void setEndState(String endState)

getEndState

public String getEndState()

getMetadata

public List<org.jdom.Element> getMetadata()

getMetadataText

public String getMetadataText()

setMetadataText

public void setMetadataText(String xmltext)

getUserId

public String getUserId()
Specified by:
getUserId in interface UserEventTag

setUserId

public void setUserId(String string)
Specified by:
setUserId in interface UserEventTag

getSessionId

public String getSessionId()
Specified by:
getSessionId in interface SessionEventTag

setSessionId

public void setSessionId(String string)
Specified by:
setSessionId in interface SessionEventTag

getItemId

public String getItemId()
Specified by:
getItemId in interface ItemEventTag
Overrides:
getItemId in class ActivemathEvent

setItemId

public void setItemId(String string)
Specified by:
setItemId in interface ItemEventTag
Overrides:
setItemId in class ActivemathEvent

getBookId

public String getBookId()
Specified by:
getBookId in interface BookEventTag

setBookId

public void setBookId(String string)
Specified by:
setBookId in interface BookEventTag