java.lang.Object
dev.jcputney.elearning.parser.input.scorm12.ims.cp.Scorm12Item
All Implemented Interfaces:
Serializable

public final class Scorm12Item extends Object implements 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 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

      public String getIdentifier()
      Retrieves the identifier of the SCORM 1.2 item.
      Returns:
      A string representing the identifier of the item.
    • setIdentifier

      public void setIdentifier(String identifier)
      Sets the identifier for the SCORM 1.2 item.
      Parameters:
      identifier - A string representing the unique identifier to be assigned to the item.
    • getIdentifierRef

      public String getIdentifierRef()
      Retrieves the identifier reference of the SCORM 1.2 item.
      Returns:
      A string representing the identifier reference of the item.
    • setIdentifierRef

      public void setIdentifierRef(String identifierRef)
      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

      public Boolean 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

      public String getParameters()
      Retrieves the parameters associated with this SCORM 1.2 item.
      Returns:
      A string representing the parameters of the item.
    • setParameters

      public void setParameters(String parameters)
      Sets the parameters associated with this SCORM 1.2 item.
      Parameters:
      parameters - A string representing the parameters to be set for this item.
    • getMaxTimeAllowed

      public Duration 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

      public void setMaxTimeAllowed(Duration maxTimeAllowed)
      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

      public Double getMasteryScore()
      Retrieves the mastery score of the SCORM 1.2 item.
      Returns:
      A Double representing the mastery score of the item.
    • setMasteryScore

      public void setMasteryScore(Double masteryScore)
      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

      public Scorm12Prerequisites getPrerequisites()
      Retrieves the prerequisites associated with this SCORM 1.2 item.
      Returns:
      A Scorm12Prerequisites object representing the prerequisites for the item.
    • setPrerequisites

      public void setPrerequisites(Scorm12Prerequisites prerequisites)
      Sets the prerequisites for the SCORM 1.2 item.
      Parameters:
      prerequisites - An instance of Scorm12Prerequisites representing the prerequisites required for this item.
    • getTimeLimitAction

      public TimeLimitAction getTimeLimitAction()
      Retrieves the time limit action associated with this SCORM 1.2 item.
      Returns:
      A TimeLimitAction representing the action to be taken when the time limit is reached.
    • setTimeLimitAction

      public void setTimeLimitAction(TimeLimitAction timeLimitAction)
      Sets the time limit action for this SCORM 1.2 item.
      Parameters:
      timeLimitAction - An instance of TimeLimitAction representing the action to be performed when the time limit is reached. Possible values include: EXIT_MESSAGE, EXIT_NO_MESSAGE, CONTINUE_MESSAGE, CONTINUE_NO_MESSAGE, and UNKNOWN.
    • getDataFromLMS

      public String 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

      public void setDataFromLMS(String dataFromLMS)
      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

      public String getTitle()
      Retrieves the title of the SCORM 1.2 item.
      Returns:
      A string representing the title of the item.
    • setTitle

      public void setTitle(String title)
      Sets the title for the SCORM 1.2 item.
      Parameters:
      title - A string representing the title to be assigned to the item.
    • getMetadata

      public Scorm12Metadata getMetadata()
      Retrieves the metadata associated with this SCORM 1.2 item.
      Returns:
      A Scorm12Metadata object representing the metadata of the item.
    • setMetadata

      public void setMetadata(Scorm12Metadata metadata)
      Sets the metadata associated with this SCORM 1.2 item.
      Parameters:
      metadata - An instance of Scorm12Metadata representing the metadata to be assigned to the item.
    • getItems

      public List<Scorm12Item> getItems()
      Retrieves the list of child SCORM 1.2 items associated with the current item.
      Returns:
      A list of Scorm12Item representing the child items.
    • setItems

      public void setItems(List<Scorm12Item> items)
      Sets the list of child SCORM 1.2 items associated with this item.
      Parameters:
      items - A list of Scorm12Item objects representing the child items to be associated with this item.
    • setVisible

      public void setVisible(Boolean visible)
      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

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

      public int hashCode()
      Overrides:
      hashCode in class Object