pub struct SpeciesCorpusBuilder { /* private fields */ }Expand description
Collects sources, assertions and gaps, then validates them as one corpus.
Implementations§
Source§impl SpeciesCorpusBuilder
impl SpeciesCorpusBuilder
pub fn new( corpus_iri: &str, taxon_concept_iri: &str, species_id: &str, revision: &str, ) -> Self
pub fn source(self, source: CorpusSource) -> Self
Sourcepub fn source_from_ingest(
self,
id: &str,
title: &str,
record: &IngestProvenanceRecord,
) -> Self
pub fn source_from_ingest( self, id: &str, title: &str, record: &IngestProvenanceRecord, ) -> Self
Adds a source whose integrity fields come from an ingest provenance record.
pub fn assertion(self, assertion: EvidencedAssertion) -> Self
pub fn gap(self, gap: KnowledgeGap) -> Self
Sourcepub fn gap_if_missing(
self,
id: &str,
group: KnowledgeGroup,
property_iri: &str,
part_iri: Option<&str>,
reason: &str,
) -> Self
pub fn gap_if_missing( self, id: &str, group: KnowledgeGroup, property_iri: &str, part_iri: Option<&str>, reason: &str, ) -> Self
Records a gap when no assertion covers property_iri (and part_iri, when set).
Sourcepub fn build(self) -> Result<SpeciesCorpus, String>
pub fn build(self) -> Result<SpeciesCorpus, String>
Validates the collected corpus. Disagreement between sources is kept, not rejected.
Trait Implementations§
Source§impl Clone for SpeciesCorpusBuilder
impl Clone for SpeciesCorpusBuilder
Auto Trait Implementations§
impl Freeze for SpeciesCorpusBuilder
impl RefUnwindSafe for SpeciesCorpusBuilder
impl Send for SpeciesCorpusBuilder
impl Sync for SpeciesCorpusBuilder
impl Unpin for SpeciesCorpusBuilder
impl UnsafeUnpin for SpeciesCorpusBuilder
impl UnwindSafe for SpeciesCorpusBuilder
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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