
Append Subpoint IDs to a role's child-element id list
Source:R/jsonld-helpers.R
extend_role_element_ids.RdHelper for the assembly pipeline. Given a vector of parent element IDs
(the role's children before sub-point expansion) and a sub-node index
from expand_with_subpoints(), returns the original IDs plus all
Subpoint IDs whose parent is in the input vector. Preserves order:
parents first, Subpoints second. De-duplicates.
Example IDs are deliberately excluded. cybed:Example instances are
reachable via the parent element's cybed:hasExample predicate rather
than via the role's cybed:hasElement collection; including them here
would route teacher-facing pedagogical scaffolding into role-level
"all elements" traversals where it does not belong.
Arguments
- parent_element_ids
Character vector of parent element IDs.
- subnode_index
A tibble with columns
parent_id,subnode_id,ordinal,node_type(typically thesubnode_indexfield returned byexpand_with_subpoints()).
See also
Other Sub-point parsing:
build_example_node(),
build_subpoint_node(),
expand_with_subpoints(),
parse_subpoints()