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 Summary
Modifier and TypeMethodDescriptionGets the parser options controlling validation behavior.Parses and validates the eLearning module in a single operation.Parses the eLearning module without validation.
-
Method Details
-
parseAndValidate
Parses and validates the eLearning module in a single operation.This is the recommended method for most use cases. It parses the manifest once and returns both validation results and extracted metadata.
- Returns:
- ParseResult containing validation results and module metadata
- Throws:
ModuleException- if a fatal error occurs (file not found, XML corruption)
-
parseOnly
Parses the eLearning module without validation.Use this method only in performance-critical scenarios where validation is handled separately. Skips all validation checks.
- Returns:
- ModuleMetadata containing the extracted module information
- Throws:
ModuleException- if a fatal error occurs (file not found, XML corruption)
-
getOptions
ParserOptions getOptions()Gets the parser options controlling validation behavior.- Returns:
- ParserOptions for this parser
-