This commit is contained in:
Alex Wied
2026-07-01 21:28:12 -04:00
parent 6b8f4ccb3d
commit 038afc4645
4 changed files with 24 additions and 71 deletions
+4 -1
View File
@@ -1,6 +1,5 @@
use oxigraph::model::{NamedNode, Quad, Term};
use oxigraph::model::vocab::{rdf, xsd};
use oxilangtag::LanguageTag;
pub fn quad_into_term(quad: Quad) -> Term {
quad.object
@@ -61,4 +60,8 @@ pub fn term_to_u64(term: &Term) -> Option<u64> {
let value: u64 = literal.value().parse().expect("Failed to parse u64 from ontology. It ought to be a non-negative integer.");
Some(value)
} else { None }
}
pub fn term_into_u64(term: Term) -> Option<u64> {
term_to_u64(&term)
}