.
This commit is contained in:
+10
-1
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user