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

public class ActivityNode extends Object implements Serializable
Represents a node in the SCORM 2004 Activity Tree.

An ActivityNode can represent either an organization or an item in the SCORM 2004 manifest. It contains references to its parent and children, as well as the sequencing information associated with the node.

See Also:
  • Method Details

    • fromOrganization

      public static ActivityNode fromOrganization(Scorm2004Organization organization)
      Creates an ActivityNode from a Scorm2004Organization.
      Parameters:
      organization - The organization to create the node from
      Returns:
      The created ActivityNode
    • fromItem

      public static ActivityNode fromItem(Scorm2004Item item, ActivityNode parent)
      Creates an ActivityNode from a Scorm2004Item.
      Parameters:
      item - The item to create the node from
      parent - The parent node
      Returns:
      The created ActivityNode
    • addChild

      public void addChild(ActivityNode child)
      Adds a child node to this node.
      Parameters:
      child - The child node to add
    • getChildren

      public List<ActivityNode> getChildren()
      Gets the children of this node.
      Returns:
      An unmodifiable list of child nodes
    • getParent

      public Optional<ActivityNode> getParent()
      Gets the parent of this node.
      Returns:
      An Optional containing the parent node, or empty if this is the root node
    • getSequencing

      public Optional<Sequencing> getSequencing()
      Gets the sequencing information for this node.
      Returns:
      An Optional containing the sequencing information, or empty if none is defined
    • getResourceIdentifier

      public Optional<String> getResourceIdentifier()
      Gets the resource identifier for this node.
      Returns:
      An Optional containing the resource identifier, or empty if none is defined