Class Cmi5Parser

All Implemented Interfaces:
ModuleParser<Cmi5Manifest>

public class Cmi5Parser extends BaseParser<Cmi5Metadata,Cmi5Manifest>
Cmi5Parser is responsible for parsing cmi5-specific metadata from the cmi5.xml file.

The "cmi5" xAPI-based specification includes Assignable Units (AUs) as discrete learning objects with metadata for LMS tracking and reporting. This parser extracts metadata such as the title, launch URL, prerequisites, dependencies, detailed AU information, and custom metadata.

  • Field Details

    • CMI5_XML

      public static final String CMI5_XML
      The name of the cmi5 XML file that contains the module metadata.
      See Also:
  • Constructor Details

    • Cmi5Parser

      public Cmi5Parser(FileAccess fileAccess)
      Constructs a Cmi5Parser with the specified FileAccess instance.
      Parameters:
      fileAccess - An instance of FileAccess for reading files in the module package.
  • Method Details

    • parse

      public Cmi5Metadata parse() throws ModuleParsingException
      Parses the cmi5 module located at the specified modulePath.

      This method reads the cmi5.xml file to extract metadata such as the title, launch URL, prerequisites, dependencies, list of Assignable Units (AUs), and custom data for LMS tracking. Since cmi5 is always xAPI-enabled, the isXapiEnabled flag is set to true for all cmi5 modules.

      Specified by:
      parse in interface ModuleParser<Cmi5Manifest>
      Specified by:
      parse in class BaseParser<Cmi5Metadata,Cmi5Manifest>
      Returns:
      A Cmi5Metadata object containing the parsed metadata.
      Throws:
      ModuleParsingException - If the module's manifest cannot be parsed or if required fields are missing.
    • getManifestClass

      protected Class<Cmi5Manifest> getManifestClass()
      Description copied from class: BaseParser
      Abstract method to return the class of the manifest object for the specific parser.
      Specified by:
      getManifestClass in class BaseParser<Cmi5Metadata,Cmi5Manifest>
      Returns:
      The class of the manifest object.