(graph: &'a [Triple], subject: &str, predicate: &str)
| 14 | } |
| 15 | |
| 16 | fn objects<'a>(graph: &'a [Triple], subject: &str, predicate: &str) -> BTreeSet<&'a str> { |
| 17 | graph |
| 18 | .iter() |
| 19 | .filter_map(|triple| match (&triple.subject, &triple.object) { |
| 20 | (Subject::NamedNode(s), Term::NamedNode(o)) |
| 21 | if s.as_str() == subject && triple.predicate.as_str() == predicate => |
| 22 | { |
| 23 | Some(o.as_str()) |
| 24 | } |
| 25 | _ => None, |
| 26 | }) |
| 27 | .collect() |
| 28 | } |
| 29 | |
| 30 | #[test] |
| 31 | fn registry_matches_the_complete_versioned_ontology() { |
no test coverage detected