Class Scorm2004Manifest
- All Implemented Interfaces:
PackageManifest,Serializable
This class encapsulates properties and structure for SCORM content packages, including manifest, metadata, organizations, resources, and dependencies. It is designed to conform to the IMS Content Packaging specification, enabling SCORM-compliant content to be organized and referenced in an LMS.
The IMSCP namespace is specified by NAMESPACE_URI, and this class
is designed to align with the SCORM 2004 standards.
The following schema shows the structure of a "manifest" element:
<?xml version = "1.0" encoding = "UTF-8"?>
<xsd:schema xmlns = "http://www.imsglobal.org/xsd/imscp_v1p1"
targetNamespace = "http://www.imsglobal.org/xsd/imscp_v1p1"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
version = "IMS CP 1.1.4"
elementFormDefault = "qualified">
<xsd:import namespace = "http://www.w3.org/XML/1998/namespace" schemaLocation = "xml.xsd"/>
<xsd:attributeGroup name = "attr.base">
<xsd:attribute ref = "xml:base"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.default">
<xsd:attribute name = "default" type = "xsd:IDREF"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.href">
<xsd:attribute name = "href" type = "xsd:anyURI"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.href.req">
<xsd:attribute name = "href" use = "required" type = "xsd:anyURI"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.identifier.req">
<xsd:attribute name = "identifier" use = "required" type = "xsd:ID"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.identifier">
<xsd:attribute name = "identifier" type = "xsd:ID"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.isvisible">
<xsd:attribute name = "isvisible" type = "xsd:boolean"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.parameters">
<xsd:attribute name = "parameters" type = "xsd:string"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.identifierref">
<xsd:attribute name = "identifierref" type = "xsd:string"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.identifierref.req">
<xsd:attribute name = "identifierref" use = "required" type = "xsd:string"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.resourcetype.req">
<xsd:attribute name = "type" use = "required" type = "xsd:string"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.structure.req">
<xsd:attribute name = "structure" default = "hierarchical" type = "xsd:string"/>
</xsd:attributeGroup>
<xsd:attributeGroup name = "attr.version">
<xsd:attribute name = "version" type = "xsd:string"/>
</xsd:attributeGroup>
<xsd:group name = "grp.any">
<xsd:annotation>
<xsd:documentation>Any namespaced element from any namespace may be included within an "any" element. The namespace for the imported element must be defined in the instance, and the schema must be imported. </xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:any namespace = "##other" processContents = "lax" minOccurs = "0" maxOccurs = "unbounded"/>
</xsd:sequence>
</xsd:group>
<xsd:element name = "dependency" type = "dependencyType"/>
<xsd:element name = "file" type = "fileType"/>
<xsd:element name = "item" type = "itemType"/>
<xsd:element name = "manifest" type = "manifestType"/>
<xsd:element name = "metadata" type = "metadataType"/>
<xsd:element name = "organization" type = "organizationType"/>
<xsd:element name = "organizations" type = "organizationsType"/>
<xsd:element name = "resource" type = "resourceType"/>
<xsd:element name = "resources" type = "resourcesType"/>
<xsd:element name = "schema" type = "schemaType"/>
<xsd:element name = "schemaversion" type = "schemaversionType"/>
<xsd:element name = "title" type = "titleType"/>
<xsd:complexType name = "dependencyType">
<xsd:sequence>
<xsd:group ref = "grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref = "attr.identifierref.req"/>
<xsd:anyAttribute namespace = "##other" processContents = "strict"/>
</xsd:complexType>
<xsd:complexType name = "fileType">
<xsd:sequence>
<xsd:element ref = "metadata" minOccurs = "0"/>
<xsd:group ref = "grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref = "attr.href.req"/>
<xsd:anyAttribute namespace = "##other" processContents = "lax"/>
</xsd:complexType>
<xsd:complexType name = "itemType">
<xsd:sequence>
<xsd:element ref = "title" minOccurs = "0"/>
<xsd:element ref = "item" minOccurs = "0" maxOccurs = "unbounded"/>
<xsd:element ref = "metadata" minOccurs = "0"/>
<xsd:group ref = "grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref = "attr.identifier.req"/>
<xsd:attributeGroup ref = "attr.identifierref"/>
<xsd:attributeGroup ref = "attr.isvisible"/>
<xsd:attributeGroup ref = "attr.parameters"/>
<xsd:anyAttribute namespace = "##other" processContents = "lax"/>
</xsd:complexType>
<xsd:complexType name = "manifestType">
<xsd:sequence>
<xsd:element ref = "metadata" minOccurs = "0"/>
<xsd:element ref = "organizations"/>
<xsd:element ref = "resources"/>
<xsd:element ref = "manifest" minOccurs = "0" maxOccurs = "unbounded"/>
<xsd:group ref = "grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref = "attr.identifier.req"/>
<xsd:attributeGroup ref = "attr.version"/>
<xsd:attribute ref = "xml:base"/>
<xsd:anyAttribute namespace = "##other" processContents = "lax"/>
</xsd:complexType>
<xsd:complexType name = "metadataType">
<xsd:sequence>
<xsd:element ref = "schema" minOccurs = "0"/>
<xsd:element ref = "schemaversion" minOccurs = "0"/>
<xsd:group ref = "grp.any"/>
</xsd:sequence>
<xsd:anyAttribute namespace = "##other" processContents = "lax"/>
</xsd:complexType>
<xsd:complexType name = "organizationsType">
<xsd:sequence>
<xsd:element ref = "organization" minOccurs = "0" maxOccurs = "unbounded"/>
<xsd:group ref = "grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref = "attr.default"/>
<xsd:anyAttribute namespace = "##other" processContents = "lax"/>
</xsd:complexType>
<xsd:complexType name = "organizationType">
<xsd:sequence>
<xsd:element ref = "title" minOccurs = "0"/>
<xsd:element ref = "item" maxOccurs = "unbounded"/>
<xsd:element ref = "metadata" minOccurs = "0"/>
<xsd:group ref = "grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref = "attr.identifier.req"/>
<xsd:attributeGroup ref = "attr.structure.req"/>
<xsd:anyAttribute namespace = "##other" processContents = "lax"/>
</xsd:complexType>
<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 = "lax"/>
</xsd:complexType>
<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:group ref = "grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref = "attr.identifier.req"/>
<xsd:attributeGroup ref = "attr.resourcetype.req"/>
<xsd:attributeGroup ref = "attr.base"/>
<xsd:attributeGroup ref = "attr.href"/>
<xsd:anyAttribute namespace = "##other" processContents = "lax"/>
</xsd:complexType>
<xsd:simpleType name = "schemaType">
<xsd:restriction base = "xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name = "schemaversionType">
<xsd:restriction base = "xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name = "titleType">
<xsd:restriction base = "xsd:string"/>
</xsd:simpleType>
</xsd:schema>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe XML namespace URI for SCORM IMS Content Packaging (imscp_v1p1). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds an ActivityTree from this manifest.booleanRetrieves the ADLCP (Advanced Distributed Learning Content Package) namespace URI.Retrieves the namespace URI associated with ADL navigation.Retrieves the namespace URI associated with the ADL sequence.Returns the description of the content package, which is typically a summary or overview of the content.Retrieves the duration of the content package in a null-safe manner.Retrieves the set of global objective IDs from the manifest.Retrieves the identifier of this SCORM 2004 manifest.Retrieves the IMS Simple Sequencing namespace URI.Returns the launch URL for the content package, which is typically the URL of the first resource in the package.getLaunchUrlForItem(String itemId) Returns the launch URL for a specific item within the content package, which is typically the URL of the first resource associated with the item.Retrieves the metadata associated with the SCORM 2004 course manifest.Retrieves the organizations defined in the SCORM 2004 manifest.Retrieves the SCORM 2004 resources.Retrieves the schema location.Retrieves the set of SCO IDs from the manifest.Retrieves the sequencing collection instance associated with this object.Returns the set of sequencing indicators discovered within this manifest.Returns the detected sequencing level for this manifest.getTitle()Returns the title of the content package, which is typically the name or title of the course.Retrieves the version of the SCORM 2004 manifest.inthashCode()voidsetAdlcpNamespaceUri(String adlcpNamespaceUri) Sets the ADLCP namespace URI.voidsetAdlnavNamespaceUri(String adlnavNamespaceUri) Sets the ADL Navigation namespace URI.voidsetAdlseqNamespaceUri(String adlseqNamespaceUri) Sets the namespace URI for ADL sequencing.voidsetIdentifier(String identifier) Sets the identifier for the SCORM 2004 manifest.voidsetImsssNamespaceUri(String imsssNamespaceUri) Sets the IMS Simple Sequencing (IMSSS) namespace URI.voidsetMetadata(Scorm2004CourseMetadata metadata) Sets the metadata for the SCORM 2004 course manifest.voidsetOrganizations(Scorm2004Organizations organizations) Sets the organizations information for the SCORM 2004 manifest.voidsetResources(Scorm2004Resources resources) Sets the SCORM 2004 resources.voidsetSchemaLocation(String schemaLocation) Sets the schema location for the current instance.voidsetSequencingCollection(SequencingCollection sequencingCollection) Sets the sequencingCollection with the provided SequencingCollection object.voidsetVersion(String version) Sets the version of the SCORM 2004 manifest.booleanChecks if this manifest uses sequencing.
-
Field Details
-
NAMESPACE_URI
The XML namespace URI for SCORM IMS Content Packaging (imscp_v1p1).- See Also:
-
-
Constructor Details
-
Scorm2004Manifest
public Scorm2004Manifest()Default constructor for the Scorm2004Manifest class. This constructor initializes an instance of the Scorm2004Manifest without any additional setup or parameters.
-
-
Method Details
-
getTitle
Returns the title of the content package, which is typically the name or title of the course.- Specified by:
getTitlein interfacePackageManifest- Returns:
- the title of the content package
-
getDescription
Returns the description of the content package, which is typically a summary or overview of the content.- Specified by:
getDescriptionin interfacePackageManifest- Returns:
- the description of the content package
-
getLaunchUrl
Returns the launch URL for the content package, which is typically the URL of the first resource in the package.- Specified by:
getLaunchUrlin interfacePackageManifest- Returns:
- the launch URL for the content package
-
getLaunchUrlForItem
Returns the launch URL for a specific item within the content package, which is typically the URL of the first resource associated with the item.- Parameters:
itemId- the unique identifier of the item- Returns:
- an Optional containing the launch URL for the item, or empty if no URL is available
-
getDuration
Retrieves the duration of the content package in a null-safe manner. If no duration is available, a default value of Duration.ZERO is returned.- Specified by:
getDurationin interfacePackageManifest- Returns:
- the duration of the content package, or Duration.ZERO if unavailable
-
getGlobalObjectiveIds
Retrieves the set of global objective IDs from the manifest.A global objective ID is defined by the presence of a targetObjectiveID in a mapInfo element. Global objectives are used to share data between different SCOs.
- Returns:
- A set of global objective IDs, or an empty set if none are found
-
getSCOIds
Retrieves the set of SCO IDs from the manifest.A SCO (Shareable Content Object) is a resource with scormType="sco". SCOs are the trackable, interactive components of a SCORM package that communicate with the LMS.
JSON serialization note: This property is exposed as "scoids" for backward compatibility but is marked as read-only to prevent Jackson from attempting to populate it during deserialization (which could cause UnsupportedOperationException due to immutable Sets).
- Returns:
- A set of SCO IDs, or an empty set if none are found
-
buildActivityTree
Builds an ActivityTree from this manifest.The ActivityTree represents the hierarchical structure of learning activities in the content package, including sequencing information. It can be used by an LMS to implement SCORM 2004 sequencing and navigation.
- Returns:
- An Optional containing the ActivityTree or empty if no default organization is found
-
usesSequencing
public boolean usesSequencing()Checks if this manifest uses sequencing.A manifest uses sequencing if it has a sequencing collection or if any organization or item in the manifest has sequencing information.
- Returns:
- true if this manifest uses sequencing, false otherwise
-
getSequencingLevel
Returns the detected sequencing level for this manifest.- Returns:
- the sequencing level (NONE, MINIMAL, or FULL)
-
getSequencingIndicators
Returns the set of sequencing indicators discovered within this manifest.- Returns:
- immutable set of detected sequencing indicators
-
getIdentifier
Retrieves the identifier of this SCORM 2004 manifest.- Specified by:
getIdentifierin interfacePackageManifest- Returns:
- the identifier of the manifest as a String
-
setIdentifier
Sets the identifier for the SCORM 2004 manifest.- Parameters:
identifier- the unique identifier to be assigned to the manifest
-
getVersion
Retrieves the version of the SCORM 2004 manifest.- Specified by:
getVersionin interfacePackageManifest- Returns:
- the version as a String
-
setVersion
Sets the version of the SCORM 2004 manifest.- Parameters:
version- the version to be assigned to the manifest
-
getMetadata
Retrieves the metadata associated with the SCORM 2004 course manifest.- Returns:
- the metadata of the SCORM 2004 course as an instance of Scorm2004CourseMetadata
-
setMetadata
Sets the metadata for the SCORM 2004 course manifest.- Parameters:
metadata- the metadata to be associated with the SCORM 2004 course
-
getOrganizations
Retrieves the organizations defined in the SCORM 2004 manifest.- Returns:
- an instance of Scorm2004Organizations representing the organizations in the manifest
-
setOrganizations
Sets the organizations information for the SCORM 2004 manifest.- Parameters:
organizations- an instance of Scorm2004Organizations representing the organizations to be defined in the manifest
-
getResources
Retrieves the SCORM 2004 resources.- Returns:
- the Scorm2004Resources object containing the resources.
-
setResources
Sets the SCORM 2004 resources.- Parameters:
resources- the SCORM 2004 resources to be set
-
getSequencingCollection
Retrieves the sequencing collection instance associated with this object.- Returns:
- the SequencingCollection instance maintained by this object
-
setSequencingCollection
Sets the sequencingCollection with the provided SequencingCollection object.- Parameters:
sequencingCollection- the SequencingCollection to be assigned
-
getAdlcpNamespaceUri
Retrieves the ADLCP (Advanced Distributed Learning Content Package) namespace URI.- Returns:
- The ADLCP namespace URI as a String.
-
setAdlcpNamespaceUri
Sets the ADLCP namespace URI.- Parameters:
adlcpNamespaceUri- the ADLCP namespace URI to set
-
getImsssNamespaceUri
Retrieves the IMS Simple Sequencing namespace URI.- Returns:
- the IMS Simple Sequencing namespace URI as a string
-
setImsssNamespaceUri
Sets the IMS Simple Sequencing (IMSSS) namespace URI.- Parameters:
imsssNamespaceUri- the namespace URI to be set for IMS Simple Sequencing
-
getAdlseqNamespaceUri
Retrieves the namespace URI associated with the ADL sequence.- Returns:
- the namespace URI as a String.
-
setAdlseqNamespaceUri
Sets the namespace URI for ADL sequencing.- Parameters:
adlseqNamespaceUri- the namespace URI to be set for ADL sequencing
-
getSchemaLocation
Retrieves the schema location.- Returns:
- the schema location as a String
-
setSchemaLocation
Sets the schema location for the current instance.- Parameters:
schemaLocation- the schema location to be set, typically a URI or path that specifies the location of the schema.
-
equals
-
hashCode
public int hashCode()
-