|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.exercises.openmath.OpenMathService
public class OpenMathService
OpenMathService root class.
| Field Summary | |
|---|---|
protected String |
comparatorCD
|
protected String |
comparatorName
|
protected String |
context
|
protected ExpressionTransformer |
expressionTransformer
|
protected static OpenMath |
om
|
protected static org.jdom.xpath.XPath |
xpathError
|
protected static org.jdom.xpath.XPath |
xpathHint
|
protected static org.jdom.xpath.XPath |
xpathQuit
|
| Constructor Summary | |
|---|---|
OpenMathService()
|
|
| Method Summary | |
|---|---|
protected static void |
abort(String message)
Abort and display a critical error to the user, by throwing a RuntimeException. |
static void |
console(String[] args,
OpenMathService service)
|
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. |
boolean |
evaluateEquivalence(org.jdom.Element a,
org.jdom.Element b,
Map variables)
Test whether two expressions are equivalent. |
boolean |
selectContext(String context)
Select the evaluation context. |
void |
setComparator(String cd,
String name)
Set the OpenMath symbol for the comparison operator. |
void |
setExpressionTransformer(ExpressionTransformer transformer)
Set the expression transformer applied to the input and/or output of the service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static OpenMath om
protected static final org.jdom.xpath.XPath xpathQuit
protected static final org.jdom.xpath.XPath xpathHint
protected static final org.jdom.xpath.XPath xpathError
protected String context
protected String comparatorCD
protected String comparatorName
protected ExpressionTransformer expressionTransformer
| Constructor Detail |
|---|
public OpenMathService()
| Method Detail |
|---|
public static void console(String[] args,
OpenMathService service)
public boolean selectContext(String context)
contextName - name of the context
public org.jdom.Element evaluate(org.jdom.Element expressionOmobj,
Map variables)
public boolean evaluateEquivalence(org.jdom.Element a,
org.jdom.Element b,
Map variables)
public void setComparator(String cd,
String name)
cd - OpenMath Content Dictionary for the comparator symbol.name - OpenMath symbol name for the comparator symbol.public void setExpressionTransformer(ExpressionTransformer transformer)
transformer - instance of the expression transformer. Can be null.protected static void abort(String message)
message - description of the problem.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||