Class Cmi5Metadata
java.lang.Object
dev.jcputney.elearning.parser.output.ModuleMetadata<M>
dev.jcputney.elearning.parser.output.metadata.BaseModuleMetadata<Cmi5Manifest>
dev.jcputney.elearning.parser.output.metadata.cmi5.Cmi5Metadata
- All Implemented Interfaces:
PackageManifest,Serializable
Represents metadata for a cmi5 module, including cmi5-specific fields such as prerequisites,
dependencies, assignable units, custom data, and xAPI support.
This class extends the base BaseModuleMetadata class to provide cmi5-specific information
for LMS tracking and reporting, including a list of Assignable Units (AUs) and custom data
fields.
- See Also:
-
Field Summary
Fields inherited from class dev.jcputney.elearning.parser.output.metadata.BaseModuleMetadata
DESCRIPTION, DURATION, IDENTIFIER, LAUNCH_URL, MODULE_TYPE, TITLE, VERSION, XAPI_ENABLEDFields inherited from class dev.jcputney.elearning.parser.output.ModuleMetadata
manifest, moduleEditionType, moduleType, sizeOnDisk, xapiEnabled -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for the Cmi5Metadata class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Cmi5Metadatacreate(Cmi5Manifest manifest, boolean xapiEnabled) Creates a new Cmi5Metadata instance with standard cmi5 metadata components.booleanRetrieves the activity types associated with the metadata.Retrieves a list of assignable unit IDs associated with the metadata.Retrieves a list of URLs associated with the assignable units in the metadata.Retrieves the details of assignable units (AUs) as a map.Retrieves the block IDs associated with the metadata.Retrieves the launch methods associated with the metadata.Retrieves the launch parameters associated with the metadata.Retrieves the filename of the manifest file for this module.Retrieves the mastery scores associated with the metadata.Retrieves the move-on criteria associated with the metadata.Retrieves the objective IDs associated with the metadata.inthashCode()booleanDetermines whether this module contains multiple launchable units.Methods inherited from class dev.jcputney.elearning.parser.output.ModuleMetadata
getDescription, getDuration, getIdentifier, getLaunchUrl, getManifest, getModuleEditionType, getModuleType, getSizeOnDisk, getTitle, getVersion, isXapiEnabled, setManifestFile, setSizeOnDisk
-
Constructor Details
-
Cmi5Metadata
protected Cmi5Metadata()Default constructor for the Cmi5Metadata class. This constructor initializes a new instance of Cmi5Metadata. Designed to be used internally or by derived classes.
-
-
Method Details
-
create
Creates a new Cmi5Metadata instance with standard cmi5 metadata components.- Parameters:
manifest- The cmi5 manifest.xapiEnabled- Whether xAPI is enabled.- Returns:
- A new Cmi5Metadata instance.
-
equals
- Overrides:
equalsin classBaseModuleMetadata<Cmi5Manifest>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseModuleMetadata<Cmi5Manifest>
-
getAssignableUnitIds
Retrieves a list of assignable unit IDs associated with the metadata.- Returns:
- A list of strings representing the IDs of the assignable units.
-
getAssignableUnitUrls
Retrieves a list of URLs associated with the assignable units in the metadata.- Returns:
- An unmodifiable list of strings representing the URLs of the assignable units.
-
getAuDetails
Retrieves the details of assignable units (AUs) as a map. Each assignable unit is represented as a key-value pair, where the key is a unique identifier for the AU, and the value is another map containing detailed metadata for that AU. The metadata may include information such as URLs, titles, descriptions, and other relevant attributes.- Returns:
- An unmodifiable map with assignable unit identifiers as keys and their corresponding metadata as values. Each value is a map containing key-value pairs of the AU's metadata.
-
getMasteryScores
Retrieves the mastery scores associated with the metadata. Each mastery score corresponds to an assignable unit and is represented as a key-value pair, where the key is the unique identifier of the assignable unit and the value is the mastery score as a double.- Returns:
- An unmodifiable map containing the mastery scores for the assignable units. The keys are the assignable unit identifiers, and the values are the respective mastery scores.
-
getMoveOnCriteria
Retrieves the move-on criteria associated with the metadata. Each move-on criterion corresponds to an assignable unit and is represented as a key-value pair, where the key is the unique identifier of the assignable unit and the value is the move-on criterion as a string.- Returns:
- An unmodifiable map containing the move-on criteria for the assignable units. The keys are the assignable unit identifiers, and the values are the respective move-on criteria.
-
getLaunchMethods
Retrieves the launch methods associated with the metadata. Each launch method is represented as a key-value pair, where the key is a unique identifier, and the value is the corresponding launch method information.- Returns:
- An unmodifiable map containing the launch methods. The keys are unique identifiers, and the values are the corresponding launch method details.
-
getActivityTypes
Retrieves the activity types associated with the metadata. Each activity type is represented as a key-value pair, where the key is a unique identifier and the value is the corresponding activity type description.- Returns:
- An unmodifiable map containing the activity types. The keys are unique identifiers, and the values are the respective activity type descriptions.
-
getLaunchParameters
Retrieves the launch parameters associated with the metadata. Each launch parameter is represented as a key-value pair, where the key is a unique identifier and the value is the corresponding launch parameter information.- Returns:
- An unmodifiable map containing the launch parameters. The keys are unique identifiers, and the values are their corresponding launch parameter details.
-
getBlockIds
Retrieves the block IDs associated with the metadata. Block IDs represent unique identifiers for the blocks defined within the metadata.- Returns:
- An unmodifiable list of strings representing the block IDs.
-
getObjectiveIds
Retrieves the objective IDs associated with the metadata. Objective IDs represent unique identifiers for objectives defined within the metadata.- Returns:
- An unmodifiable list of strings representing the objective IDs.
-
hasMultipleLaunchableUnits
public boolean hasMultipleLaunchableUnits()Description copied from class:ModuleMetadataDetermines whether this module contains multiple launchable units.This affects player configuration defaults such as navigation controls, table of contents display, and launch behavior. In Rustici Engine and similar LMS platforms, this flag is used to conditionally enable multi-SCO navigation features.
- SCORM 1.2: Multiple resources with scormType="sco"
- SCORM 2004: Multiple items in organization
- AICC: Multiple assignable units
- cmi5/xAPI: Always false (single AU/activity)
- Specified by:
hasMultipleLaunchableUnitsin classModuleMetadata<Cmi5Manifest>- Returns:
- true if the module contains multiple launchable units, false otherwise
-
getManifestFile
Description copied from class:ModuleMetadataRetrieves the filename of the manifest file for this module.For most module types, this is a constant defined by the specification (e.g., "imsmanifest.xml" for SCORM, "cmi5.xml" for cmi5). For AICC modules, the filename is discovered during parsing as the .crs file can have any name.
- Specified by:
getManifestFilein classModuleMetadata<Cmi5Manifest>- Returns:
- the manifest filename (e.g., "imsmanifest.xml", "cmi5.xml", "course.crs")
-