|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.omdocjdom.mbase.Heuristics
public class Heuristics
An extensiion of OJElement to contain the heuristics to resolve
references.
| Constructor Summary | |
|---|---|
Heuristics()
|
|
| Method Summary | |
|---|---|
static void |
fillUpTableFromDocument(ElementFromIDTable table,
OJDocument doc)
Walks through the given document and finds all the nodes that have an attribute id and insert their entry
into the table. |
static ID |
resolveID(String idString,
ElementFromIDTable table,
MBaseErrorReporter errorReporter,
OJElement referringElement)
This method and resolveRef(org.activemath.omdocjdom.PointerElement, org.activemath.omdocjdom.mbase.ElementFromIDTable, org.activemath.omdocjdom.mbase.MBaseErrorReporter) contain all the heuristic needed for the current adaptation
and this should disappear as soon as possible. |
static ID |
resolveRef(PointerElement refElt,
ElementFromIDTable table,
MBaseErrorReporter errorReporter)
This method and resolveID(java.lang.String, org.activemath.omdocjdom.mbase.ElementFromIDTable, org.activemath.omdocjdom.mbase.MBaseErrorReporter, org.activemath.omdocjdom.OJElement) contain all the heuristic needed for the current adaptation
and this should disappear as soon as possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Heuristics()
| Method Detail |
|---|
public static ID resolveRef(PointerElement refElt,
ElementFromIDTable table,
MBaseErrorReporter errorReporter)
throws NoSuchIDException
resolveID(java.lang.String, org.activemath.omdocjdom.mbase.ElementFromIDTable, org.activemath.omdocjdom.mbase.MBaseErrorReporter, org.activemath.omdocjdom.OJElement) contain all the heuristic needed for the current adaptation
and this should disappear as soon as possible. It might even serve only as a transition.
It tries to find, in the table, in the following order, the referenced element:
resolveID(java.lang.String, org.activemath.omdocjdom.mbase.ElementFromIDTable, org.activemath.omdocjdom.mbase.MBaseErrorReporter, org.activemath.omdocjdom.OJElement)
refElement - The reference element supposed to be a child of this onetable - The table to check that referred elements existerrorReporter - Use to report errors and (optionally) to raise exceptions
NoSuchIDException
public static ID resolveID(String idString,
ElementFromIDTable table,
MBaseErrorReporter errorReporter,
OJElement referringElement)
throws NoSuchIDException
resolveRef(org.activemath.omdocjdom.PointerElement, org.activemath.omdocjdom.mbase.ElementFromIDTable, org.activemath.omdocjdom.mbase.MBaseErrorReporter) contain all the heuristic needed for the current adaptation
and this should disappear as soon as possible. It might even serve only as a transition.
It tries to find, in the table, in the following order, the referenced eleemnt:
ID.makeRelativeID(org.activemath.omdocjdom.ID, java.lang.String)
NoSuchIDException
public static void fillUpTableFromDocument(ElementFromIDTable table,
OJDocument doc)
id and insert their entry
into the table.
This method also contains a bit of heuristic as it inserts in the table for each element with id not only the full-fledged id, it also inserts a theory-less ID with value the value of the mid= attribute, if any, and another theory-less id with the value of the id. It would be urgent to fix this.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||