org.activemath.exercises.generators
Class MathDoxInteractionManager

java.lang.Object
  extended by org.activemath.exercises.openmath.OpenMath
      extended by org.activemath.exercises.InteractionGenerator
          extended by org.activemath.exercises.generators.MathDoxInteractionManager

public class MathDoxInteractionManager
extends InteractionGenerator


Nested Class Summary
 class MathDoxInteractionManager.MathDoxEvaluator
           
 
Field Summary
 
Fields inherited from class org.activemath.exercises.InteractionGenerator
activemathNamespace, dublinCoreNamespace, exercise, exerciseId, knownInteractions, lang, localUserModel, localUserModelActive, masterGenerator, om, omdocNamespace, openmathNamespace, parameters, presentationStrategy, serializer, session, theoryId
 
Constructor Summary
MathDoxInteractionManager(LocalUserModel localUserModel)
          Interaction Generator for Mathdox Exercises.
 
Method Summary
 Evaluator getAnswerEvaluator()
          Provide an answer evaluator, if this generator requires a custom one.
 org.jdom.Element getInteraction()
          connect to mathdox service to get the first interaction
 org.jdom.Element getInteraction(String id)
          Produce an interaction element from the given ID attribute.
 org.jdom.Element makeSystemErrorInteraction()
          interaction reporting a system error, reserved for mathdox communication error
 
Methods inherited from class org.activemath.exercises.InteractionGenerator
abort, getExerciseDocument, getExerciseId, getFeedback, getName, getParameters, getPresentationStrategy, getSession, getTheoryId, hasAnswerMap, isStrategy, setExerciseDocument, setExerciseId, setIsStrategy, setLang, setMasterGenerator, setName, setParameters, setPresentationStrategy, setSession, setTheoryId
 
Methods inherited from class org.activemath.exercises.openmath.OpenMath
applyBinding, getOmobjContents, oma, oma, oma, oma, oma, ombind, ombind, ombind, ombind, ombind, ombvar, ombvar, ombvar, ombvar, ome, ome, ome, ome, omf, omf, omi, omi, omobj, oms, omstr, omv, output, setOmNamespace, substituteVariables, tidyForOpenMath1, toDouble, toInt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathDoxInteractionManager

public MathDoxInteractionManager(LocalUserModel localUserModel)
Interaction Generator for Mathdox Exercises. Communicates with Mathdox repository for obtaining each step of a given exercise

Method Detail

getInteraction

public org.jdom.Element getInteraction()
connect to mathdox service to get the first interaction

Overrides:
getInteraction in class InteractionGenerator
Returns:
JDOM element. Can be null only if the exercise item doesn't have a root element.

getInteraction

public org.jdom.Element getInteraction(String id)
Description copied from class: InteractionGenerator
Produce an interaction element from the given ID attribute. TODO: document here the basic structure of an interaction element.

Overrides:
getInteraction in class InteractionGenerator
Parameters:
interaction - id
Returns:
element found, or null.

makeSystemErrorInteraction

public org.jdom.Element makeSystemErrorInteraction()
interaction reporting a system error, reserved for mathdox communication error

Returns:
interaction element containing error message

getAnswerEvaluator

public Evaluator getAnswerEvaluator()
Description copied from class: InteractionGenerator
Provide an answer evaluator, if this generator requires a custom one. Normally it would be enough with the default evaluator.

Overrides:
getAnswerEvaluator in class InteractionGenerator
Returns:
Evaluator object.