fr.ove.openmath.jome.formaters.pmml
Class PMathMLFormater

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

public class PMathMLFormater
extends FormaterRepository

Formats the formula tree structure as its corresponding MathML object.

Version:
1.0 23/05/2000
Author:
© 2000 DIRAT Laurent

Constructor Summary
PMathMLFormater()
           
 
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 getElementName(java.lang.String objectId)
          Returns the element name of the specified property.
 Formater getFormater(java.lang.String objectId)
          Returns the formater with the specified identifier.
 java.lang.String getPMML(FormulaTreeStructure fts)
          Returns the MathML object of the specified formula tree structure.
 java.lang.String getSymbolName(java.lang.String objectId)
           
static void main(java.lang.String[] args)
          Test.
 java.lang.String writeEmptyElement(java.lang.String elementName)
          Writes the empty element with the specified name.
 java.lang.String writeEndBoundVariables()
          Writes the MathML end bound variables tag.
 java.lang.String writeEndElement(java.lang.String elementName)
          Writes the end element with the specified name.
 java.lang.String writeEndGroup()
          Writes the MathML end application tag.
 java.lang.String writeEndLambda()
          Writes the MathML end lambda tag.
 java.lang.String writeEndObject()
          Writes the MathML end object tag.
 java.lang.String writeFloat(java.lang.String value)
          Writes a float (decimal format, not hexa).
 java.lang.String writeIdentifier(java.lang.String value)
          Writes an identifier.
 java.lang.String writeIdentifier(java.lang.String value, boolean isCrossRef)
           
 java.lang.String writeInteger(java.lang.String value)
          Writes an integer (decimal format, not hexa)
 java.lang.String writeStartBoundVariables()
          Writes the MathML start bound variables tag.
 java.lang.String writeStartElement(java.lang.String elementName)
          Writes the start element with the specified name.
 java.lang.String writeStartGroup()
          Writes the MathML start application tag.
 java.lang.String writeStartLambda()
          Writes the MathML start lambda tag.
 java.lang.String writeStartObject()
          Writes the MathML start object tag.
 java.lang.String writeSymbol(java.lang.String objectId, boolean isCrossRef)
          Writes the symbol element with the specified identifier.
 java.lang.String writeSymbolName(java.lang.String objectId, boolean isCrossRef)
           
 
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

PMathMLFormater

public PMathMLFormater()
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.

getElementName

public java.lang.String getElementName(java.lang.String objectId)
Returns the element name of the specified property.

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

getPMML

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

Parameters:
fts - the specified formula tree structure.

getSymbolName

public java.lang.String getSymbolName(java.lang.String objectId)

writeStartObject

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

Returns:
the tag.

writeEndObject

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

Returns:
the tag.

writeStartGroup

public java.lang.String writeStartGroup()
Writes the MathML start application tag.

Returns:
the tag.

writeEndGroup

public java.lang.String writeEndGroup()
Writes the MathML end application tag.

Returns:
the tag.

writeStartLambda

public java.lang.String writeStartLambda()
Writes the MathML start lambda tag.

Returns:
the tag.

writeEndLambda

public java.lang.String writeEndLambda()
Writes the MathML end lambda tag.

Returns:
the tag.

writeStartBoundVariables

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

Returns:
the tag.

writeEndBoundVariables

public java.lang.String writeEndBoundVariables()
Writes the MathML end bound variables 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.

writeIdentifier

public java.lang.String writeIdentifier(java.lang.String value)
Writes an identifier.

Parameters:
value - the identifier value.

writeIdentifier

public java.lang.String writeIdentifier(java.lang.String value,
                                        boolean isCrossRef)

writeSymbol

public java.lang.String writeSymbol(java.lang.String objectId,
                                    boolean isCrossRef)
Writes the symbol element with the specified identifier.


writeSymbolName

public java.lang.String writeSymbolName(java.lang.String objectId,
                                        boolean isCrossRef)

writeEmptyElement

public java.lang.String writeEmptyElement(java.lang.String elementName)
Writes the empty element with the specified name.

Parameters:
elementName - the name of the element to write.

writeStartElement

public java.lang.String writeStartElement(java.lang.String elementName)
Writes the start element with the specified name.

Parameters:
elementName - the name of the element to write.

writeEndElement

public java.lang.String writeEndElement(java.lang.String elementName)
Writes the end element with the specified name.

Parameters:
elementName - the name of the element to write.

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.