Interface ExportConfig

All Known Implementing Classes:
JsonExportConfig, MarkdownExportConfig

public sealed interface ExportConfig permits 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 Type
    Method
    Description
    Creates and returns a new ExportConfig instance with default settings for exporting data in Markdown format.
    exportJson(String outputPath, boolean metadata)
    Creates and returns a new ExportConfig instance configured for exporting data in JSON format.
    exportMarkdown(String outputPath)
    Creates and returns a new ExportConfig instance configured for exporting data in Markdown format.
    Returns the file format for exported data.
    boolean
    Returns a boolean indicating whether metadata should be included in the export.
    Returns the path where exported data will be saved.
  • Method Details

    • exportMarkdown

      static ExportConfig exportMarkdown(String outputPath) throws IOException
      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

      static ExportConfig exportJson(String outputPath, boolean metadata) throws IOException
      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

      static ExportConfig 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

      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.