Class Scorm12Resource
java.lang.Object
dev.jcputney.elearning.parser.input.scorm12.ims.cp.Scorm12Resource
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBase()Retrieves the base URI or path associated with this resource.Retrieves the list of dependencies associated with this SCORM 1.2 resource.getFiles()Retrieves the list of files associated with this resource.getHref()Retrieves the href of this resource, which typically represents a relative path or URI associated with the resource.Retrieves the identifier for this resource.Retrieves the metadata associated with this resource.Retrieves the SCORM type associated with this resource.getType()Retrieves the type of this resource.inthashCode()voidSets the base URI or path for this resource.voidsetDependencies(List<Scorm12Dependency> dependencies) Sets the list of dependencies for this SCORM 1.2 resource.voidsetFiles(List<Scorm12File> files) Sets the list of files associated with this SCORM 1.2 resource.voidSets the href value for this resource.voidsetIdentifier(String identifier) Sets the identifier for this resource.voidsetMetadata(Scorm12Metadata metadata) Sets the metadata associated with this resource.voidsetScormType(ScormType scormType) Sets the SCORM type for this resource.voidSets the type of this resource.
-
Constructor Details
-
Scorm12Resource
public Scorm12Resource()Constructs an instance of theScorm12Resourceclass.This is the default, no-argument constructor. It initializes a new instance of the
Scorm12Resourceclass without setting any initial values for the class fields.
-
-
Method Details
-
getIdentifier
Retrieves the identifier for this resource.- Returns:
- A string representing the identifier of the resource.
-
setIdentifier
Sets the identifier for this resource.- Parameters:
identifier- A string representing the identifier to be assigned to the resource.
-
getBase
Retrieves the base URI or path associated with this resource.- Returns:
- A string representing the base URI or path of the resource.
-
setBase
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
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
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
Retrieves the type of this resource.- Returns:
- A string representing the type of the resource.
-
setType
Sets the type of this resource.- Parameters:
type- A string representing the type to be assigned to the resource.
-
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
ScormTypeenum.
-
setScormType
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 theScormTypeenum. Valid values include SCO, asset, or unknown.
-
getMetadata
Retrieves the metadata associated with this resource.- Returns:
- An instance of
Scorm12Metadatacontaining metadata information for the resource.
-
setMetadata
Sets the metadata associated with this resource.- Parameters:
metadata- An instance ofScorm12Metadatarepresenting the metadata to be assigned to the resource. This typically includes descriptive information to aid in the identification and management of the resource.
-
getFiles
Retrieves the list of files associated with this resource.- Returns:
- A list of
Scorm12Fileobjects 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
Sets the list of files associated with this SCORM 1.2 resource.- Parameters:
files- A list ofScorm12Fileobjects representing the files to be associated with this resource. Each file typically defines its relative path and metadata within the SCORM content package.
-
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
Scorm12Dependencyobjects representing the resources that this resource depends on.
-
setDependencies
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 ofScorm12Dependencyobjects representing the dependencies to be associated with this resource.
-
equals
-
hashCode
public int hashCode()
-