Interface ExportTemplate

    • Method Detail

      • getMimeType

        String getMimeType()
        Get the MIME type to assign to files generated by this template.
        Returns:
        a String
      • getDefaultFileExtension

        String getDefaultFileExtension()
        Get the default file extension to give to files generated by this template.
        Returns:
        The file extension (without .)
        Since:
        3.0
      • beginDocument

        void beginDocument()
                    throws IOException
        Start writing the document.
        Throws:
        IOException - If there is an error
      • writeHeaders

        void writeHeaders()
                   throws IOException
        Write headers.
        Throws:
        IOException - If there is an error
      • beginItem

        void beginItem​(int id)
                throws IOException
        Start writing a new item.
        Parameters:
        id - Id of the new item.
        Throws:
        IOException - If there is an error
      • writeAnnotations

        void writeAnnotations​(ExportedProperty ep,
                              List<?> values,
                              String unit)
                       throws IOException
        Write annotation values.
        Parameters:
        ep - Exported property the annotations belongs to
        values - Annotation values to be written.
        unit - The unit of the annotation values, or null to not display write a unit
        Throws:
        IOException - If there is an error
      • writeProperty

        void writeProperty​(ExportedProperty ep,
                           Object data)
                    throws IOException
        Write the specified property values.
        Parameters:
        ep - The exported property the data belongs to.
        data - Data to be written.
        Throws:
        IOException - If there is an error
      • writeCollection

        void writeCollection​(ExportedProperty ep,
                             Collection<?> values)
                      throws IOException
        Write the values in a collection
        Parameters:
        ep - Exported property the values belong to
        values - The values to be written
        Throws:
        IOException
        Since:
        2.12