Class Scorm12Resources
java.lang.Object
dev.jcputney.elearning.parser.input.scorm12.ims.cp.Scorm12Resources
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBase()Retrieves the base URL associated with the resources in the content package.Retrieves a resource by its identifier.Retrieves the list of SCORM 1.2 resources.inthashCode()voidSets the base URL associated with the resources in the SCORM content package.voidsetResourceList(List<Scorm12Resource> resourceList) Sets the list of SCORM 1.2 resources for this content package.
-
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
Retrieves a resource by its identifier.- Parameters:
id- The identifier of the resource to retrieve.- Returns:
- An
Optionalcontaining the resource if found, or an empty Optional if not found.
-
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
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
Retrieves the list of SCORM 1.2 resources.- Returns:
- A list of
Scorm12Resourceobjects representing the resources.
-
setResourceList
Sets the list of SCORM 1.2 resources for this content package.- Parameters:
resourceList- A list ofScorm12Resourceobjects to set. These objects represent the resources associated with the content package.
-
equals
-
hashCode
public int hashCode()
-