This commit is contained in:
2026-08-20 20:43:18 -04:00
parent 025392b129
commit fcb1da7e0d
21 changed files with 637 additions and 178 deletions
+10 -1
View File
@@ -74,6 +74,15 @@ impl<'a> Indexer<'a> {
])
}
fn manifestation(&self, graph: &Graph, subject: NamedNodeRef) -> HashMap<Field, OwnedValue> {
HashMap::from_iter([
(
Schema::field("title", self.language.primary_language()),
self.extract_string(graph, subject, vocab::rdamd::TITLE_OF_MANIFESTATION),
),
])
}
pub fn graph(&self, graph: &Graph) -> crate::Result<Vec<HashMap<Field, OwnedValue>>> {
let mut entities_and_types = HashSet::new();
let triples = graph.triples_for_predicate(vocab::rdf::TYPE);
@@ -95,7 +104,7 @@ impl<'a> Indexer<'a> {
Class::Person => Some(self.person(graph, *subject)),
Class::CorporateBody => Some(self.corporate_body(graph, *subject)),
Class::Expression => Some(self.expression(graph, *subject)),
Class::Manifestation => Some(self.person(graph, *subject)),
Class::Manifestation => Some(self.manifestation(graph, *subject)),
}.map(|mut document| {
document.insert(Schema::discriminant_field(), OwnedValue::from(class as u64));
document.insert(Schema::iri_field(), OwnedValue::Str(subject.as_str().to_string()));