java.lang.Object
dev.jcputney.elearning.parser.input.scorm2004.sequencing.ActivityTree
All Implemented Interfaces:
Serializable

public class ActivityTree extends Object implements 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 Details

    • buildFromManifest

      public static Optional<ActivityTree> buildFromManifest(Scorm2004Manifest manifest)
      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

      public Optional<ActivityNode> getNodeByIdentifier(String identifier)
      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

      public List<ActivityNode> getLeafNodes()
      Gets all leaf nodes in the tree.
      Returns:
      A list of all leaf nodes
    • getRoot

      public ActivityNode getRoot()
      Gets the root node of the tree.
      Returns:
      The root node