Interface ModuleParser<M extends PackageManifest>

Type Parameters:
M - The type of package manifest associated with the module.
All Known Implementing Classes:
AiccParser, BaseParser, Cmi5Parser, Scorm12Parser, Scorm2004Parser, XapiParser

public interface ModuleParser<M extends PackageManifest>
Interface for parsing module files and extracting metadata.

This interface defines the contract for parsers that handle different types of eLearning modules, such as SCORM, xAPI, and others. Implementations should provide methods to parse the module files and extract relevant metadata.

  • Method Details

    • validate

      ValidationResult validate()
      Validates the module without parsing. Collects all validation issues and returns them without throwing exceptions.
      Returns:
      ValidationResult containing any errors or warnings found
    • parse

      Parses the module files and extracts metadata. Runs validation first according to ParserOptions. In strict mode, throws exception if validation errors found. In lenient mode, continues parsing and attaches validation result to metadata.
      Returns:
      A ModuleMetadata object containing standardized metadata.
      Throws:
      ModuleException - if parsing fails or validation fails in strict mode.
    • getOptions

      ParserOptions getOptions()
      Gets the parser options controlling validation behavior.
      Returns:
      ParserOptions for this parser