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

public final class Scorm12Resource extends Object implements Serializable
Represents the <resource> element in SCORM 1.2 manifest file.

The <resource> element defines a single resource in the content package, specifying its type, dependencies, and the files associated with it.


 <xsd:complexType name="resourceType">
   <xsd:sequence>
     <xsd:element ref="metadata" minOccurs="0"/>
     <xsd:element ref="file" minOccurs="0" maxOccurs="unbounded"/>
     <xsd:element ref="dependency" minOccurs="0" maxOccurs="unbounded"/>
   </xsd:sequence>
   <xsd:attributeGroup ref="attr.resource.req"/>
   <xsd:attribute ref="xml:base"/>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
 </xsd:complexType>
 
See Also:
  • Constructor Details

    • Scorm12Resource

      public Scorm12Resource()
      Constructs an instance of the Scorm12Resource class.

      This is the default, no-argument constructor. It initializes a new instance of the Scorm12Resource class without setting any initial values for the class fields.

  • Method Details

    • getIdentifier

      public String getIdentifier()
      Retrieves the identifier for this resource.
      Returns:
      A string representing the identifier of the resource.
    • setIdentifier

      public void setIdentifier(String identifier)
      Sets the identifier for this resource.
      Parameters:
      identifier - A string representing the identifier to be assigned to the resource.
    • getBase

      public String getBase()
      Retrieves the base URI or path associated with this resource.
      Returns:
      A string representing the base URI or path of the resource.
    • setBase

      public void setBase(String base)
      Sets the base URI or path for this resource.
      Parameters:
      base - A string representing the base URI or path to be assigned to the resource.
    • getHref

      public String getHref()
      Retrieves the href of this resource, which typically represents a relative path or URI associated with the resource.
      Returns:
      A string representing the href of the resource.
    • setHref

      public void setHref(String href)
      Sets the href value for this resource.
      Parameters:
      href - A string representing the relative path or URI associated with this resource. Typically, this specifies the target location of the resource within a SCORM content package.
    • getType

      public String getType()
      Retrieves the type of this resource.
      Returns:
      A string representing the type of the resource.
    • setType

      public void setType(String type)
      Sets the type of this resource.
      Parameters:
      type - A string representing the type to be assigned to the resource.
    • getScormType

      public ScormType getScormType()
      Retrieves the SCORM type associated with this resource. The SCORM type indicates whether the resource is a Shareable Content Object (SCO), an asset, or an unknown type. SCOs contain interactive and trackable learning content, while assets typically refer to static, non-interactive content.
      Returns:
      The SCORM type of this resource as an instance of the ScormType enum.
    • setScormType

      public void setScormType(ScormType scormType)
      Sets the SCORM type for this resource. The SCORM type determines whether the resource is a Shareable Content Object (SCO), an asset, or is of unknown type. This value is used to describe the role of the resource within a SCORM content package.
      Parameters:
      scormType - The SCORM type to be assigned to the resource, represented as an instance of the ScormType enum. Valid values include SCO, asset, or unknown.
    • getMetadata

      public Scorm12Metadata getMetadata()
      Retrieves the metadata associated with this resource.
      Returns:
      An instance of Scorm12Metadata containing metadata information for the resource.
    • setMetadata

      public void setMetadata(Scorm12Metadata metadata)
      Sets the metadata associated with this resource.
      Parameters:
      metadata - An instance of Scorm12Metadata representing the metadata to be assigned to the resource. This typically includes descriptive information to aid in the identification and management of the resource.
    • getFiles

      public List<Scorm12File> getFiles()
      Retrieves the list of files associated with this resource.
      Returns:
      A list of Scorm12File objects representing the files included in this resource. Each file contains information such as its relative path, metadata, and existence status within the SCORM package.
    • setFiles

      public void setFiles(List<Scorm12File> files)
      Sets the list of files associated with this SCORM 1.2 resource.
      Parameters:
      files - A list of Scorm12File objects representing the files to be associated with this resource. Each file typically defines its relative path and metadata within the SCORM content package.
    • getDependencies

      public List<Scorm12Dependency> getDependencies()
      Retrieves the list of dependencies associated with this SCORM 1.2 resource. Dependencies represent other resources required by this resource to function properly, such as linked scripts, stylesheets, or other assets.
      Returns:
      A list of Scorm12Dependency objects representing the resources that this resource depends on.
    • setDependencies

      public void setDependencies(List<Scorm12Dependency> dependencies)
      Sets the list of dependencies for this SCORM 1.2 resource. Dependencies represent other resources required by this resource to function correctly. These can include assets such as images, scripts, or other external files necessary for the proper functionality of the resource.
      Parameters:
      dependencies - A list of Scorm12Dependency objects representing the dependencies to be associated with this resource.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object