Skip to main content

Crate ontologos_parser

Crate ontologos_parser 

Source
Expand description

OWL and RDF syntax parsers for OntoLogos.

v0.2 loads OWL/XML, RDF/XML, Turtle, and OWL Functional Syntax into ontologos_core::Ontology via load_ontology.

§Example

use ontologos_parser::load_ontology;

let ontology = load_ontology(std::path::Path::new("ontology.owl"))?;
println!("axioms: {}", ontology.axiom_count());

See load guide.

Structs§

ParseLimits
Resource limits for OWL file parsing.

Enums§

Error
Errors returned by the OWL/RDF parser.
Format
Supported ontology serialization formats.

Functions§

detect_format
Detect the most likely format from a file path and optional content sniffing.
detect_format_from_bytes
Detect format from file content bytes.
detect_functional_from_bytes
Detect OWL Functional Syntax from a file header.
detect_turtle_from_bytes
Sniff the first bytes of a file for Turtle @prefix or PREFIX declarations.
load_ontology
Load an ontology from a validated file path.
load_ontology_in
Load an ontology constrained to stay under base (untrusted uploads).
load_ontology_with_limits
Load an ontology with custom ParseLimits.
load_ontology_with_limits_and_base
Load an ontology with custom limits and optional sandbox base directory.
validate_load_path
Resolve and validate a path before loading an ontology file.

Type Aliases§

Result
Result type alias for parser operations.