All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fr.inria.openmath.omapi.ParserAdapter

java.lang.Object
   |
   +----fr.inria.openmath.omapi.ParserAdapter

public class ParserAdapter
extends Object
implements ParserHandler
Default base class for ParserHandlers.

This class implements the default behaviour for ParserHandler.

Application writers can extend this class when they need to implement only part of an interface; parser writers can instantiate this class to provide default handlers when the application has not supplied its own.

Note that the use of this class is optional.

See Also:
ParserHandler

Constructor Index

 o ParserAdapter()

Method Index

 o endApplication()
Receives notification of the end of an application element.
 o endAttributePairs()
Receives notification of the end of an attribute-pairs element.
 o endAttribution()
Receives notification of the end of an attribution element.
 o endBind()
Receives notification of the beginning of a Bind element.
 o endBVars()
Receives notification of the beginning of a BVars element.
 o endError()
Receives notification of the end of an error element.
 o endObject()
Receives notification of the end of an object element.
 o endParse()
Receives notification of the end of parse.
 o readByteArray(byte[])
Receives notification of a byteArray element.
 o readComment(String)
Receives notification of a comment element.
 o readFloat(double)
Receives notification of a floating-point number element.
 o readInteger(BigInteger)
Receives notification of a Big Integer element.
 o readInteger(int)
Receives notification of an Integer element.
 o readPInstruction(String)
Receives notification of a processing instruction.
 o readString(String)
Receives notification of a string element.
 o readSymbol(Symbol)
Receives notification of a symbol element.
 o readVariable(String)
Receives notification of a variable element.
 o setLocator(Locator)
Receives a Locator for parse events.
 o startApplication()
Receives notification of the beginning of a application element.
 o startAttributePairs()
Receives notification of the beginning of an attribute-pairs element.
 o startAttribution()
Receives notification of the beginning of a attribution element.
 o startBind()
Receives notification of the beginning of a Bind element.
 o startBVars()
Receives notification of the beginning of a BVars element.
 o startError()
Receives notification of the beginning of a error element.
 o startObject()
Receives notification of the beginning of a object element.
 o startParse()
Receives notification of the beginning of parse (of a set of OpenMath-objects).

Constructors

 o ParserAdapter
 public ParserAdapter()

Methods

 o setLocator
 public void setLocator(Locator locator)
Receives a Locator for parse events.

By default, do nothing. Application writers may override this method in a subclass if they wish to store the locator for use with other events.

Parameters:
locator - A locator for all OpenMath parse events.
See Also:
setLocator, Locator
 o startParse
 public void startParse() throws OMException
Receives notification of the beginning of parse (of a set of OpenMath-objects).

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
 o endParse
 public void endParse() throws OMException
Receives notification of the end of parse.

By default, do nothing. Application writers may override this method in a subclass.

The OpenMath parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of the input (no more OpenMath objects).

Throws: OMException
Any OpenMath exception.
 o startObject
 public void startObject() throws OMException
Receives notification of the beginning of a object element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
endObject
 o endObject
 public void endObject() throws OMException
Receives notification of the end of an object element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
startObject
 o startApplication
 public void startApplication() throws OMException
Receives notification of the beginning of a application element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
endApplication
 o endApplication
 public void endApplication() throws OMException
Receives notification of the end of an application element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
startApplication
 o startAttribution
 public void startAttribution() throws OMException
Receives notification of the beginning of a attribution element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
endAttribution
 o endAttribution
 public void endAttribution() throws OMException
Receives notification of the end of an attribution element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
startAttribution
 o startAttributePairs
 public void startAttributePairs() throws OMException
Receives notification of the beginning of an attribute-pairs element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
endAttributePairs
 o endAttributePairs
 public void endAttributePairs() throws OMException
Receives notification of the end of an attribute-pairs element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
startAttribution
 o startBind
 public void startBind() throws OMException
Receives notification of the beginning of a Bind element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
endBind
 o startBVars
 public void startBVars() throws OMException
Receives notification of the beginning of a BVars element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
endBVars
 o endBind
 public void endBind() throws OMException
Receives notification of the beginning of a Bind element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
endBind
 o endBVars
 public void endBVars() throws OMException
Receives notification of the beginning of a BVars element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
startBVars
 o startError
 public void startError() throws OMException
Receives notification of the beginning of a error element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
endError
 o endError
 public void endError() throws OMException
Receives notification of the end of an error element.

By default, do nothing. Application writers may override this method in a subclass.

Throws: OMException
Any OpenMath exception.
See Also:
startError
 o readInteger
 public void readInteger(int value) throws OMException
Receives notification of an Integer element.

By default, do nothing. Application writers may override this method in a subclass.

Parameters:
value - the value embedded in this Integer element.
Throws: OMException
Any OpenMath exception.
 o readInteger
 public void readInteger(BigInteger value) throws OMException
Receives notification of a Big Integer element.

By default, do nothing. Application writers may override this method in a subclass.

Parameters:
value - the value embedded in this Integer element. This is an infinite precision integer.
Throws: OMException
Any OpenMath exception.
 o readFloat
 public void readFloat(double value) throws OMException
Receives notification of a floating-point number element.

By default, do nothing. Application writers may override this method in a subclass.

Parameters:
value - the value embedded in this Float element.
Throws: OMException
Any OpenMath exception.
 o readString
 public void readString(String value) throws OMException
Receives notification of a string element.

By default, do nothing. Application writers may override this method in a subclass.

Parameters:
value - the value embedded in this String element.
Throws: OMException
Any OpenMath exception.
 o readVariable
 public void readVariable(String name) throws OMException
Receives notification of a variable element.

By default, do nothing. Application writers may override this method in a subclass.

Parameters:
name - the name of this Variable element.
Throws: OMException
Any OpenMath exception.
 o readByteArray
 public void readByteArray(byte value[]) throws OMException
Receives notification of a byteArray element.

By default, do nothing. Application writers may override this method in a subclass.

Parameters:
value - the value embedded in this ByteArray element.
Throws: OMException
Any OpenMath exception.
 o readSymbol
 public void readSymbol(Symbol value) throws OMException
Receives notification of a symbol element.

By default, do nothing. Application writers may override this method in a subclass.

Parameters:
value - the value embedded in this Symbol element.
Throws: OMException
Any OpenMath exception.
See Also:
Symbol
 o readComment
 public void readComment(String value) throws OMException
Receives notification of a comment element.

By default, do nothing. Application writers may override this method in a subclass.

Parameters:
value - the value embedded in this Comment element.
Throws: OMException
Any OpenMath exception.
See Also:
Comment
 o readPInstruction
 public void readPInstruction(String value) throws OMException
Receives notification of a processing instruction.

The Parser will invoke this method each time a processing instruction is parsed.

Parameters:
value - the value embedded in this Processing Instruction element.
Throws: OMException
Any OpenMath exception.

All Packages  Class Hierarchy  This Package  Previous  Next  Index