Class Block
java.lang.Object
dev.jcputney.elearning.parser.input.cmi5.Block
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves a list of assignable units associated with the block.Retrieves the description of the block.getId()Retrieves the unique identifier of the block.Retrieves the nested blocks associated with this block.Retrieves the objectives associated with the block.getTitle()Retrieves the title of the block.inthashCode()voidsetAssignableUnits(List<AU> assignableUnits) Sets the list of assignable units associated with the block.voidsetDescription(TextType description) Sets the description of the block.voidSets the unique identifier of the block.voidsetNestedBlocks(List<Block> nestedBlocks) Sets the list of nested blocks associated with this block.voidsetObjectives(ReferencesObjectives objectives) Sets the objectives associated with the block.voidSets the title of the block.
-
Constructor Details
-
Block
public Block(TextType title, TextType description, ReferencesObjectives objectives, List<AU> assignableUnits, List<Block> nestedBlocks, String id) Constructs a newBlockinstance with the specified parameters.- Parameters:
title- the title of the block, represented as aTextTypeobjectdescription- the description of the block, represented as aTextTypeobjectobjectives- the objectives associated with the block, represented as aReferencesObjectivesobjectassignableUnits- the list of assignable units for the block, represented as aListofAUobjectsnestedBlocks- the list of nested blocks contained within this block, represented as aListofBlockobjectsid- the unique identifier of the block, represented as aString
-
Block
public Block()Default constructor for theBlockclass. Initializes a new instance of theBlockwith no specific properties set.
-
-
Method Details
-
getTitle
Retrieves the title of the block.- Returns:
- the title of the block as a
TextTypeobject
-
setTitle
Sets the title of the block.- Parameters:
title- the title to set, represented as aTextTypeobject
-
getDescription
Retrieves the description of the block.- Returns:
- the description of the block as a
TextTypeobject
-
setDescription
Sets the description of the block.- Parameters:
description- the description to set, represented as aTextTypeobject
-
getObjectives
Retrieves the objectives associated with the block.- Returns:
- the objectives of the block as a
ReferencesObjectivesobject
-
setObjectives
Sets the objectives associated with the block.- Parameters:
objectives- the objectives to set, represented as aReferencesObjectivesobject
-
getAssignableUnits
Retrieves a list of assignable units associated with the block.- Returns:
- a list of assignable units as a
ListofAUobjects
-
setAssignableUnits
Sets the list of assignable units associated with the block.- Parameters:
assignableUnits- the list of assignable units to set, represented as aListofAUobjects
-
getNestedBlocks
Retrieves the nested blocks associated with this block.- Returns:
- a list of nested blocks as a
ListofBlockobjects
-
setNestedBlocks
Sets the list of nested blocks associated with this block.- Parameters:
nestedBlocks- the list of nested blocks to set, represented as aListofBlockobjects
-
getId
Retrieves the unique identifier of the block.- Returns:
- the unique identifier of the block as a
String
-
setId
Sets the unique identifier of the block.- Parameters:
id- the unique identifier to set, represented as a String
-
equals
-
hashCode
public int hashCode()
-