Class Scorm12Resources

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

public final class Scorm12Resources extends Object implements Serializable
Represents the <resources> element in a SCORM 1.2 manifest file.

The <resources> element is a container for all <resource> elements in the manifest, defining the resources used by the content package.


 <xsd:complexType name="resourcesType">
    <xsd:sequence>
        <xsd:element ref="resource" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:group ref="grp.any"/>
    </xsd:sequence>
    <xsd:attributeGroup ref="attr.base"/>
    <xsd:anyAttribute namespace="##other" processContents="strict"/>
 </xsd:complexType>
 
See Also:
  • Constructor Details

    • Scorm12Resources

      public Scorm12Resources()
      Default constructor for the Scorm12Resources class.

      Creates an instance of the Scorm12Resources class without initializing any fields or properties. This constructor is useful when an empty instance is needed prior to explicitly setting its properties.

  • Method Details

    • getResourceById

      public Optional<Scorm12Resource> getResourceById(String id)
      Retrieves a resource by its identifier.
      Parameters:
      id - The identifier of the resource to retrieve.
      Returns:
      An Optional containing the resource if found, or an empty Optional if not found.
    • getBase

      public String getBase()
      Retrieves the base URL associated with the resources in the content package. This URL is used to resolve relative paths for the resources.
      Returns:
      The base URL as a String.
    • setBase

      public void setBase(String base)
      Sets the base URL associated with the resources in the SCORM content package.
      Parameters:
      base - A string representing the base URL. This URL is used to resolve relative paths for the resources in the content package.
    • getResourceList

      public List<Scorm12Resource> getResourceList()
      Retrieves the list of SCORM 1.2 resources.
      Returns:
      A list of Scorm12Resource objects representing the resources.
    • setResourceList

      public void setResourceList(List<Scorm12Resource> resourceList)
      Sets the list of SCORM 1.2 resources for this content package.
      Parameters:
      resourceList - A list of Scorm12Resource objects to set. These objects represent the resources associated with the content package.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object