All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface fr.inria.openmath.omapi.Printer

public interface Printer
Basic interface for OpenMath printers.

All OpenMath printers must implement this basic interface: it allows applications to output OpenMath objects.

See Also:
StreamPrinter

Method Index

 o endPrint()
Does what is needed when print has been completed.
 o putBeginApplication()
Puts begin of Application.
 o putBeginAttributePairs()
Puts begin of attribute-pairs.
 o putBeginAttribution()
Puts begin of Attribution.
 o putBeginBind()
Puts begin of Bind.
 o putBeginBVars()
Puts begin of BVars

Prints the begining marker of a new BVars on output.

 o putBeginError()
Puts begin of Error.
 o putBeginObject()
Puts begin of OpenMath object.
 o putByteArray(byte[])
Puts ByteArray element with its value.
 o putComment(String)
Puts Comment element with its value.
 o putEndApplication()
Puts the end of Application.
 o putEndAttributePairs()
Puts the end of attribute-pairs.
 o putEndAttribution()
Puts the end of Attribution.
 o putEndBind()
Puts the end of Bind.
 o putEndBVars()
Puts the end of BVars.
 o putEndError()
Puts the end of Error.
 o putEndObject()
Puts the end of OpenMath object.
 o putFloat(double)
Puts a floating-point number element with its value.
 o putFloat(double, int)
Puts a floating-point number element with its value.
 o putInteger(BigInteger)
Puts Integer element with its value.
 o putInteger(int)
Puts Integer element with its value.
 o putInteger(int, int)
Puts Integer element with its value.
 o putPInstruction(String)
Puts a Processing Instruction with its value.
 o putString(String)
Puts String element with its value.
 o putSymbol(Symbol)
Puts Symbol element with its value.
 o putVariable(String)
Puts Variable element with its value.

Methods

 o putBeginObject
 public abstract void putBeginObject() throws IOException
Puts begin of OpenMath object.

Prints the begining marker of a new OpenMath object on output. Must be called each time a new OpenMath object is to be printed. (Not before every token!)

Throws: IOException
Any I/O exception.
 o putEndObject
 public abstract void putEndObject() throws IOException
Puts the end of OpenMath object.

Prints the end marker of an OpenMath object on output. Must be called each time an OpenMath object is complete. (Not after every token!)

Throws: IOException
Any I/O exception.
 o putBeginApplication
 public abstract void putBeginApplication() throws IOException
Puts begin of Application.

Prints the begining marker of a new Application on output.

Throws: IOException
Any I/O exception.
 o putEndApplication
 public abstract void putEndApplication() throws IOException
Puts the end of Application.

Prints the end marker of an Application on output.

Throws: IOException
Any I/O exception.
 o putBeginAttribution
 public abstract void putBeginAttribution() throws IOException
Puts begin of Attribution.

Prints the begining marker of a new Attribution on output.

Throws: IOException
Any I/O exception.
 o putEndAttribution
 public abstract void putEndAttribution() throws IOException
Puts the end of Attribution.

Prints the end marker of an Attribution on output.

Throws: IOException
Any I/O exception.
 o putBeginAttributePairs
 public abstract void putBeginAttributePairs() throws IOException
Puts begin of attribute-pairs.

Prints the begining marker of a new attribute-oairs on output.

Throws: IOException
Any I/O exception.
 o putEndAttributePairs
 public abstract void putEndAttributePairs() throws IOException
Puts the end of attribute-pairs.

Prints the end marker of an attribute-pairs on output.

Throws: IOException
Any I/O exception.
 o putBeginBind
 public abstract void putBeginBind() throws IOException
Puts begin of Bind.

Prints the begining marker of a new Bind on output.

Throws: IOException
Any I/O exception.
 o putEndBind
 public abstract void putEndBind() throws IOException
Puts the end of Bind.

Prints the end marker of a Bind on output.

Throws: IOException
Any I/O exception.
 o putBeginBVars
 public abstract void putBeginBVars() throws IOException
Puts begin of BVars

Prints the begining marker of a new BVars on output.

Throws: IOException
Any I/O exception.
 o putEndBVars
 public abstract void putEndBVars() throws IOException
Puts the end of BVars.

Prints the end marker of a BVars on output.

Throws: IOException
Any I/O exception.
 o putBeginError
 public abstract void putBeginError() throws IOException
Puts begin of Error.

Prints the begining marker of a new Error on output.

Throws: IOException
Any I/O exception.
 o putEndError
 public abstract void putEndError() throws IOException
Puts the end of Error.

Prints the end marker of an Error on output.

Throws: IOException
Any I/O exception.
 o putInteger
 public abstract void putInteger(int value) throws IOException
Puts Integer element with its value.

Prints a Integer element and its value on the output stream. (if needed assumed base is 10.)

Parameters:
value - the embedded value for this element.
Throws: IOException
Any I/O exception.
 o putInteger
 public abstract void putInteger(int value,
                                 int base) throws IOException
Puts Integer element with its value.

Prints a Integer element and its value on the output stream.

Parameters:
value - the embedded value for this element.
base - the base to use if it is needed (eg: XML). 10 and 16 are supported.
Throws: IOException
Any I/O exception.
 o putInteger
 public abstract void putInteger(BigInteger value) throws IOException
Puts Integer element with its value.

Prints a Integer element and its value on the output stream.

Parameters:
value - the embedded value for this element.
Throws: IOException
Any I/O exception.
 o putFloat
 public abstract void putFloat(double value,
                               int base) throws IOException
Puts a floating-point number element with its value.

Prints a floating-point number element and its value on the output stream.

Parameters:
value - the embedded value for this element.
Throws: IOException
Any I/O exception.
 o putFloat
 public abstract void putFloat(double value) throws IOException
Puts a floating-point number element with its value.

Prints a floating-point number element and its value on the output stream.

Parameters:
value - the embedded value for this element. assumed base is 16
Throws: IOException
Any I/O exception.
 o putString
 public abstract void putString(String value) throws IOException
Puts String element with its value.

Prints a String element and its value on the output stream.

Parameters:
value - the embedded value for this element.
Throws: IOException
Any I/O exception.
 o putVariable
 public abstract void putVariable(String name) throws IOException
Puts Variable element with its value.

Prints a Variable element and its value on the output stream.

Parameters:
name - the name for this variable.
Throws: IOException
Any I/O exception.
 o putByteArray
 public abstract void putByteArray(byte value[]) throws IOException
Puts ByteArray element with its value.

Prints a ByteArray element and its value on the output stream.

Parameters:
value - the embedded value for this element.
Throws: IOException
Any I/O exception.
 o putSymbol
 public abstract void putSymbol(Symbol symbol) throws IOException
Puts Symbol element with its value.

Prints a Symbol element and its value on the output stream.

Parameters:
symbol - the symbol definition (CD and name).
Throws: IOException
Any I/O exception.
See Also:
Symbol
 o putComment
 public abstract void putComment(String comment) throws IOException
Puts Comment element with its value.

Prints a Comment element and its value on the output stream.

Parameters:
the - comment content.
Throws: IOException
Any I/O exception.
 o putPInstruction
 public abstract void putPInstruction(String pi) throws IOException
Puts a Processing Instruction with its value.

Prints a Processing Instruction and its value on the output stream.

Parameters:
the - comment content.
Throws: IOException
Any I/O exception.
 o endPrint
 public abstract void endPrint() throws IOException
Does what is needed when print has been completed.

It must be called when no more print is to be done on this printer.

Throws: IOException
Any I/O exception.

All Packages  Class Hierarchy  This Package  Previous  Next  Index