pub struct ParameterExtractor { /* private fields */ }Expand description
Extracts simulation parameters from RDF graphs and SAMM Aspect Models
Implementations§
Source§impl ParameterExtractor
impl ParameterExtractor
Sourcepub fn with_store(store: Arc<RdfStore>) -> Self
pub fn with_store(store: Arc<RdfStore>) -> Self
Create a parameter extractor with RDF store
Sourcepub fn with_config(self, config: ExtractionConfig) -> Self
pub fn with_config(self, config: ExtractionConfig) -> Self
Set configuration
Sourcepub async fn extract(
&self,
entity_iri: &str,
simulation_type: &str,
) -> PhysicsResult<SimulationParameters>
pub async fn extract( &self, entity_iri: &str, simulation_type: &str, ) -> PhysicsResult<SimulationParameters>
Extract simulation parameters from RDF
Sourcepub async fn extract_entity(
&self,
store: &RdfStore,
entity_uri: &str,
) -> PhysicsResult<PhysicalEntity>
pub async fn extract_entity( &self, store: &RdfStore, entity_uri: &str, ) -> PhysicsResult<PhysicalEntity>
Extract entity from RDF with all properties
Sourcepub async fn query_property(
&self,
store: &RdfStore,
entity: &NamedNode,
property: &str,
) -> PhysicsResult<Option<PhysicalValue>>
pub async fn query_property( &self, store: &RdfStore, entity: &NamedNode, property: &str, ) -> PhysicsResult<Option<PhysicalValue>>
Query a single property
Sourcepub fn convert_unit(
&self,
value: f64,
from: &str,
to: &str,
) -> PhysicsResult<f64>
pub fn convert_unit( &self, value: f64, from: &str, to: &str, ) -> PhysicsResult<f64>
Convert unit
Sourcepub fn fallback_to_default(&self, property: &str) -> PhysicalValue
pub fn fallback_to_default(&self, property: &str) -> PhysicalValue
Get fallback default value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParameterExtractor
impl !RefUnwindSafe for ParameterExtractor
impl Send for ParameterExtractor
impl Sync for ParameterExtractor
impl Unpin for ParameterExtractor
impl UnsafeUnpin for ParameterExtractor
impl !UnwindSafe for ParameterExtractor
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> 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