Class FOPFormatter

    • Constructor Detail

      • FOPFormatter

        public FOPFormatter()
    • Method Detail

      • format

        public Media format​(Media media)
        Description copied from class: MediaFormatter
        Transform the given media (xml file) with the attached media (xslt file) into a new media (xml/pdf file)
        Specified by:
        format in class MediaFormatter
        Parameters:
        media - a media from an ItemFormatter or other MediaFormatter(s)
        Returns:
        a media which contains the transformed data
      • loadConfig

        protected org.apache.avalon.framework.configuration.Configuration loadConfig​(java.lang.String fopConfigXml)
                                                                              throws org.apache.avalon.framework.configuration.ConfigurationException,
                                                                                     org.xml.sax.SAXException,
                                                                                     java.io.IOException
        Loads configuration either from file or from classpath resource. Glassfish classloader compatible.
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        org.apache.avalon.framework.configuration.ConfigurationException
      • validate

        protected boolean validate​(java.io.File temporaryFile)
                            throws java.lang.IllegalArgumentException,
                                   java.io.IOException
        Validation of the temp file if it is of MimeConstants.MIME_PDF type
        Parameters:
        temporaryFile -
        Throws:
        java.lang.IllegalArgumentException
        java.io.IOException