001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package gov.nist.secauto.metaschema.schemagen;
007
008import gov.nist.secauto.metaschema.core.configuration.AbstractConfigurationFeature;
009
010import edu.umd.cs.findbugs.annotations.NonNull;
011
012/**
013 * Configuration options for schema generation.
014 *
015 * @param <V>
016 *          the feature value type
017 */
018public final class SchemaGenerationFeature<V>
019    extends AbstractConfigurationFeature<V> {
020
021  /**
022   * If enabled, definitions that are defined inline will be generated as inline
023   * types. If disabled, definitions will always be generated as global types.
024   */
025  @NonNull
026  public static final SchemaGenerationFeature<Boolean> INLINE_DEFINITIONS
027      = new SchemaGenerationFeature<>("inline-definitions", Boolean.class, false);
028
029  /**
030   * If enabled, child definitions of a choice that are defined inline will be
031   * generated as inline types. If disabled, child definitions of a choice will
032   * always be generated as global types. This option will only be used if
033   * {@link #INLINE_DEFINITIONS} is also enabled.
034   */
035  @NonNull
036  public static final SchemaGenerationFeature<Boolean> INLINE_CHOICE_DEFINITIONS
037      = new SchemaGenerationFeature<>("inline-choice-definitions", Boolean.class, false);
038
039  private SchemaGenerationFeature(
040      @NonNull String name,
041      @NonNull Class<V> valueClass,
042      @NonNull V defaultValue) {
043    super(name, valueClass, defaultValue);
044  }
045
046}