Class DatasetExportQuery

java.lang.Object
io.gdcc.spi.export.DatasetExportQuery

public final class DatasetExportQuery extends Object
Defines what dataset metadata to retrieve and at what level of detail for dataset-oriented export operations.

This is a pure data-shape specification: it answers which aspects of a dataset should be included in an export, and optionally how file metadata nested within that dataset should be shaped. It deliberately does not address which datasets to operate on (that is a selection concern at a higher level), nor how much data to retrieve per call — pagination is a separate, orthogonal concern expressed via a PageRequest at the method level.

File metadata shaping is optional: if no FileExportQuery is provided, methods that include file metadata will apply their own defaults. Methods that do not return file metadata will ignore any nested FileExportQuery.

Instances are immutable and must be constructed via builder(). Use defaults() for the standard query with no special filtering.

See Also:
  • Method Details

    • builder

      public static DatasetExportQuery.Builder builder()
      Returns a builder for creating new queries.
      Returns:
      a new DatasetExportQuery.Builder instance
    • defaults

      public static DatasetExportQuery defaults()
      Returns the default query, which includes all dataset metadata with no special filtering, and defers file metadata shaping to method-level defaults.
      Returns:
      the shared default DatasetExportQuery instance
    • getDatasetPredicates

      public Set<DatasetMetadataPredicates> getDatasetPredicates()
      Returns the dataset metadata predicates that control which aspects of the dataset are included in the export.
      Returns:
      an unmodifiable set of DatasetMetadataPredicates; never null
    • getFileQuery

      public Optional<FileExportQuery> getFileQuery()
      Returns the optional FileExportQuery that controls how file metadata nested within this dataset export should be shaped.

      An empty Optional means no explicit file query was specified; methods that include file metadata will apply their own defaults in that case.

      Returns:
      an Optional containing the file export query, or empty if not set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object