MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / kg_finding

Method kg_finding

atomic-core/src/pristine/txn/write/session_kg.rs:41–49  ·  view source on GitHub ↗
(&mut self, code: &str, subject: &str, message: &str)

Source from the content-addressed store, hash-verified

39 }
40
41 pub fn kg_finding(&mut self, code: &str, subject: &str, message: &str) -> PristineResult<()> {
42 let id = iri::mint_finding(&self.kg_project()?, code, subject);
43 self.upsert_kg_node(
44 &KgNode::new(&id, Class::Finding, code, "findings")
45 .with_summary(message)
46 .with_metadata(serde_json::json!({"finding_code": code})),
47 )?;
48 self.upsert_kg_edge(&KgEdge::new(id, subject, Predicate::AboutResource))
49 }
50
51 pub fn kg_clear_finding(&mut self, code: &str, subject: &str) -> PristineResult<()> {
52 self.del_kg_node(&iri::mint_finding(&self.kg_project()?, code, subject))?;

Callers 3

emit_turn_kgMethod · 0.80
project_change_kgMethod · 0.80

Calls 6

mint_findingFunction · 0.85
kg_projectMethod · 0.80
upsert_kg_nodeMethod · 0.80
with_summaryMethod · 0.80
upsert_kg_edgeMethod · 0.80
with_metadataMethod · 0.45

Tested by 1