
Assemble a framework-level @graph document
Source: R/jsonld-helpers.R
assemble_framework_document.RdConvenience constructor that wraps the supplied framework, role, and
element nodes into a single top-level JSON-LD document with the
appropriate @context.
Usage
assemble_framework_document(
framework_node,
role_nodes,
element_nodes,
framework_prefix,
relation_nodes = list()
)Arguments
- framework_node
Named list produced by
build_framework_node().- role_nodes
List of named lists produced by
build_role_node().- element_nodes
List of named lists produced by
build_role_element_node().- framework_prefix
Character, the Tier 2 prefix.
- relation_nodes
List of named lists produced by
build_unit_relation_node(). Optional: frameworks that publish no qualified unit-to-unit statements pass nothing and the@graphis unchanged.
Examples
fw <- build_framework_node(
framework_id = "nice-v2",
framework_name = "NICE",
framework_prefix = "nice",
version = "2.0.0",
publisher = "NIST",
jurisdiction = "US",
sector = "civilian",
specificity = "cybersecurity-specific"
)
role <- build_role_node(
role_id = "OG-WRL-015",
role_name = "Cybersecurity Architecture",
framework_prefix = "nice",
framework_role_type = "WorkRole",
framework_id = "nice-v2"
)
doc <- assemble_framework_document(fw, list(role), list(), "nice")
names(doc)
#> [1] "@context" "@graph"