
Find organizing units that are also statements, and self-referential links
Source:R/graph-invariants.R
graph_identity_violations.RdTwo graph-level identity checks, both run over an assembled graph:
No IRI may be typed both
cybed:OrganizingUnitandcybed:RoleElement. An IRI that is both is one node standing for two different things, a unit and a statement, because the framework numbers them out of one id space.No
cybed:hasElementtriple may have the same subject and object. A unit that is its own element is the same defect seen from the edge rather than from the node.
The report is data. assert_graph_identity() is the gate.
Arguments
- rdf
An rdf object from
rdflib::rdf_parse()orload_combined_ntriples_graph().
Value
A tibble with one row per violation and three columns: check
("unit_element_collision" or "has_element_self_loop"), iri, and
framework (the local name of the framework the IRI declares with
cybed:partOf, or "(no framework)"). Zero rows when the graph is
clean.
See also
Other Graph invariants:
assert_graph_identity(),
assert_graph_invariants(),
graph_invariant_counts()
Examples
if (FALSE) { # \dontrun{
rdf <- load_combined_ntriples_graph()
graph_identity_violations(rdf)
} # }