org.activemath.exercises.openmath.services
Class LogicExpressionEvaluator

java.lang.Object
  extended by org.activemath.exercises.openmath.OpenMathService
      extended by org.activemath.exercises.openmath.services.LogicExpressionEvaluator

public class LogicExpressionEvaluator
extends OpenMathService

Logic expression evaluator OpenMath service. Evaluates OpenMath expressions with logic symbols in them.

Version:
$Revision: 1.7 $ $Date: 2006/07/16 21:53:26 $

Field Summary
 
Fields inherited from class org.activemath.exercises.openmath.OpenMathService
comparatorCD, comparatorName, context, expressionTransformer, om, xpathError, xpathHint, xpathQuit
 
Constructor Summary
LogicExpressionEvaluator()
           
 
Method Summary
 org.jdom.Element evaluate(org.jdom.Element expressionOmobj, Map variables)
          Evaluate the expression, and return its value as the JDom tree of the OpenMath XML with the result.
static void main(String[] args)
           
 
Methods inherited from class org.activemath.exercises.openmath.OpenMathService
abort, console, evaluateEquivalence, selectContext, setComparator, setExpressionTransformer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicExpressionEvaluator

public LogicExpressionEvaluator()
Method Detail

main

public static void main(String[] args)

evaluate

public org.jdom.Element evaluate(org.jdom.Element expressionOmobj,
                                 Map variables)
Evaluate the expression, and return its value as the JDom tree of the OpenMath XML with the result.

Overrides:
evaluate in class OpenMathService
Returns:
OMOBJ element (with OM namespace) containing the value.