Class Cmi5Manifest

java.lang.Object
dev.jcputney.elearning.parser.input.cmi5.Cmi5Manifest
All Implemented Interfaces:
PackageManifest, Serializable

public final class Cmi5Manifest extends Object implements PackageManifest
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 Course element defining the course metadata.
  • An optional Objectives element listing the objectives for the course.
  • A sequence of Block and AU (Assignable Unit) elements defining the course structure.
See Also:
  • 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 - the Course object associated with this manifest
      objectives - the list of objectives represented by an ObjectivesList object
      blocks - the list of blocks, represented as a List of Block objects
      assignableUnits - the list of assignable units, represented as a List of AU objects
    • 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

      public String getTitle()
      Returns the title of the course. If the title is not present, it returns null.
      Specified by:
      getTitle in interface PackageManifest
      Returns:
      the title of the course
    • getDescription

      public String getDescription()
      Returns the description of the course. If the description is not present, it returns null.
      Specified by:
      getDescription in interface PackageManifest
      Returns:
      the description of the course
    • getLaunchUrl

      public String 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:
      getLaunchUrl in interface PackageManifest
      Returns:
      the launch URL for the course, or null if no assignable units are found
    • getIdentifier

      public String getIdentifier()
      Returns the identifier for the course. If the course does not have an identifier, it returns null.
      Specified by:
      getIdentifier in interface PackageManifest
      Returns:
      the identifier for the course
    • getVersion

      public String getVersion()
      Returns the version of the course. If the version is not available, it returns null.
      Specified by:
      getVersion in interface PackageManifest
      Returns:
      the version of the course, or null if not available
    • getDuration

      public Duration getDuration()
      Returns the duration of the course. The default duration is represented as zero if not explicitly defined.
      Specified by:
      getDuration in interface PackageManifest
      Returns:
      the duration of the course, represented as a Duration object
    • getCourse

      public Course getCourse()
      Retrieves the course associated with this manifest.
      Returns:
      the Course object associated with this manifest, or null if no course is set
    • setCourse

      public void setCourse(Course course)
      Sets the course associated with the manifest.
      Parameters:
      course - the Course object to associate with this manifest
    • getObjectives

      public ObjectivesList getObjectives()
      Retrieves the list of objectives associated with this manifest.
      Returns:
      an ObjectivesList containing the course objectives, or null if no objectives are defined
    • setObjectives

      public void setObjectives(ObjectivesList objectives)
      Sets the list of objectives for this manifest.
      Parameters:
      objectives - the ObjectivesList containing the objectives to associate with this manifest
    • getBlocks

      public List<Block> getBlocks()
      Retrieves the list of blocks associated with this manifest.
      Returns:
      a List of Block objects representing the blocks in the manifest, or an empty list if no blocks are defined
    • setBlocks

      public void setBlocks(List<Block> blocks)
      Sets the list of blocks for the Cmi5 manifest.
      Parameters:
      blocks - the List of Block objects to associate with this manifest
    • getAssignableUnits

      public List<AU> getAssignableUnits()
      Retrieves the list of assignable units associated with this manifest.
      Returns:
      a List of AU objects representing the assignable units, or an empty list if no assignable units are defined
    • setAssignableUnits

      public void setAssignableUnits(List<AU> assignableUnits)
      Sets the list of assignable units for the Cmi5 manifest.
      Parameters:
      assignableUnits - the list of AU objects to be associated with this manifest
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object