Class Scorm2004Parser
java.lang.Object
dev.jcputney.elearning.parser.parsers.BaseParser<Scorm2004Metadata,Scorm2004Manifest>
dev.jcputney.elearning.parser.parsers.Scorm2004Parser
- All Implemented Interfaces:
ModuleParser<Scorm2004Manifest>
Parses SCORM 2004 modules by reading the imsmanifest.xml file and extracting core metadata,
including sequencing information, custom data (adlcp:data), prerequisites, mastery score, and any
additional metadata files referenced within the manifest.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the manifest file for SCORM 2004 modules.Fields inherited from class dev.jcputney.elearning.parser.parsers.BaseParser
moduleFileProvider, XAPI_JS_FILE, XAPI_SEND_STATEMENT_FILE -
Constructor Summary
ConstructorsConstructorDescriptionScorm2004Parser(FileAccess fileAccess) Constructs a Scorm2004Parser with the specified FileAccess instance.Scorm2004Parser(ModuleFileProvider moduleFileProvider) Constructs a Scorm2004Parser with the specified ModuleFileProvider instance. -
Method Summary
Modifier and TypeMethodDescriptionAbstract method to return the class of the manifest object for the specific parser.parse()Parses the SCORM 2004 module located at the specified modulePath.Methods inherited from class dev.jcputney.elearning.parser.parsers.BaseParser
checkForXapi, loadExternalMetadataIntoMetadata, parseManifest, parseXmlToObject
-
Field Details
-
MANIFEST_FILE
The name of the manifest file for SCORM 2004 modules.- See Also:
-
-
Constructor Details
-
Scorm2004Parser
Constructs a Scorm2004Parser with the specified FileAccess instance.- Parameters:
fileAccess- An instance of FileAccess for reading files in the module package.
-
Scorm2004Parser
Constructs a Scorm2004Parser with the specified ModuleFileProvider instance.- Parameters:
moduleFileProvider- An instance of ModuleFileProvider for reading files in the module package.
-
-
Method Details
-
parse
Parses the SCORM 2004 module located at the specified modulePath. Extracts metadata, including title, description, identifier, launch URL, version, sequencing information, custom data, prerequisites, mastery score, and additional metadata from external files.- Specified by:
parsein interfaceModuleParser<Scorm2004Manifest>- Specified by:
parsein classBaseParser<Scorm2004Metadata,Scorm2004Manifest> - Returns:
- A populated ModuleMetadata object containing the extracted metadata.
- Throws:
ModuleParsingException- if an error occurs during parsing.
-
getManifestClass
Description copied from class:BaseParserAbstract method to return the class of the manifest object for the specific parser.- Specified by:
getManifestClassin classBaseParser<Scorm2004Metadata,Scorm2004Manifest> - Returns:
- The class of the manifest object.
-