Class TransformFromResultToHtml


  • public class TransformFromResultToHtml
    extends Object
    This class generates a HTML fragment from DocumentTO objects. This is usually not needed by a learning management system as a client, since that system will render the documents by itself. But, the GrajaGUI client used for testing and developing assignments and a command line tool are provided by Graja and are using this class in order to transform a result object into a human readable form.
    • Constructor Detail

      • TransformFromResultToHtml

        public TransformFromResultToHtml()
    • Method Detail

      • convertResultToHtml

        public static String convertResultToHtml​(ResultTO result,
                                                 String discriminator,
                                                 boolean expandAll,
                                                 boolean tabularRdKinds)
                                          throws javax.xml.bind.JAXBException,
                                                 IOException
        Generates a HTML fragment from all the documents in all assignments in result. If there are several levels and audiences in the result, the resulting HTML will contain a table of all variants of the result.
        Parameters:
        result - an object with documents serving as input
        discriminator - an identifier that can be used to differentiate several HTML fragments produced by this method for the same assignment. May be null.
        Returns:
        HTML content
        Throws:
        IOException
        javax.xml.bind.JAXBException