fr.ove.openmath.jome.model.processor
Class ProcessorImpl

java.lang.Object
  extended byfr.ove.openmath.jome.model.processor.ProcessorImpl
All Implemented Interfaces:
Processor
Direct Known Subclasses:
DepthProcessor, WidthDepthProcessor, WidthProcessor

public class ProcessorImpl
extends java.lang.Object
implements Processor

An implementation of a @see Processor.
The method doProcess does nothing. Subclasses have to, at least, override it to provide the desired processing.

Version:
1.0 17/08/2000
Author:
© 2000 DIRAT Laurent

Field Summary
static int COMPUTE
          Compute the the necessaru stuff for the iconifcation of the formula.
static int COMPUTE_AND_ICONIFY
          Compute and iconify (recursivly) the formula according to the iconification level fixed.
static int RECURSIVE_ICONIFICATION
          Iconify the formula according to the iconification level fixed.
static int SIMPLE_ICONIFICATION
          Iconify the formula according to the iconification level fixed.
 
Constructor Summary
ProcessorImpl(Formula formula)
          The constructor.
 
Method Summary
 void doProcess()
          Does processing.
 Formula getFormula()
          Returns the formula to process.
 int getLevel()
          Returns the level from which the processing starts.
 int getProcessingId()
          Returns the current processing to execute.
 boolean getUpdateDisplay()
          Checks if, after processing the formula, the display has to be updated.
 void init()
          Initialisation of the processor. !!
 void setFormula(Formula formula)
          Sets the formula to processs.
 void setLevel(int level)
          Sets the level from which the processing starts.
 void setProcessingId(int processingId)
          Sets the processing to execute.
 void setUpdateDisplay(boolean updateDisplay)
          Specifies if, after processing the formula, the display has to be updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPUTE

public static final int COMPUTE
Compute the the necessaru stuff for the iconifcation of the formula.

See Also:
Constant Field Values

SIMPLE_ICONIFICATION

public static final int SIMPLE_ICONIFICATION
Iconify the formula according to the iconification level fixed.
We assume the necessary computation for the iconification of the formula was previously done.
This is a simple iconification process. Subtrees of iconfied ones are not iconified.

See Also:
Constant Field Values

RECURSIVE_ICONIFICATION

public static final int RECURSIVE_ICONIFICATION
Iconify the formula according to the iconification level fixed.
We assume the necessary computation for the iconification of the formula was previously done.
This is a recursive iconification process. Subtrees of iconfied ones are also iconified.

See Also:
Constant Field Values

COMPUTE_AND_ICONIFY

public static final int COMPUTE_AND_ICONIFY
Compute and iconify (recursivly) the formula according to the iconification level fixed.
This is the default behaviour.

See Also:
Constant Field Values
Constructor Detail

ProcessorImpl

public ProcessorImpl(Formula formula)
The constructor.

Parameters:
formula - the formula to process.
Method Detail

doProcess

public void doProcess()
Does processing.
!! Method to override by subclasses !!

Specified by:
doProcess in interface Processor

setFormula

public void setFormula(Formula formula)
Sets the formula to processs.

Specified by:
setFormula in interface Processor

getFormula

public Formula getFormula()
Returns the formula to process.

Specified by:
getFormula in interface Processor

setUpdateDisplay

public void setUpdateDisplay(boolean updateDisplay)
Specifies if, after processing the formula, the display has to be updated.

Specified by:
setUpdateDisplay in interface Processor
Parameters:
updateDisplay - true if the display needs update. false otherwise.

getUpdateDisplay

public boolean getUpdateDisplay()
Checks if, after processing the formula, the display has to be updated.

Specified by:
getUpdateDisplay in interface Processor

init

public void init()
Initialisation of the processor. !! Method to override by subclasses !! The default is just setting the processing Id to be COMPUTE_AND_ICONIFY;

Specified by:
init in interface Processor

setProcessingId

public void setProcessingId(int processingId)
Sets the processing to execute.

Specified by:
setProcessingId in interface Processor
Parameters:
processingId - the processing Id.

getProcessingId

public int getProcessingId()
Returns the current processing to execute.

Specified by:
getProcessingId in interface Processor

setLevel

public void setLevel(int level)
Sets the level from which the processing starts.

Specified by:
setLevel in interface Processor
Parameters:
level - the level.

getLevel

public int getLevel()
Returns the level from which the processing starts.

Specified by:
getLevel in interface Processor


Copyright © 1999-2007 Universit?© de Nice Sophia-Antipolis, I3S, Ove SARL, DFKI and Universit?§t des Saarlandes. All Rights Reserved.