org.activemath.exercises.generators
Class DefaultGenerator

java.lang.Object
  extended by org.activemath.exercises.openmath.OpenMath
      extended by org.activemath.exercises.InteractionGenerator
          extended by org.activemath.exercises.generators.Static
              extended by org.activemath.exercises.generators.DefaultGenerator
Direct Known Subclasses:
FirstDepthHintStrategy

public class DefaultGenerator
extends Static


Nested Class Summary
 class DefaultGenerator.DefaultEvaluator
           
 
Field Summary
 boolean insertConfidenceCheck
           
 
Fields inherited from class org.activemath.exercises.generators.Static
initialNode
 
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
DefaultGenerator(LocalUserModel localUserModel)
           
 
Method Summary
 Evaluator getAnswerEvaluator()
          Provide an answer evaluator, if this generator requires a custom one.
 org.jdom.Element getInteraction()
          Produce the initial node, where the exercise really starts.
 org.jdom.Element getInteraction(String id)
          Produce an interaction element from the given ID attribute.
 boolean isImportantInteraction(org.jdom.Element interaction)
           
protected  void prepareInteraction(String id, org.jdom.Element interaction)
           
protected  void setConfidenceCheck(org.jdom.Element interaction)
           
 
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
 

Field Detail

insertConfidenceCheck

public boolean insertConfidenceCheck
Constructor Detail

DefaultGenerator

public DefaultGenerator(LocalUserModel localUserModel)
Method Detail

getInteraction

public org.jdom.Element getInteraction()
Description copied from class: Static
Produce the initial node, where the exercise really starts.

Overrides:
getInteraction in class Static
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: Static
Produce an interaction element from the given ID attribute.

Overrides:
getInteraction in class Static
Parameters:
id - value of the "id" attribute of the desired element.
Returns:
element found, or null.

isImportantInteraction

public boolean isImportantInteraction(org.jdom.Element interaction)

setConfidenceCheck

protected void setConfidenceCheck(org.jdom.Element interaction)

prepareInteraction

protected void prepareInteraction(String id,
                                  org.jdom.Element interaction)

getAnswerEvaluator

public Evaluator getAnswerEvaluator()
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.