Class ActivityTree
java.lang.Object
dev.jcputney.elearning.parser.input.scorm2004.sequencing.ActivityTree
- All Implemented Interfaces:
Serializable
Represents a SCORM 2004 Activity Tree.
An ActivityTree is a hierarchical structure of ActivityNodes that represents the organization of learning activities in a SCORM 2004 content package. It is built from the manifest and provides methods to navigate and manipulate the tree.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<ActivityTree>buildFromManifest(Scorm2004Manifest manifest) Builds an ActivityTree from a SCORM 2004 manifest.Gets all leaf nodes in the tree.getNodeByIdentifier(String identifier) Gets a node by its identifier.getRoot()Gets the root node of the tree.
-
Method Details
-
buildFromManifest
Builds an ActivityTree from a SCORM 2004 manifest.- Parameters:
manifest- The manifest to build the tree from- Returns:
- The built ActivityTree, or empty if no default organization is found
-
getNodeByIdentifier
Gets a node by its identifier.- Parameters:
identifier- The identifier of the node to get- Returns:
- An Optional containing the node, or empty if not found
-
getLeafNodes
Gets all leaf nodes in the tree.- Returns:
- A list of all leaf nodes
-
getRoot
Gets the root node of the tree.- Returns:
- The root node
-