Skip to main content

SummaryView

Struct SummaryView 

Source
pub struct SummaryView {
    pub round: u32,
    pub summary: Vec<SuperEdge>,
    pub class_hierarchy: Vec<ClassNode>,
    pub level_rollups: Vec<LevelRollup>,
    pub level_links: Vec<LevelLinks>,
    pub descriptors: Vec<CommunityDescriptor>,
    pub subclass_cycles: Vec<Vec<String>>,
    pub disjoint_pairs: Vec<(String, String)>,
    pub equivalent_pairs: Vec<(String, String)>,
    /* private fields */
}
Expand description

A lightweight, overview-only view of a file: the pyramid summary graph plus just enough dictionary to label predicates. Fetched via ranges without touching the (large) triple index — the “load the coarse graph first” path from SPEC.md §7.2.

Fields§

§round: u32§summary: Vec<SuperEdge>§class_hierarchy: Vec<ClassNode>

The shipped subClassOf hierarchy (v2 schema pyramid; empty on v1 files).

§level_rollups: Vec<LevelRollup>

Per-level type rollups — the leveled legend, read index-free.

§level_links: Vec<LevelLinks>

Per-level lateral class-relation graph (the non-is-a connections).

§descriptors: Vec<CommunityDescriptor>

Per-community descriptors (Phase 4 progressive refinement; may be empty).

§subclass_cycles: Vec<Vec<String>>

subClassOf cycles (v2.1; empty on older files).

§disjoint_pairs: Vec<(String, String)>

owl:disjointWith class pairs (v2.1; empty on older files).

§equivalent_pairs: Vec<(String, String)>

owl:equivalentClass class pairs (v2.1; empty on older files).

Implementations§

Source§

impl SummaryView

Source

pub fn open_ranged<R: RangeReader>( reader: &R, ) -> Result<Option<Self>, FileError>

Read header → dictionary → pyramid-meta only (skips the index container).

Source

pub fn open_schema_ranged<R: RangeReader>( reader: &R, ) -> Result<Option<Self>, FileError>

A schema-only view of a file without a pyramid, from its SCHEMA section (kind 9): the hierarchy, levels and axioms, with an empty community summary. Reads the header and the SCHEMA section only — the section carries its own class and predicate strings, so no dictionary. Ok(None) when the file has no SCHEMA section. Callers that need the summary (cost, federation source selection, progressive queries) use open_ranged, which keeps requiring a pyramid.

Source

pub fn level_count(&self) -> usize

Number of semantic-zoom levels in the schema pyramid (0 if none shipped).

Source

pub fn level_rollup(&self, k: usize) -> Option<&LevelRollup>

The type rollup at semantic level k (0 = coarsest/most abstract), or None if k is out of range. Index-free — answered from the pyramid-meta.

Source

pub fn predicate_term(&self, id: u32) -> Option<String>

Resolve a predicate ID in the summary to its term.

Source

pub fn predicate_total(&self, predicate: &str) -> u32

Exact number of triples using predicate, summed from the summary’s superedge counts — answered without ever reading the triple index.

Source

pub fn predicate_totals(&self) -> Vec<(String, u32)>

All predicates with their exact triple totals, descending by count.

Source

pub fn community_count(&self) -> usize

Number of communities the summary spans (distinct supernode endpoints).

Source

pub fn tbox_coherence(&self) -> Vec<Inconsistency>

Index-free T-Box coherence (Tier-0). Detect schema-level incoherent points purely from the shipped schema pyramid — no triple index, no instance data, O(ontology) regardless of graph size:

  • subclass-cycle: a set of classes that are mutually rdfs:subClassOf.
  • unsatisfiable-class: a class whose ancestor closure (over all parents, folded through owl:equivalentClass) contains both ends of an owl:disjointWith pair, so no individual can ever be one.

Soundness is bounded by what the pyramid ships: the subClassOf hierarchy is capped (MAX_HIERARCHY in schema_pyramid), so on a very large ontology a pruned ancestor can hide an unsatisfiable class (a false coherent, never a false incoherent). Instance-level clashes (a node typed into disjoint classes, functional-property clashes) are NOT visible here — they need the A-Box (Tier-1/Tier-2 reason).

Source

pub fn tbox_is_coherent(&self) -> bool

True when tbox_coherence finds no schema-level incoherent point.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V