|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.presentation.preproc.SymbolDeclarationsTask
public class SymbolDeclarationsTask
This stateful task is responsible for the insertion the symbol pseudo-declarations at the end of the element being processed for all the symbols that appear inside the named element (as OMS elements) so that the presentation can show the title of the symbol under the mouse. At close time, this list is inserted.
This task assumes that the JDOM objects are, actually, of the package org.activemath.omdocjdom
and uses the facilities of OJoms, considered
to be a reference element.
The symbol pseudo declarations are mock-up symbol declarations, they are
made as elements symbolForCommonName, in
the ActiveMath internal namespace (OJConstants.AM_INTERNAL_NS).
The attributes are ID (an absolute ID), name and theory, the sole children
are the OJConstants.ELNM_commonname elements extracted from the database.
| Field Summary | |
|---|---|
static String |
CVS_ID
|
static boolean |
DEBUG
|
static org.jdom.output.XMLOutputter |
debugOutputter
|
MBaseRef |
mbaseRef
|
List |
omss
the list pointing to all OMS elements |
org.jdom.Element |
root
|
protected static Logger |
thisLogCat
|
| Constructor Summary | |
|---|---|
SymbolDeclarationsTask(org.jdom.Element root,
MBaseRef mbaseRef)
|
|
| Method Summary | |
|---|---|
void |
close()
Performs the actual insertion of symbol-declarations which are fetched from MBase. |
static TaskFactory |
giveFactory(MBaseRef mbaseRef)
|
void |
open()
Invoked by the pre-processor at the beginning of PreProcessor.run(org.jdom.Element, java.util.Map). |
boolean |
perform(ListIterator kidsIt,
org.jdom.Element elt,
Map properties)
Inserts a reference to the OMS (if it is one) in the list, otherwise returns to continue deeper. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CVS_ID
protected static Logger thisLogCat
public static final boolean DEBUG
public static final org.jdom.output.XMLOutputter debugOutputter
public final org.jdom.Element root
public final MBaseRef mbaseRef
public final List omss
| Constructor Detail |
|---|
public SymbolDeclarationsTask(org.jdom.Element root,
MBaseRef mbaseRef)
| Method Detail |
|---|
public static TaskFactory giveFactory(MBaseRef mbaseRef)
public void open()
TaskPreProcessor.run(org.jdom.Element, java.util.Map).
open in interface Task
public boolean perform(ListIterator kidsIt,
org.jdom.Element elt,
Map properties)
perform in interface TaskkidsIt - the iterator of all elements child of the same parent, currently enumerating this element
may be null in which case the parent was not enumerated
(i.e. when elt is the element called on PreProcessor.run(org.jdom.Element, java.util.Map).elt - the element to processproperties - An object that lives during the performance and can be used to extract and
store states and parameters for the processing action. Typical values include
the user and session (as string in keys and value). Properties are passed
at startup (i.e. in TaskFactory.make(org.jdom.Element, java.util.Map) and at each perform, they are
the same object throughout.public void close()
close in interface Task
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||