package org.vitrivr.cineast.core.config;

import static org.apache.logging.log4j.LogManager.getLogger;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import org.apache.logging.log4j.Logger;
import org.vitrivr.cineast.core.data.MediaType;

public class IngestConfig {

  private static final Logger LOGGER = getLogger();

  private final MediaType type;
  private final InputConfig input;
  private final List<MetadataConfig> extractors;
  private final List<MetadataConfig> exporters;
  private final List<MetadataConfig> metadata;
  private final DatabaseConfig database;
  private final ExtractionPipelineConfig pipeline;

  @JsonCreator
  public IngestConfig(
      @JsonProperty("type") MediaType type,
      @JsonProperty("input") InputConfig input,
      @JsonProperty("extractors") List<MetadataConfig> extractors,
      @JsonProperty("exporters") List<MetadataConfig> exporters,
      @JsonProperty("metadata") List<MetadataConfig> metadata,
      @JsonProperty("database") DatabaseConfig database,
      @JsonProperty("pipeline") ExtractionPipelineConfig pipeline) {
    this.type = type;
    this.input = input;
    this.extractors = extractors;
    this.exporters = exporters;
    this.metadata = metadata;
    this.database = database;
    this.pipeline = pipeline;
  }

  public static Logger getLOGGER() {
    return LOGGER;
  }

  public MediaType getType() {
    return type;
  }

  public InputConfig getInput() {
    return input;
  }

  public List<MetadataConfig> getExtractors() {
    return extractors;
  }

  public List<MetadataConfig> getExporters() {
    return exporters;
  }

  public List<MetadataConfig> getMetadata() {
    return metadata;
  }

  public DatabaseConfig getDatabase() {
    return database;
  }

  public ExtractionPipelineConfig getPipeline() {
    return pipeline;
  }
}
/*
    {
        "type": "VIDEO",
        "input": {
            "path": "/path/to/data/videos/",
            "depth": 2,
            "skip": 0,
            "id": {
                "name": "UniqueObjectIdGenerator",
                "properties": {}
            }
        },
        "extractors": [
            { "name": "AverageColor" },
            { "name": "AverageColorRaster" },
            { "name": "CLD" },
            { "name": "EdgeGrid16" },
            { "name": "EHD" },
            { "name": "DominantEdgeGrid16" },
            { "name": "SubDivMotionHistogram5" },
            { "name": "SubDivMotionHistogramBackground5" },
            { "name": "HOGMirflickr25K512" },
            { "name": "SURFMirflickr25K512" }
        ],
        "exporters": [{
            "name": "ShotThumbNails",
            "properties": {
                "destination": "/path/to/thumbnails/"
            }
        }]
    }

 */
@@ -1900,926 +1900,4 @@
 %7D%0A%7D%0A
-/*%0A    %7B%0A        %22type%22: %22VIDEO%22,%0A        %22input%22: %7B%0A            %22path%22: %22/path/to/data/videos/%22,%0A            %22depth%22: 2,%0A            %22skip%22: 0,%0A            %22id%22: %7B%0A                %22name%22: %22UniqueObjectIdGenerator%22,%0A                %22properties%22: %7B%7D%0A            %7D%0A        %7D,%0A        %22extractors%22: %5B%0A            %7B %22name%22: %22AverageColor%22 %7D,%0A            %7B %22name%22: %22AverageColorRaster%22 %7D,%0A            %7B %22name%22: %22CLD%22 %7D,%0A            %7B %22name%22: %22EdgeGrid16%22 %7D,%0A            %7B %22name%22: %22EHD%22 %7D,%0A            %7B %22name%22: %22DominantEdgeGrid16%22 %7D,%0A            %7B %22name%22: %22SubDivMotionHistogram5%22 %7D,%0A            %7B %22name%22: %22SubDivMotionHistogramBackground5%22 %7D,%0A            %7B %22name%22: %22HOGMirflickr25K512%22 %7D,%0A            %7B %22name%22: %22SURFMirflickr25K512%22 %7D%0A        %5D,%0A        %22exporters%22: %5B%7B%0A            %22name%22: %22ShotThumbNails%22,%0A            %22properties%22: %7B%0A                %22destination%22: %22/path/to/thumbnails/%22%0A            %7D%0A        %7D%5D%0A    %7D%0A%0A */

Remove comment