Class Cmi5Manifest
java.lang.Object
dev.jcputney.elearning.parser.input.cmi5.Cmi5Manifest
- All Implemented Interfaces:
PackageManifest,Serializable
Represents the root element of a CMI5 course structure manifest. Implements the
PackageManifest interface to provide common manifest functionality.
Defined in the schema as:
<xs:element name="courseStructure" type="courseType"/>
The Cmi5Manifest includes the following components:
- A
Courseelement defining the course metadata. - An optional
Objectiveselement listing the objectives for the course. - A sequence of
BlockandAU(Assignable Unit) elements defining the course structure.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault no-argument constructor for the Cmi5Manifest class.Cmi5Manifest(Course course, ObjectivesList objectives, List<Block> blocks, List<AU> assignableUnits) Constructs a new instance of the Cmi5Manifest class with the specified course, objectives, blocks, and assignable units. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the list of assignable units associated with this manifest.Retrieves the list of blocks associated with this manifest.Retrieves the course associated with this manifest.Returns the description of the course.Returns the duration of the course.Returns the identifier for the course.Returns the launch URL for the course.Retrieves the list of objectives associated with this manifest.getTitle()Returns the title of the course.Returns the version of the course.inthashCode()voidsetAssignableUnits(List<AU> assignableUnits) Sets the list of assignable units for the Cmi5 manifest.voidSets the list of blocks for the Cmi5 manifest.voidSets the course associated with the manifest.voidsetObjectives(ObjectivesList objectives) Sets the list of objectives for this manifest.
-
Constructor Details
-
Cmi5Manifest
public Cmi5Manifest(Course course, ObjectivesList objectives, List<Block> blocks, List<AU> assignableUnits) Constructs a new instance of the Cmi5Manifest class with the specified course, objectives, blocks, and assignable units.- Parameters:
course- theCourseobject associated with this manifestobjectives- the list of objectives represented by anObjectivesListobjectblocks- the list of blocks, represented as aListofBlockobjectsassignableUnits- the list of assignable units, represented as aListofAUobjects
-
Cmi5Manifest
public Cmi5Manifest()Default no-argument constructor for the Cmi5Manifest class. Initializes an empty Cmi5Manifest instance without setting any fields or performing any operations.
-
-
Method Details
-
getTitle
Returns the title of the course. If the title is not present, it returns null.- Specified by:
getTitlein interfacePackageManifest- Returns:
- the title of the course
-
getDescription
Returns the description of the course. If the description is not present, it returns null.- Specified by:
getDescriptionin interfacePackageManifest- Returns:
- the description of the course
-
getLaunchUrl
Returns the launch URL for the course. First checks for assignable units at the root level, and if none are found, looks for assignable units inside the first block.- Specified by:
getLaunchUrlin interfacePackageManifest- Returns:
- the launch URL for the course, or null if no assignable units are found
-
getIdentifier
Returns the identifier for the course. If the course does not have an identifier, it returns null.- Specified by:
getIdentifierin interfacePackageManifest- Returns:
- the identifier for the course
-
getVersion
Returns the version of the course. If the version is not available, it returns null.- Specified by:
getVersionin interfacePackageManifest- Returns:
- the version of the course, or null if not available
-
getDuration
Returns the duration of the course. The default duration is represented as zero if not explicitly defined.- Specified by:
getDurationin interfacePackageManifest- Returns:
- the duration of the course, represented as a
Durationobject
-
getCourse
Retrieves the course associated with this manifest.- Returns:
- the
Courseobject associated with this manifest, or null if no course is set
-
setCourse
Sets the course associated with the manifest.- Parameters:
course- theCourseobject to associate with this manifest
-
getObjectives
Retrieves the list of objectives associated with this manifest.- Returns:
- an
ObjectivesListcontaining the course objectives, or null if no objectives are defined
-
setObjectives
Sets the list of objectives for this manifest.- Parameters:
objectives- theObjectivesListcontaining the objectives to associate with this manifest
-
getBlocks
Retrieves the list of blocks associated with this manifest.- Returns:
- a
ListofBlockobjects representing the blocks in the manifest, or an empty list if no blocks are defined
-
setBlocks
Sets the list of blocks for the Cmi5 manifest.- Parameters:
blocks- theListofBlockobjects to associate with this manifest
-
getAssignableUnits
Retrieves the list of assignable units associated with this manifest.- Returns:
- a
ListofAUobjects representing the assignable units, or an empty list if no assignable units are defined
-
setAssignableUnits
Sets the list of assignable units for the Cmi5 manifest.- Parameters:
assignableUnits- the list ofAUobjects to be associated with this manifest
-
equals
-
hashCode
public int hashCode()
-