All Packages Class Hierarchy This Package Previous Next Index
This is the main interface that most OpenMath applications implement: if the application needs to be informed of basic parsing events (token level), it implements this interface and registers an instance with the OpenMath parser using the setParserHandler method. The parser uses the instance to report basic parsing-related events like the start and end of elements or element contents.
The application can find the location of any event using the Locator interface supplied by the Parser through the setLocator method.
public abstract void setLocator(Locator locator)
OpenMath parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the ParserHandler interface.
The locator allows the application to determine the end position of any OpenMath-object related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as unsuported symbol.
Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time.
public abstract void startParse() throws OMException
The OpenMath parser will invoke this method only once, before any other methods in this interface (except for setObjectLocator).
public abstract void endParse() throws OMException
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).
public abstract void startObject() throws OMException
The Parser will invoke this method at the beginning of every object element in the OpenMath-object; there will be a corresponding endObject() event for every startObject() event The element's content will be reported, in order, before the corresponding endObject() event.
public abstract void endObject() throws OMException
The Parser will invoke this method at the end of every object element in the OpenMath-object; there will be a corresponding startObject() event for every endObject() event.
public abstract void startApplication() throws OMException
The Parser will invoke this method at the beginning of every application element in the OpenMath-object; there will be a corresponding endApplication() event for every startApplication() event The element's content will be reported, in order, before the corresponding endApplication() event.
public abstract void endApplication() throws OMException
The Parser will invoke this method at the end of every application element in the OpenMath-object; there will be a corresponding startApplication() event for every endApplication() event.
public abstract void startAttribution() throws OMException
The Parser will invoke this method at the beginning of every attribution element in the OpenMath-object; there will be a corresponding endAttribution() event for every startAttribution() event The element's content will be reported, in order, before the corresponding endAttribution() event.
public abstract void startAttributePairs() throws OMException
The Parser will invoke this method at the beginning of every attribute-pairs element in the OpenMath-object; there will be a corresponding endAttribuePairs() event for every startAttributePairs() event. The element's content will be reported, in order, before the corresponding endAttributePairs() event.
public abstract void endAttribution() throws OMException
The Parser will invoke this method at the end of every attribution element in the OpenMath-object; there will be a corresponding startAttribution() event for every endAttribution() event.
public abstract void endAttributePairs() throws OMException
The Parser will invoke this method at the end of every attribute-pairs element in the OpenMath-object; there will be a corresponding startAttributePairs() event for every endAttributePairs() event.
public abstract void startBind() throws OMException
The Parser will invoke this method at the beginning of every bind element in the OpenMath-object; there will be a corresponding endBind() event for every startBind() event The element's content will be reported, in order, before the corresponding endBind() event.
public abstract void startBVars() throws OMException
The Parser will invoke this method at the beginning of every bvar element in the OpenMath-object; there will be a corresponding endBVars() event for every startBVars() event. The element's content will be reported, in order, before the corresponding endBVars() event.
public abstract void endBind() throws OMException
The Parser will invoke this method at the end of every bind element in the OpenMath-object; there will be a corresponding startBind() event for every endBind() event.
public abstract void endBVars() throws OMException
The Parser will invoke this method at the end of every bvars element in the OpenMath-object; there will be a corresponding startBVars() event for every endBVars() event.
public abstract void startError() throws OMException
The Parser will invoke this method at the beginning of every error element in the OpenMath-object; there will be a corresponding endError() event for every startError() event The element's content will be reported, in order, before the corresponding endError() event.
public abstract void endError() throws OMException
The Parser will invoke this method at the end of every error element in the OpenMath-object; there will be a corresponding startError() event for every endError() event.
public abstract void readInteger(int value) throws OMException
The Parser will invoke this method each time a Big Integer element is parsed.
public abstract void readInteger(BigInteger value) throws OMException
The Parser will invoke this method each time a Big Integer element is parsed.
public abstract void readFloat(double value) throws OMException
The Parser will invoke this method each time a float element is parsed.
public abstract void readString(String value) throws OMException
The Parser will invoke this method each time a string element is parsed.
public abstract void readVariable(String name) throws OMException
The Parser will invoke this method each time a variable element is parsed.
public abstract void readByteArray(byte value[]) throws OMException
The Parser will invoke this method each time a byteArray element is parsed.
public abstract void readSymbol(Symbol value) throws OMException
The Parser will invoke this method each time a symbol element is parsed.
public abstract void readComment(String value) throws OMException
The Parser will invoke this method each time a comment element is parsed.
public abstract void readPInstruction(String value) throws OMException
The Parser will invoke this method each time a processing instruction is parsed.
All Packages Class Hierarchy This Package Previous Next Index