Class InstreamForeignObject

    • Constructor Detail

      • InstreamForeignObject

        public InstreamForeignObject​(FONode parent)
        Constructs an instream-foreign-object object (called by ElementMapping.Maker).
        Parameters:
        parent - the parent FONode
    • Method Detail

      • startOfNode

        public void startOfNode()
                         throws FOPException
        Description copied from class: FObj
        Called after processNode() is called. Subclasses can do additional processing.
        Overrides:
        startOfNode in class FObj
        Throws:
        FOPException - FOP Exception
      • endOfNode

        public void endOfNode()
                       throws FOPException
        Make sure content model satisfied, if so then tell the FOEventHandler that we are at the end of the instream-foreign-object. Primarily used for making final content model validation checks and/or informing the FOEventHandler that the end of this FO has been reached. The default implementation simply calls FONode.finalizeNode(), without sending any event to the FOEventHandler.

        Note: the recommended way to override this method in subclasses is

        super.endOfNode(); // invoke finalizeNode()

        getFOEventHandler().endXXX(); // send endOfNode() notification

        Overrides:
        endOfNode in class FObj
        Throws:
        FOPException - FOP Exception
      • validateChildNode

        protected void validateChildNode​(org.xml.sax.Locator loc,
                                         java.lang.String nsURI,
                                         java.lang.String localName)
                                  throws ValidationException
        Checks to make sure, during SAX processing of input document, that the incoming node is valid for this (parent) node (e.g., checking to see that fo:table is not an immediate child of fo:root) called from FOTreeBuilder.startElement(String, String, String, Attributes) before constructing the child FObj.
        XSL Content Model: one (1) non-XSL namespace child
        Overrides:
        validateChildNode in class FONode
        Parameters:
        loc - location in the FO source file
        nsURI - namespace of incoming node
        localName - name of the incoming node (without namespace prefix)
        Throws:
        ValidationException - if incoming node not valid for parent
      • getLocalName

        public java.lang.String getLocalName()
        Returns the local name (i.e. without namespace prefix) of the node
        Specified by:
        getLocalName in class FONode
        Returns:
        the local name of this node
      • getIntrinsicWidth

        public int getIntrinsicWidth()
        Specified by:
        getIntrinsicWidth in class AbstractGraphics
        Returns:
        the graphic's intrinsic width in millipoints
      • getIntrinsicHeight

        public int getIntrinsicHeight()
        Specified by:
        getIntrinsicHeight in class AbstractGraphics
        Returns:
        the graphic's intrinsic height in millipoints
      • addChildNode

        protected void addChildNode​(FONode child)
                             throws FOPException
        Adds a node as a child of this node. The default implementation of this method just ignores any child node being added.
        Overrides:
        addChildNode in class FObj
        Parameters:
        child - child node to be added to the childNodes of this node
        Throws:
        FOPException - if there's a problem during processing
      • getChildXMLObj

        public XMLObj getChildXMLObj()
        Returns:
        the XMLObj child node of the instream-foreign-object.