public interface ExportTemplate
SimpleExport
class to make it
easier to output exported data in different formats.Modifier and Type | Method and Description |
---|---|
void |
beginDocument()
Start writing the document.
|
void |
beginItem(int id)
Start writing a new item.
|
void |
endDocument()
End writing the document.
|
void |
endItem()
End writing an item
|
java.lang.String |
getDefaultFileExtension()
Get the default file extension to give to files generated by this template.
|
java.lang.String |
getMimeType()
Get the MIME type to assign to files generated by this template.
|
void |
writeAnnotations(ExportedProperty ep,
java.util.List<?> values,
java.lang.String unit)
Write annotation values.
|
void |
writeCollection(ExportedProperty ep,
java.util.Collection<?> values)
Write the values in a collection
|
void |
writeHeaders()
Write headers.
|
void |
writeProperty(ExportedProperty ep,
java.lang.Object data)
Write the specified property values.
|
java.lang.String getMimeType()
java.lang.String getDefaultFileExtension()
void beginDocument() throws java.io.IOException
java.io.IOException
- If there is an errorvoid writeHeaders() throws java.io.IOException
java.io.IOException
- If there is an errorvoid beginItem(int id) throws java.io.IOException
id
- Id of the new item.java.io.IOException
- If there is an errorvoid writeAnnotations(ExportedProperty ep, java.util.List<?> values, java.lang.String unit) throws java.io.IOException
ep
- Exported property the annotations belongs tovalues
- Annotation values to be written.unit
- The unit of the annotation values, or null
to not display write a unitjava.io.IOException
- If there is an errorvoid writeProperty(ExportedProperty ep, java.lang.Object data) throws java.io.IOException
ep
- The exported property the data
belongs to.data
- Data to be written.java.io.IOException
- If there is an errorvoid writeCollection(ExportedProperty ep, java.util.Collection<?> values) throws java.io.IOException
ep
- Exported property the values belong tovalues
- The values to be writtenjava.io.IOException
void endItem() throws java.io.IOException
java.io.IOException
- If there is an errorvoid endDocument() throws java.io.IOException
java.io.IOException
- If there is an error