Class AiccParser
java.lang.Object
dev.jcputney.elearning.parser.parsers.BaseParser<AiccMetadata,AiccManifest>
dev.jcputney.elearning.parser.parsers.AiccParser
- All Implemented Interfaces:
ModuleParser<AiccManifest>
Parses AICC (Aviation Industry CBT Committee) eLearning modules by handling both INI-style and
CSV-style files with specific extensions such as .crs, .des, .au, .cst, .ort, and .pre.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe file extension for the AICC assignable unit file.static final StringThe file extension for the AICC course file.static final StringThe file extension for the AICC course structure file.static final StringThe file extension for the AICC descriptor file.Fields inherited from class dev.jcputney.elearning.parser.parsers.BaseParser
moduleFileProvider, XAPI_JS_FILE, XAPI_SEND_STATEMENT_FILE -
Constructor Summary
ConstructorsConstructorDescriptionAiccParser(FileAccess fileAccess) Default constructor for the AiccParser class.AiccParser(ModuleFileProvider moduleFileProvider) Constructs an AiccParser with the specified ModuleFileProvider instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<AiccManifest>Abstract method to return the class of the manifest object for the specific parser.parse()Parses the AICC module and returns its metadata.Parses the AICC manifest and returns an instance of AiccManifest.Methods inherited from class dev.jcputney.elearning.parser.parsers.BaseParser
checkForXapi, loadExternalMetadataIntoMetadata, parseManifest, parseXmlToObject
-
Field Details
-
CRS_EXTENSION
The file extension for the AICC course file.- See Also:
-
DES_EXTENSION
The file extension for the AICC descriptor file.- See Also:
-
AU_EXTENSION
The file extension for the AICC assignable unit file.- See Also:
-
CST_EXTENSION
The file extension for the AICC course structure file.- See Also:
-
-
Constructor Details
-
AiccParser
Default constructor for the AiccParser class.- Parameters:
fileAccess- An instance of FileAccess for reading files.
-
AiccParser
Constructs an AiccParser with the specified ModuleFileProvider instance.- Parameters:
moduleFileProvider- An instance of ModuleFileProvider for reading files in the module package.
-
-
Method Details
-
parse
Parses the AICC module and returns its metadata.- Specified by:
parsein interfaceModuleParser<AiccManifest>- Specified by:
parsein classBaseParser<AiccMetadata,AiccManifest> - Returns:
- A ModuleMetadata object containing the parsed module metadata.
- Throws:
ModuleParsingException- If the module type can't be determined or there's an error parsing.
-
parseManifest
public AiccManifest parseManifest() throws IOException, ModuleParsingException, ManifestParseExceptionParses the AICC manifest and returns an instance of AiccManifest.- Returns:
- An instance of AiccManifest containing parsed data.
- Throws:
IOException- If an error occurs while reading files.ModuleParsingException- If an error occurs during parsing.ManifestParseException- If an error occurs while parsing the manifest.
-
getManifestClass
Description copied from class:BaseParserAbstract method to return the class of the manifest object for the specific parser.- Specified by:
getManifestClassin classBaseParser<AiccMetadata,AiccManifest> - Returns:
- The class of the manifest object.
-