Class SaxVinciFrameBuilder

    • Constructor Detail

      • SaxVinciFrameBuilder

        public SaxVinciFrameBuilder()
    • Method Detail

      • setParentFrame

        public void setParentFrame​(AFrame aParentFrame)
        Sets the parent frame, to which frames built by the object will be added. This MUST be called before parsing a document.
        Parameters:
        aParentFrame - the parent frame
      • startElement

        public void startElement​(String namespaceURI,
                                 String localName,
                                 String qualifiedName,
                                 Attributes attributes)
                          throws SAXException
        Called for each start tag encountered.
        Specified by:
        startElement in interface ContentHandler
        Overrides:
        startElement in class DefaultHandler
        Parameters:
        namespaceURI - Required if the namespaces property is true.
        attributes - The specified or defaulted attributes.
        localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
        qualifiedName - The qualified name (with prefix), or the empty string if qualified names are not available.
        Throws:
        SAXException
      • getLeafContent

        protected String getLeafContent​(String aFrameName,
                                        Attributes aAttributes,
                                        StringBuffer aContentBuf)
        Gets the content to be included in a FrameLeaf. This method just returns the contents of the provided StringBuffer, but subclasses can override to provide specialized content.
        Parameters:
        aFrameName - name of the FrameLeaf
        aAttributes - attributes of FrameLeaf
        aContentBuf - StringBuffer containing the character data obtained from the SAX parser
        Returns:
        the data to be included in the Vinci FrameLeaf
      • getName

        protected String getName​(String s1,
                                 String s2)
        If the first String parameter is nonempty, return it, else return the second string parameter.
        Parameters:
        s1 - The string to be tested.
        s2 - The alternate String.
        Returns:
        s1 if it isn't empty, else s2.