Interface ExportConfig
- All Known Implementing Classes:
JsonExportConfig
,MarkdownExportConfig
The ExportConfig interface defines methods for configuring data export options. Implementations
of this interface specify the path, format, and metadata settings for exporting data. This
interface permits specific implementations: JsonExportConfig and MarkdownExportConfig.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExportConfig
Creates and returns a new ExportConfig instance with default settings for exporting data in Markdown format.static ExportConfig
exportJson
(String outputPath, boolean metadata) Creates and returns a new ExportConfig instance configured for exporting data in JSON format.static ExportConfig
exportMarkdown
(String outputPath) Creates and returns a new ExportConfig instance configured for exporting data in Markdown format.format()
Returns the file format for exported data.boolean
metadata()
Returns a boolean indicating whether metadata should be included in the export.path()
Returns the path where exported data will be saved.
-
Method Details
-
exportMarkdown
Creates and returns a new ExportConfig instance configured for exporting data in Markdown format. If the specified output path does not exist, it will be created.- Parameters:
outputPath
- The path where exported data will be saved.- Returns:
- A new ExportConfig instance for Markdown export.
- Throws:
IOException
- If an I/O error occurs while creating the output directory.
-
exportJson
Creates and returns a new ExportConfig instance configured for exporting data in JSON format. If the specified output path does not exist, it will be created.- Parameters:
outputPath
- The path where exported data will be saved.metadata
- True if metadata should be included in the export, false otherwise.- Returns:
- A new ExportConfig instance for JSON export.
- Throws:
IOException
- If an I/O error occurs while creating the output directory.
-
exportDefault
Creates and returns a new ExportConfig instance with default settings for exporting data in Markdown format. The output path is set to the default output path specified in the Constants class.- Returns:
- A new ExportConfig instance with default settings for Markdown export.
-
path
String path()Returns the path where exported data will be saved.- Returns:
- The export path.
-
format
ExportFileFormat format()Returns the file format for exported data.- Returns:
- The export file format.
-
metadata
boolean metadata()Returns a boolean indicating whether metadata should be included in the export.- Returns:
- True if metadata should be included, false otherwise.
-