Class Scorm12Item
java.lang.Object
dev.jcputney.elearning.parser.input.scorm12.ims.cp.Scorm12Item
- All Implemented Interfaces:
Serializable
Represents an item within a SCORM 1.2 organization.
The Item element is used to define the structure of the content and the
relationships between the resources and items in the SCORM package.
Schema Snippet:
<xsd:element name="item">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="title" minOccurs="0"/>
<xsd:element ref="metadata" minOccurs="0"/>
<xsd:element ref="item" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="identifier" type="xsd:ID" use="required"/>
<xsd:attribute name="identifierref" type="xsd:IDREF" use="optional"/>
<xsd:attribute name="isvisible" type="xsd:boolean" default="true"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
</xsd:element>
Example Usage in imsmanifest.xml:
<item identifier="item_1" identifierref="res_1">
<title>Introduction to Golf</title>
<metadata>
<schema>ADL SCORM</schema>
<schemaversion>1.2</schemaversion>
</metadata>
<item identifier="item_1a" identifierref="res_1a">
<title>Golf Basics</title>
</item>
</item>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the Scorm12Item class.Scorm12Item(String identifier, String identifierRef, Boolean isVisible, String parameters, Duration maxTimeAllowed, Double masteryScore, Scorm12Prerequisites prerequisites, TimeLimitAction timeLimitAction, String dataFromLMS, String title, Scorm12Metadata metadata, List<Scorm12Item> items) Constructs a new Scorm12Item with the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the data from the Learning Management System (LMS) associated with this SCORM 1.2 item.Retrieves the identifier of the SCORM 1.2 item.Retrieves the identifier reference of the SCORM 1.2 item.Retrieves the visibility status of this item.getItems()Retrieves the list of child SCORM 1.2 items associated with the current item.Retrieves the mastery score of the SCORM 1.2 item.Retrieves the maximum time allowed for the SCORM 1.2 item.Retrieves the metadata associated with this SCORM 1.2 item.Retrieves the parameters associated with this SCORM 1.2 item.Retrieves the prerequisites associated with this SCORM 1.2 item.Retrieves the time limit action associated with this SCORM 1.2 item.getTitle()Retrieves the title of the SCORM 1.2 item.inthashCode()voidsetDataFromLMS(String dataFromLMS) Sets the data from the Learning Management System (LMS) for this SCORM 1.2 item.voidsetIdentifier(String identifier) Sets the identifier for the SCORM 1.2 item.voidsetIdentifierRef(String identifierRef) Sets the identifier reference for the SCORM 1.2 item.voidsetItems(List<Scorm12Item> items) Sets the list of child SCORM 1.2 items associated with this item.voidsetMasteryScore(Double masteryScore) Sets the mastery score for the SCORM 1.2 item.voidsetMaxTimeAllowed(Duration maxTimeAllowed) Sets the maximum time allowed for this SCORM 1.2 item.voidsetMetadata(Scorm12Metadata metadata) Sets the metadata associated with this SCORM 1.2 item.voidsetParameters(String parameters) Sets the parameters associated with this SCORM 1.2 item.voidsetPrerequisites(Scorm12Prerequisites prerequisites) Sets the prerequisites for the SCORM 1.2 item.voidsetTimeLimitAction(TimeLimitAction timeLimitAction) Sets the time limit action for this SCORM 1.2 item.voidSets the title for the SCORM 1.2 item.voidsetVisible(Boolean visible) Sets the visibility state for the SCORM 1.2 item.
-
Constructor Details
-
Scorm12Item
public Scorm12Item(String identifier, String identifierRef, Boolean isVisible, String parameters, Duration maxTimeAllowed, Double masteryScore, Scorm12Prerequisites prerequisites, TimeLimitAction timeLimitAction, String dataFromLMS, String title, Scorm12Metadata metadata, List<Scorm12Item> items) Constructs a new Scorm12Item with the specified properties.- Parameters:
identifier- A unique identifier for the SCORM 1.2 item.identifierRef- An identifier reference that points to a resource associated with this item.isVisible- A Boolean indicating whether the item is visible. If true, the item is visible; otherwise, it is hidden.parameters- A string representing additional parameters associated with the item.maxTimeAllowed- A Duration object specifying the maximum amount of time allowed for this item.masteryScore- A Double representing the mastery score for the item, indicating the minimum score required to achieve mastery.prerequisites- An instance of Scorm12Prerequisites representing the prerequisites required for this item.timeLimitAction- A TimeLimitAction specifying the action to take when the time limit is reached. Possible values include EXIT_MESSAGE, EXIT_NO_MESSAGE, CONTINUE_MESSAGE, CONTINUE_NO_MESSAGE, and UNKNOWN.dataFromLMS- A string containing data retrieved from the Learning Management System (LMS).title- A string specifying the title of the item.metadata- An instance of Scorm12Metadata containing metadata associated with the item.items- A list of Scorm12Item objects representing child items associated with this SCORM 1.2 item.
-
Scorm12Item
public Scorm12Item()Default constructor for the Scorm12Item class. Constructs an instance of Scorm12Item with no initialized values. This constructor is primarily used when no initial properties are provided.
-
-
Method Details
-
getIdentifier
Retrieves the identifier of the SCORM 1.2 item.- Returns:
- A string representing the identifier of the item.
-
setIdentifier
Sets the identifier for the SCORM 1.2 item.- Parameters:
identifier- A string representing the unique identifier to be assigned to the item.
-
getIdentifierRef
Retrieves the identifier reference of the SCORM 1.2 item.- Returns:
- A string representing the identifier reference of the item.
-
setIdentifierRef
Sets the identifier reference for the SCORM 1.2 item.- Parameters:
identifierRef- A string representing the identifier reference to be assigned to the item.
-
getIsVisible
Retrieves the visibility status of this item.- Returns:
- A Boolean indicating whether the item is visible. Returns true if the item is visible, otherwise false.
-
getParameters
Retrieves the parameters associated with this SCORM 1.2 item.- Returns:
- A string representing the parameters of the item.
-
setParameters
Sets the parameters associated with this SCORM 1.2 item.- Parameters:
parameters- A string representing the parameters to be set for this item.
-
getMaxTimeAllowed
Retrieves the maximum time allowed for the SCORM 1.2 item.- Returns:
- A Duration object representing the maximum time allowed for this item.
-
setMaxTimeAllowed
Sets the maximum time allowed for this SCORM 1.2 item.- Parameters:
maxTimeAllowed- A Duration object representing the maximum amount of time allowed for the completion of this item.
-
getMasteryScore
Retrieves the mastery score of the SCORM 1.2 item.- Returns:
- A Double representing the mastery score of the item.
-
setMasteryScore
Sets the mastery score for the SCORM 1.2 item.- Parameters:
masteryScore- A Double value representing the mastery score to be assigned to the item. This indicates the minimum score required to achieve mastery.
-
getPrerequisites
Retrieves the prerequisites associated with this SCORM 1.2 item.- Returns:
- A Scorm12Prerequisites object representing the prerequisites for the item.
-
setPrerequisites
Sets the prerequisites for the SCORM 1.2 item.- Parameters:
prerequisites- An instance ofScorm12Prerequisitesrepresenting the prerequisites required for this item.
-
getTimeLimitAction
Retrieves the time limit action associated with this SCORM 1.2 item.- Returns:
- A
TimeLimitActionrepresenting the action to be taken when the time limit is reached.
-
setTimeLimitAction
Sets the time limit action for this SCORM 1.2 item.- Parameters:
timeLimitAction- An instance ofTimeLimitActionrepresenting the action to be performed when the time limit is reached. Possible values include:EXIT_MESSAGE,EXIT_NO_MESSAGE,CONTINUE_MESSAGE,CONTINUE_NO_MESSAGE, andUNKNOWN.
-
getDataFromLMS
Retrieves the data from the Learning Management System (LMS) associated with this SCORM 1.2 item.- Returns:
- A string representing the data obtained from the LMS for this item.
-
setDataFromLMS
Sets the data from the Learning Management System (LMS) for this SCORM 1.2 item.- Parameters:
dataFromLMS- A string containing the data retrieved from the LMS to be associated with this item.
-
getTitle
Retrieves the title of the SCORM 1.2 item.- Returns:
- A string representing the title of the item.
-
setTitle
Sets the title for the SCORM 1.2 item.- Parameters:
title- A string representing the title to be assigned to the item.
-
getMetadata
Retrieves the metadata associated with this SCORM 1.2 item.- Returns:
- A Scorm12Metadata object representing the metadata of the item.
-
setMetadata
Sets the metadata associated with this SCORM 1.2 item.- Parameters:
metadata- An instance ofScorm12Metadatarepresenting the metadata to be assigned to the item.
-
getItems
Retrieves the list of child SCORM 1.2 items associated with the current item.- Returns:
- A list of
Scorm12Itemrepresenting the child items.
-
setItems
Sets the list of child SCORM 1.2 items associated with this item.- Parameters:
items- A list ofScorm12Itemobjects representing the child items to be associated with this item.
-
setVisible
Sets the visibility state for the SCORM 1.2 item.- Parameters:
visible- A Boolean value indicating the visibility state to be set for this item. If true, the item is marked as visible; if false, it is marked as hidden.
-
equals
-
hashCode
public int hashCode()
-