Class ActivityNode
java.lang.Object
dev.jcputney.elearning.parser.input.scorm2004.sequencing.ActivityNode
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionvoidaddChild(ActivityNode child) Adds a child node to this node.static ActivityNodefromItem(Scorm2004Item item, ActivityNode parent) Creates an ActivityNode from a Scorm2004Item.static ActivityNodefromOrganization(Scorm2004Organization organization) Creates an ActivityNode from a Scorm2004Organization.Gets the children of this node.Gets the parent of this node.Gets the resource identifier for this node.Gets the sequencing information for this node.
-
Method Details
-
fromOrganization
Creates an ActivityNode from a Scorm2004Organization.- Parameters:
organization- The organization to create the node from- Returns:
- The created ActivityNode
-
fromItem
Creates an ActivityNode from a Scorm2004Item.- Parameters:
item- The item to create the node fromparent- The parent node- Returns:
- The created ActivityNode
-
addChild
Adds a child node to this node.- Parameters:
child- The child node to add
-
getChildren
Gets the children of this node.- Returns:
- An unmodifiable list of child nodes
-
getParent
Gets the parent of this node.- Returns:
- An Optional containing the parent node, or empty if this is the root node
-
getSequencing
Gets the sequencing information for this node.- Returns:
- An Optional containing the sequencing information, or empty if none is defined
-
getResourceIdentifier
Gets the resource identifier for this node.- Returns:
- An Optional containing the resource identifier, or empty if none is defined
-