fr.ove.openmath.jome.formaters.om
Class OpenMathFormater

java.lang.Object
  extended byfr.ove.utils.FormaterRepository
      extended byfr.ove.openmath.jome.formaters.om.OpenMathFormater
All Implemented Interfaces:
Formater

public class OpenMathFormater
extends FormaterRepository

Formats the formula tree structure as its corresponding OpenMath object.

Version:
1.0 07/01/2000
Author:
© 2000 DIRAT Laurent

Constructor Summary
OpenMathFormater()
           
 
Method Summary
 java.lang.String format(java.lang.String formatedObject, FormaterRepository formaterRepository, java.lang.Object obj)
          Returns the specified object formatted as a string.
 java.lang.String getCdName(java.lang.String objectId)
          Returns the cd name of the specified property.
 Formater getFormater(java.lang.String objectId)
          Returns the formater with the specified identifier.
 java.lang.String getOpenMath(FormulaTreeStructure fts)
          Returns the OpenMath object of the specified formula tree structure.
 java.lang.String getSymbolName(java.lang.String objectId)
          Returns the symbol name of the specified property.
static void main(java.lang.String[] args)
          Test.
 java.lang.String writeEndApplication()
          Writes the OpenMath end application tag.
 java.lang.String writeEndAttributePair()
          Writes the OpenMath end attribute pair tag.
 java.lang.String writeEndAttribution()
          Writes the OpenMath end attribution tag.
 java.lang.String writeEndBinding()
          Writes the OpenMath end binding tag.
 java.lang.String writeEndBoundVariables()
          Writes the OpenMath end bound variables tag.
 java.lang.String writeEndError()
          Writes the OpenMath end error tag.
 java.lang.String writeEndObject()
          Writes the OpenMath end object tag.
 java.lang.String writeFloat(java.lang.String value)
          Writes a float (decimal format, not hexa).
 java.lang.String writeInteger(java.lang.String value)
          Writes an integer (decimal format, not hexa)
 java.lang.String writeStartApplication()
          Writes the OpenMath start application tag.
 java.lang.String writeStartAttributePair()
          Writes the OpenMath start attribute pair tag.
 java.lang.String writeStartAttribution()
          Writes the OpenMath start attribution tag.
 java.lang.String writeStartBinding()
          Writes the OpenMath start binding tag.
 java.lang.String writeStartBoundVariables()
          Writes the OpenMath start bound variables tag.
 java.lang.String writeStartError()
          Writes the OpenMath start error tag.
 java.lang.String writeStartObject()
          Writes the OpenMath start object tag.
 java.lang.String writeSymbol(java.lang.String objectId)
          Writes the symbol with the specified identifier.
 java.lang.String writeSymbol(java.lang.String cdName, java.lang.String symbName)
          Writes the specified symbol.
 java.lang.String writeVariable(java.lang.String value)
          Writes a variable.
 
Methods inherited from class fr.ove.utils.FormaterRepository
decIndent, getIndent, incIndent, initIndent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenMathFormater

public OpenMathFormater()
Method Detail

getFormater

public Formater getFormater(java.lang.String objectId)
Returns the formater with the specified identifier.

Specified by:
getFormater in class FormaterRepository
Parameters:
objectId - the object (to format) identifier.

format

public java.lang.String format(java.lang.String formatedObject,
                               FormaterRepository formaterRepository,
                               java.lang.Object obj)
Returns the specified object formatted as a string.

Parameters:
formatedObject - the formatted object (for structured object, could represents the beginning).
obj - the object to format.
formaterRepository - where the different other formaters are.

getCdName

public java.lang.String getCdName(java.lang.String objectId)
Returns the cd name of the specified property.

Parameters:
objectId - the object (to format) identifier.

getSymbolName

public java.lang.String getSymbolName(java.lang.String objectId)
Returns the symbol name of the specified property.

Parameters:
objectId - the object (to format) identifier.

getOpenMath

public java.lang.String getOpenMath(FormulaTreeStructure fts)
Returns the OpenMath object of the specified formula tree structure.

Parameters:
fts - the specified formula tree structure.

writeStartObject

public java.lang.String writeStartObject()
Writes the OpenMath start object tag.

Returns:
the tag.

writeEndObject

public java.lang.String writeEndObject()
Writes the OpenMath end object tag.

Returns:
the tag.

writeStartApplication

public java.lang.String writeStartApplication()
Writes the OpenMath start application tag.

Returns:
the tag.

writeEndApplication

public java.lang.String writeEndApplication()
Writes the OpenMath end application tag.

Returns:
the tag.

writeStartError

public java.lang.String writeStartError()
Writes the OpenMath start error tag.

Returns:
the tag.

writeEndError

public java.lang.String writeEndError()
Writes the OpenMath end error tag.

Returns:
the tag.

writeStartBinding

public java.lang.String writeStartBinding()
Writes the OpenMath start binding tag.

Returns:
the tag.

writeEndBinding

public java.lang.String writeEndBinding()
Writes the OpenMath end binding tag.

Returns:
the tag.

writeStartBoundVariables

public java.lang.String writeStartBoundVariables()
Writes the OpenMath start bound variables tag.

Returns:
the tag.

writeEndBoundVariables

public java.lang.String writeEndBoundVariables()
Writes the OpenMath end bound variables tag.

Returns:
the tag.

writeStartAttribution

public java.lang.String writeStartAttribution()
Writes the OpenMath start attribution tag.

Returns:
the tag.

writeEndAttribution

public java.lang.String writeEndAttribution()
Writes the OpenMath end attribution tag.

Returns:
the tag.

writeStartAttributePair

public java.lang.String writeStartAttributePair()
Writes the OpenMath start attribute pair tag.

Returns:
the tag.

writeEndAttributePair

public java.lang.String writeEndAttributePair()
Writes the OpenMath end attribute pair tag.

Returns:
the tag.

writeFloat

public java.lang.String writeFloat(java.lang.String value)
Writes a float (decimal format, not hexa).

Parameters:
value - the float value.

writeInteger

public java.lang.String writeInteger(java.lang.String value)
Writes an integer (decimal format, not hexa)

Parameters:
value - the integer value.

writeVariable

public java.lang.String writeVariable(java.lang.String value)
Writes a variable.

Parameters:
value - the variable value.

writeSymbol

public java.lang.String writeSymbol(java.lang.String objectId)
Writes the symbol with the specified identifier.

Parameters:
objectId - the identifier of the symbol to write.

writeSymbol

public java.lang.String writeSymbol(java.lang.String cdName,
                                    java.lang.String symbName)
Writes the specified symbol.

Parameters:
cdName - the name of the symbol CD.
symbName - thename of the symbol.

main

public static void main(java.lang.String[] args)
Test.



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