java.lang.Object
dev.jcputney.elearning.parser.input.cmi5.Block
All Implemented Interfaces:
Serializable

public final class Block extends Object implements Serializable
Represents a block within a CMI5 course structure. Blocks can contain nested blocks or AUs (Assignable Units) and have associated objectives.

Defined in the schema as:


 <xs:complexType name="blockType">
   <xs:sequence>
     <xs:element name="title" type="textType"/>
     <xs:element name="description" type="textType"/>
     <xs:element name="objectives" type="referencesObjectivesType" minOccurs="0"/>
     <xs:choice minOccurs="1" maxOccurs="unbounded">
       <xs:element name="au" type="auType"/>
       <xs:element name="block" type="blockType"/>
     </xs:choice>
     <xs:group ref="anyElement"/>
   </xs:sequence>
   <xs:attributeGroup ref="anyAttribute"/>
   <xs:attribute name="id" type="xs:anyURI" use="required"/>
 </xs:complexType>
 
See Also:
  • Constructor Details

    • Block

      public Block(TextType title, TextType description, ReferencesObjectives objectives, List<AU> assignableUnits, List<Block> nestedBlocks, String id)
      Constructs a new Block instance with the specified parameters.
      Parameters:
      title - the title of the block, represented as a TextType object
      description - the description of the block, represented as a TextType object
      objectives - the objectives associated with the block, represented as a ReferencesObjectives object
      assignableUnits - the list of assignable units for the block, represented as a List of AU objects
      nestedBlocks - the list of nested blocks contained within this block, represented as a List of Block objects
      id - the unique identifier of the block, represented as a String
    • Block

      public Block()
      Default constructor for the Block class. Initializes a new instance of the Block with no specific properties set.
  • Method Details

    • getTitle

      public TextType getTitle()
      Retrieves the title of the block.
      Returns:
      the title of the block as a TextType object
    • setTitle

      public void setTitle(TextType title)
      Sets the title of the block.
      Parameters:
      title - the title to set, represented as a TextType object
    • getDescription

      public TextType getDescription()
      Retrieves the description of the block.
      Returns:
      the description of the block as a TextType object
    • setDescription

      public void setDescription(TextType description)
      Sets the description of the block.
      Parameters:
      description - the description to set, represented as a TextType object
    • getObjectives

      public ReferencesObjectives getObjectives()
      Retrieves the objectives associated with the block.
      Returns:
      the objectives of the block as a ReferencesObjectives object
    • setObjectives

      public void setObjectives(ReferencesObjectives objectives)
      Sets the objectives associated with the block.
      Parameters:
      objectives - the objectives to set, represented as a ReferencesObjectives object
    • getAssignableUnits

      public List<AU> getAssignableUnits()
      Retrieves a list of assignable units associated with the block.
      Returns:
      a list of assignable units as a List of AU objects
    • setAssignableUnits

      public void setAssignableUnits(List<AU> assignableUnits)
      Sets the list of assignable units associated with the block.
      Parameters:
      assignableUnits - the list of assignable units to set, represented as a List of AU objects
    • getNestedBlocks

      public List<Block> getNestedBlocks()
      Retrieves the nested blocks associated with this block.
      Returns:
      a list of nested blocks as a List of Block objects
    • setNestedBlocks

      public void setNestedBlocks(List<Block> nestedBlocks)
      Sets the list of nested blocks associated with this block.
      Parameters:
      nestedBlocks - the list of nested blocks to set, represented as a List of Block objects
    • getId

      public String getId()
      Retrieves the unique identifier of the block.
      Returns:
      the unique identifier of the block as a String
    • setId

      public void setId(String id)
      Sets the unique identifier of the block.
      Parameters:
      id - the unique identifier to set, represented as a String
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object