Class PtalonMLHandler

  • All Implemented Interfaces:
    XmlHandler

    public class PtalonMLHandler
    extends HandlerBase
    XML handler to be used for "configure" code when parsing a MoML model that contains a PtalonActor.
    Since:
    Ptolemy II 6.1
    Version:
    $Id$
    Author:
    Adam Cataldo, Elaine Cheong
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Detail

      • PtalonMLHandler

        public PtalonMLHandler​(PtalonActor actor)
        Create a PtalonMLHandler, which will be used to recover the AST and code manager specified in the PtalonML.
        Parameters:
        actor - The actor to associate with this handler.
    • Method Detail

      • attribute

        public void attribute​(java.lang.String aname,
                              java.lang.String value,
                              boolean isSpecified)
                       throws java.lang.Exception
        Process a PtalonML attribute.
        Specified by:
        attribute in interface XmlHandler
        Overrides:
        attribute in class HandlerBase
        Parameters:
        aname - The name of the attribute.
        value - The value of the attribute, or null if the attribute is #IMPLIED.
        isSpecified - True if the value was specified, false if it was defaulted from the DTD.
        Throws:
        java.lang.Exception - If there is any trouble creating the AST or code manager,
        See Also:
        XmlHandler.attribute(java.lang.String, java.lang.String, boolean)
      • endElement

        public void endElement​(java.lang.String elname)
                        throws java.lang.Exception
        Process the end of a PtalonML element.
        Specified by:
        endElement in interface XmlHandler
        Overrides:
        endElement in class HandlerBase
        Parameters:
        elname - The element type name.
        Throws:
        java.lang.Exception - If there is any trouble creating the AST or code manager.
        See Also:
        XmlHandler.endElement(java.lang.String)