This commit is contained in:
Alex Wied
2026-06-15 19:10:55 -04:00
parent d6b54137e1
commit 6df00eb5a3
4 changed files with 280 additions and 97 deletions
+4 -4
View File
@@ -21,7 +21,7 @@ use ldp::{RdfSource, RdfSourceUpdateResponse, ResourceRequestBuilder, Serializat
use oxigraph::io::RdfFormat;
use oxigraph::model::vocab::{rdf, rdfs};
use oxigraph::model::{BaseDirection, Dataset, NamedNode, Quad, Term, TermRef};
use tracing::{debug, error};
use tracing::{debug, error, info};
#[derive(Debug, Clone)]
pub(crate) enum Message {
@@ -187,12 +187,12 @@ impl Publisher {
document.add_text(Schema::iri_field(), rdf_source.origin());
for quad in rdf_source.dataset() {
if let Some(field_name) =
self.ontology.field_name(&quad.predicate.into_owned())
if let Some(field) =
self.ontology.field_for_property(&quad.predicate.into_owned())
&& let TermRef::Literal(literal) = quad.object
{
let field = Schema::schema()
.get_field(&field_name)
.get_field(&field.key)
.expect("Field not found in schema");
document.add_text(field, literal.value().to_lowercase());
}