pub struct QueryProvenanceTracker {
pub query_iri: NamedNode,
pub executed_at: String,
pub executed_by: NamedNode,
pub input_dataset: NamedNode,
pub result_dataset: NamedNode,
pub query_text: Option<String>,
}Expand description
Track the provenance of a SPARQL query execution
This captures who executed a query, when, against what dataset, and what result dataset was produced. It can be exported as a PROV-O bundle.
Fields§
§query_iri: NamedNodeIRI identifying this specific query execution
executed_at: StringWhen the query was executed (XSD dateTime string)
executed_by: NamedNodeIRI of the software agent that ran the query
input_dataset: NamedNodeIRI of the input dataset (the graph queried over)
result_dataset: NamedNodeIRI of the result dataset (the query output)
query_text: Option<String>Optional SPARQL query string
Implementations§
Source§impl QueryProvenanceTracker
impl QueryProvenanceTracker
Sourcepub fn new(
query_iri: NamedNode,
executed_at: String,
executed_by: NamedNode,
input_dataset: NamedNode,
result_dataset: NamedNode,
) -> Self
pub fn new( query_iri: NamedNode, executed_at: String, executed_by: NamedNode, input_dataset: NamedNode, result_dataset: NamedNode, ) -> Self
Create a new query provenance tracker
Sourcepub fn with_query_text(self, text: impl Into<String>) -> Self
pub fn with_query_text(self, text: impl Into<String>) -> Self
Attach the original SPARQL query text as a prov:value attribute
Sourcepub fn to_bundle(&self) -> ProvBundle
pub fn to_bundle(&self) -> ProvBundle
Convert this tracker to a PROV-O bundle
The bundle represents:
result_datasetwas generated byquery_iriquery_iriusedinput_datasetquery_iriwas associated withexecuted_byresult_datasetwas attributed toexecuted_by
Trait Implementations§
Source§impl Clone for QueryProvenanceTracker
impl Clone for QueryProvenanceTracker
Source§fn clone(&self) -> QueryProvenanceTracker
fn clone(&self) -> QueryProvenanceTracker
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for QueryProvenanceTracker
impl RefUnwindSafe for QueryProvenanceTracker
impl Send for QueryProvenanceTracker
impl Sync for QueryProvenanceTracker
impl Unpin for QueryProvenanceTracker
impl UnsafeUnpin for QueryProvenanceTracker
impl UnwindSafe for QueryProvenanceTracker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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