Class SpecialFunctionHandler

  • All Implemented Interfaces:
    TagHandler
    Direct Known Subclasses:
    LogHandler, MinusHandler, RootHandler, SelectorHandler

    public abstract class SpecialFunctionHandler
    extends java.lang.Object
    implements TagHandler
    Base class for functions and operators which have special arguments. For example <root> may have a <degree> element as its first child.
    Author:
    Richard Morris
    • Constructor Detail

      • SpecialFunctionHandler

        public SpecialFunctionHandler()
    • Method Detail

      • apply

        public abstract Node apply​(ApplyHandler ah,
                                   StackFrame frame,
                                   org.xml.sax.Locator loc)
                            throws org.xml.sax.SAXParseException,
                                   ParseException
        Called when closing <apply/> tag is encountered.
        Parameters:
        ah - a reference to the ApplyHandler which provides some useful methods.
        frame - the stackframe for the apply element, the children can be recovered from this
        loc - provides information on the location in the xml document.
        Returns:
        the resulting Node representing the function.
        Throws:
        org.xml.sax.SAXParseException
        ParseException
      • handle

        public java.lang.Object handle​(StackFrame frame,
                                       org.xml.sax.Locator loc)
                                throws org.xml.sax.SAXParseException
        Returns 'this'.
        Specified by:
        handle in interface TagHandler
        Parameters:
        frame - StackFrame representing the element
        loc - location in input
        Returns:
        typically a Node, other types of objects may also be returned when the tag has a special meaning for its parent node.
        Throws:
        org.xml.sax.SAXParseException