pub struct SchemaGraph {
pub graph: GraphName,
pub role: SchemaRole,
pub iri: Option<NamedNode>,
pub version: Option<String>,
pub sha256: Option<String>,
pub imports: Vec<NamedNode>,
pub applies_to: Vec<GraphName>,
pub active: bool,
pub loaded_at: Option<String>,
}Expand description
One registered graph, as <oxilite:schema> describes it.
Fields§
§graph: GraphName§role: SchemaRole§iri: Option<NamedNode>The owl:Ontology IRI, when it differs from the graph name.
version: Option<String>A version to pin (owl:versionIRI, a tag…).
sha256: Option<String>Digest of the document the graph was loaded from, for drift detection.
imports: Vec<NamedNode>Import targets (oxl:imports). An import naming another active registered ontology (by graph
name or oxl:ontologyIri) brings its axioms into this ontology’s scopes.
applies_to: Vec<GraphName>The graphs the schema applies to; empty means every graph (written as
oxl:appliesTo oxl:AllGraphs).
active: boolInactive graphs stay registered (and hidden) but stop contributing.
loaded_at: Option<String>When the graph was registered (xsd:dateTime lexical form).
Implementations§
Source§impl SchemaGraph
impl SchemaGraph
Sourcepub fn new(graph: GraphName, role: SchemaRole) -> Self
pub fn new(graph: GraphName, role: SchemaRole) -> Self
An active registration applying to every graph, with nothing else recorded.
Sourcepub fn applies(&self, target: GraphNameRef<'_>) -> bool
pub fn applies(&self, target: GraphNameRef<'_>) -> bool
Does this schema apply to target?
Trait Implementations§
Source§impl Clone for SchemaGraph
impl Clone for SchemaGraph
Source§impl Debug for SchemaGraph
impl Debug for SchemaGraph
impl Eq for SchemaGraph
Source§impl PartialEq for SchemaGraph
impl PartialEq for SchemaGraph
impl StructuralPartialEq for SchemaGraph
Auto Trait Implementations§
impl Freeze for SchemaGraph
impl RefUnwindSafe for SchemaGraph
impl Send for SchemaGraph
impl Sync for SchemaGraph
impl Unpin for SchemaGraph
impl UnsafeUnpin for SchemaGraph
impl UnwindSafe for SchemaGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more