|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.presentation.preproc.RefEncoderTask
public class RefEncoderTask
This tasks applies an escaping of characters on all declared id values and references so that they can be used in the middle of URLs and URL parameters.
| Field Summary | |
|---|---|
static String |
CVS_ID
|
static boolean |
DEBUG
|
static TaskFactory |
factory
|
static Task |
soleInstance
|
protected static Logger |
thisLogCat
|
| Constructor Summary | |
|---|---|
RefEncoderTask()
|
|
| Method Summary | |
|---|---|
void |
close()
Invoked by the pre-processor at the end of PreProcessor.run(org.jdom.Element, java.util.Map). |
static String |
deEscape(String s)
|
static void |
escapeAtt(org.jdom.Attribute att)
Escapes the attribute value given so that it can be a part of a URL parameter. |
static TaskFactory |
giveFactory()
Simply returns the same factory which, itself, returns the only task instance as this task is purely functional. |
static void |
makeSureIDAttIsAbsolute(org.jdom.Attribute att)
|
static void |
makeSureRefAttIsAbsolute(org.jdom.Attribute att)
|
void |
open()
Invoked by the pre-processor at the beginning of PreProcessor.run(org.jdom.Element, java.util.Map). |
boolean |
perform(ListIterator listIt,
org.jdom.Element elt,
Map properties)
Invoked by the pre-processor on an element elt to be processed by the task. |
| 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 TaskFactory factory
public static final Task soleInstance
| Constructor Detail |
|---|
public RefEncoderTask()
| Method Detail |
|---|
public static TaskFactory giveFactory()
public void open()
TaskPreProcessor.run(org.jdom.Element, java.util.Map).
open in interface Taskpublic void close()
TaskPreProcessor.run(org.jdom.Element, java.util.Map).
close in interface Task
public boolean perform(ListIterator listIt,
org.jdom.Element elt,
Map properties)
Task
Modifications like replacing, removing or adding an element to the parent of elt
should only be performed using the currentPos list-iterator (and, as of this writing,
such an operation would fail with JDOM b7 unless your element objects are OJElements.
This will be fixed in further release of JDOM).
A task performance should not throw an exception unless the task cannot continue walking the subelements.
perform in interface TasklistIt - 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 static final void escapeAtt(org.jdom.Attribute att)
org.activemath.Utilities, maybe later a simple escape of "/"
public static final void makeSureIDAttIsAbsolute(org.jdom.Attribute att)
public static final void makeSureRefAttIsAbsolute(org.jdom.Attribute att)
public static final String deEscape(String s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||