Class ParserOptions

java.lang.Object
dev.jcputney.elearning.parser.api.ParserOptions

public class ParserOptions extends Object
Configuration options for module parsing behavior. Controls validation strictness and other parsing settings.
  • Constructor Details

    • ParserOptions

      public ParserOptions()
      Creates parser options with default settings (strict mode enabled).
  • Method Details

    • strict

      public static ParserOptions strict()
      Creates parser options with strict mode enabled. Parsing will fail on any validation errors.
      Returns:
      ParserOptions configured for strict mode
    • lenient

      public static ParserOptions lenient()
      Creates parser options with lenient mode enabled. Parsing will continue despite validation errors.
      Returns:
      ParserOptions configured for lenient mode
    • isStrictMode

      public boolean isStrictMode()
      Checks if strict validation mode is enabled.
      Returns:
      true if strict mode is enabled
    • setStrictMode

      public ParserOptions setStrictMode(boolean strict)
      Sets whether to use strict validation mode. In strict mode, parsing fails on any validation errors. In lenient mode, parsing continues despite errors.
      Parameters:
      strict - true for strict mode, false for lenient
      Returns:
      this ParserOptions instance for method chaining
    • getCalculateModuleSize

      public Boolean getCalculateModuleSize()
      Gets the module size calculation setting.
      Returns:
      true to enable, false to disable, null to use system default
    • setCalculateModuleSize

      public ParserOptions setCalculateModuleSize(Boolean calculate)
      Sets whether to calculate module size (total disk size of all files). If not explicitly set (null), uses system property or environment variable.
      Parameters:
      calculate - true to enable size calculation, false to disable, null for system default
      Returns:
      this ParserOptions instance for method chaining
    • shouldCalculateModuleSize

      public boolean shouldCalculateModuleSize()
      Checks if module size calculation is enabled based on this options object. Returns the explicit setting if present, otherwise falls back to system default.
      Returns:
      true if size calculation should be performed