Package io.goobi.viewer.model.export
Class ExportFormat
java.lang.Object
io.goobi.viewer.model.export.ExportFormat
Describes one configurable XSLT-based search export format as defined in
config_viewer.xml under <search><export><format>.
Each instance holds the format's unique name, enable flag, XSLT file name,
HTTP content type and file extension. New export formats can be added at runtime
by simply adding another <format> element and dropping the corresponding
XSLT stylesheet into the config or classpath directory.
Example configuration:
<format name="bibtex" enabled="true" xslt="solr2bibtex.xsl"
contentType="text/plain" fileExtension="bib" />
-
Constructor Summary
ConstructorsConstructorDescriptionExportFormat(String name, boolean enabled, String xslt, String contentType, String fileExtension) Creates a new export format descriptor. -
Method Summary
-
Constructor Details
-
ExportFormat
public ExportFormat(String name, boolean enabled, String xslt, String contentType, String fileExtension) Creates a new export format descriptor.- Parameters:
name- unique format identifier used in the REST path (e.g. "bibtex")enabled- whether this format is currently activexslt- file name of the XSLT stylesheet (e.g. "solr2bibtex.xsl")contentType- HTTP content type for the response (e.g. "text/plain")fileExtension- file extension for the download file (e.g. "bib")
-
-
Method Details
-
getName
- Returns:
- the unique format identifier (e.g. "bibtex", "endnote", "ris")
-
isEnabled
public boolean isEnabled()- Returns:
- true if this export format is enabled in the configuration
-
getXslt
- Returns:
- the XSLT stylesheet file name used for the transformation
-
getContentType
- Returns:
- the HTTP content type to set on the response (e.g. "application/xml")
-
getFileExtension
- Returns:
- the file extension for the downloaded file (e.g. "xml", "bib", "ris")
-
toString
-