Class Scorm12Parser
java.lang.Object
dev.jcputney.elearning.parser.parsers.BaseParser<Scorm12Metadata,Scorm12Manifest>
dev.jcputney.elearning.parser.parsers.Scorm12Parser
- All Implemented Interfaces:
ModuleParser<Scorm12Manifest>
Parses SCORM 1.2 modules by reading the imsmanifest.xml file and extracting core metadata.
This parser extracts key information such as title, description, identifier, launch URL, version,
and optional fields like mastery score and custom data, storing them in a standardized
ModuleMetadata object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the manifest file for SCORM 1.2 modules.Fields inherited from class dev.jcputney.elearning.parser.parsers.BaseParser
moduleFileProvider, XAPI_JS_FILE, XAPI_SEND_STATEMENT_FILE -
Constructor Summary
ConstructorsConstructorDescriptionScorm12Parser(FileAccess fileAccess) Constructs a Scorm12Parser with the specified FileAccess instance.Scorm12Parser(ModuleFileProvider moduleFileProvider) Constructs a Scorm12Parser with the specified ModuleFileProvider instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<Scorm12Manifest>Abstract method to return the class of the manifest object for the specific parser.parse()Parses the SCORM 1.2 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 1.2 modules.- See Also:
-
-
Constructor Details
-
Scorm12Parser
Constructs a Scorm12Parser with the specified FileAccess instance.- Parameters:
fileAccess- An instance of FileAccess for reading files in the module package.
-
Scorm12Parser
Constructs a Scorm12Parser with the specified ModuleFileProvider instance.- Parameters:
moduleFileProvider- An instance of ModuleFileProvider for reading files in the module package.
-
-
Method Details
-
parse
Parses the SCORM 1.2 module located at the specified modulePath. Extracts metadata, including title, description, identifier, launch URL, a default version string, and optional fields like mastery score and custom data.- Specified by:
parsein interfaceModuleParser<Scorm12Manifest>- Specified by:
parsein classBaseParser<Scorm12Metadata,Scorm12Manifest> - 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<Scorm12Metadata,Scorm12Manifest> - Returns:
- The class of the manifest object.
-