Class XapiDetectorPlugin
java.lang.Object
dev.jcputney.elearning.parser.impl.detector.XapiDetectorPlugin
- All Implemented Interfaces:
ModuleTypeDetectorPlugin
Detector plugin for xAPI/TinCan packages.
Detects xAPI modules by looking for the presence of a tincan.xml
manifest file in the root directory.
Priority: 40 (after cmi5 which is 50, before SCORM which is 30)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetect(FileAccess fileAccess) Detects if the module is an xAPI/TinCan package.getName()Returns the name of this detector plugin.intReturns the priority for this detector.
-
Constructor Details
-
XapiDetectorPlugin
public XapiDetectorPlugin()Constructs a new XapiDetectorPlugin.
-
-
Method Details
-
detect
Detects if the module is an xAPI/TinCan package.- Specified by:
detectin interfaceModuleTypeDetectorPlugin- Parameters:
fileAccess- the file access interface- Returns:
ModuleType.XAPIif tincan.xml exists, null otherwise- Throws:
ModuleDetectionException- if an error occurs during detection
-
getPriority
public int getPriority()Returns the priority for this detector. Higher priority detectors run first.- Specified by:
getPriorityin interfaceModuleTypeDetectorPlugin- Returns:
- 40
-
getName
Returns the name of this detector plugin.- Specified by:
getNamein interfaceModuleTypeDetectorPlugin- Returns:
- "xAPI/TinCan"
-