Class CourseStructure
java.lang.Object
dev.jcputney.elearning.parser.input.aicc.CourseStructure
- All Implemented Interfaces:
Serializable
Represents the courseStructure complex type.
The following schema snippet specifies its contents:
<xs:complexType name="courseStructure">
<xs:all>
<xs:element name="block" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:element name="member" type="xs:string" minOccurs="0" maxOccurs="1" />
</xs:all>
</xs:complexType>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the CourseStructure class.CourseStructure(String block, String member) Constructs a CourseStructure instance with the specified block and member. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves an immutable view of the additional columns map associated with the course structure.getAttribute(String key) Retrieves the value of the attribute associated with the specified key.Retrieves an immutable view of the attributes map associated with the course structure.Retrieves the raw attributes string associated with the course structure.getBlock()Retrieves the block associated with the course structure.Retrieves the member associated with the course structure.Retrieves the prerequisites associated with the course structure.inthashCode()voidsetAdditionalColumn(String key, String value) Adds or updates an additional column with the provided key-value pair.voidsetAttributes(String attributes) Sets the attributes for the course structure from a raw string.voidSets the block associated with the course structure.voidSets the member associated with the course structure.voidsetPrerequisites(String prerequisites) Sets the prerequisites for the course structure.
-
Constructor Details
-
CourseStructure
public CourseStructure()Default constructor for the CourseStructure class. This constructor initializes an empty CourseStructure object without setting any fields or performing any operations. -
CourseStructure
Constructs a CourseStructure instance with the specified block and member.- Parameters:
block- the block associated with the course structure. Represents a specific aspect or grouping within the course structure. Can be null.member- the member associated with the course structure. Represents a specific entity within the course structure. Can be null.
-
-
Method Details
-
getBlock
Retrieves the block associated with the course structure.- Returns:
- the block for the course structure as a string. The returned value may be null if the block has not been set.
-
setBlock
Sets the block associated with the course structure.- Parameters:
block- the block to set for the course structure. Can be null. Represents a specific aspect or grouping within the course structure.
-
getMember
Retrieves the member associated with the course structure.- Returns:
- the member for the course structure as a string. The returned value may be null if the member has not been set.
-
setMember
Sets the member associated with the course structure.- Parameters:
member- the member to set for the course structure. Can be null. Represents a specific member or entity within the course structure.
-
getPrerequisites
Retrieves the prerequisites associated with the course structure.- Returns:
- the prerequisites for the course structure as a string. The returned value may be null if the prerequisites have not been set.
-
setPrerequisites
Sets the prerequisites for the course structure. If the provided string is blank, this method will set the prerequisites to null.- Parameters:
prerequisites- the prerequisites information for the course. If blank, it will default to null.
-
getAttributesRaw
Retrieves the raw attributes string associated with the course structure.- Returns:
- the raw attributes as a string. The returned value may be null if the raw attributes have not been set or initialized.
-
setAdditionalColumn
Adds or updates an additional column with the provided key-value pair. If the key matches specific predefined keys (block, member, prerequisites, attributes), it delegates the value to the respective setter method. Otherwise, the key-value pair is stored in the additional columns map and also added as an attribute.- Parameters:
key- the key for the column. If blank, the method does not perform any operations.value- the value for the column. Can be null.
-
getAttributes
Retrieves an immutable view of the attributes map associated with the course structure. The attributes represent key-value pairs related to the course structure.- Returns:
- an unmodifiable map of attribute key-value pairs. The map is never null.
-
setAttributes
Sets the attributes for the course structure from a raw string. If the provided string is blank, the attributes will be set to null. Otherwise, the string is processed to initialize individual attribute key-value pairs by parsing it.- Parameters:
attributes- a raw attribute string containing key-value pairs separated by semicolons (';'). If blank, the attributes will be set to null instead of being processed.
-
getAttribute
Retrieves the value of the attribute associated with the specified key. If the key is null, the method returns null.- Parameters:
key- the key of the attribute to retrieve; may be null. If the key is null, null will be returned.- Returns:
- the value of the attribute associated with the normalized key, or null if the key is null or not found in the attributes.
-
getAdditionalColumns
Retrieves an immutable view of the additional columns map associated with the course structure. The additional columns represent key-value pairs that provide extended information not covered by predefined fields like block, member, or prerequisites.- Returns:
- an unmodifiable map of additional columns as key-value pairs. The map is never null.
-
equals
-
hashCode
public int hashCode()
-