pub struct DistributedEntityResolver<E: EndpointExecutor> { /* private fields */ }Expand description
Resolves entity identity across endpoints using owl:sameAs links.
The resolver computes the transitive sameAs closure: if A sameAs B and B sameAs C, all three are placed in the same equivalence class.
Implementations§
Source§impl<E: EndpointExecutor + 'static> DistributedEntityResolver<E>
impl<E: EndpointExecutor + 'static> DistributedEntityResolver<E>
Sourcepub fn new(config: FederatedGraphRAGConfig, executor: Arc<E>) -> Self
pub fn new(config: FederatedGraphRAGConfig, executor: Arc<E>) -> Self
Create a new resolver
Sourcepub async fn same_as_closure(
&self,
uris: &[String],
) -> GraphRAGResult<HashMap<String, String>>
pub async fn same_as_closure( &self, uris: &[String], ) -> GraphRAGResult<HashMap<String, String>>
Compute the transitive owl:sameAs closure for the given URIs across all active endpoints.
Returns a map from each input URI (and discovered aliases) to the canonical representative URI for its equivalence class.
Sourcepub fn apply_to_graph(
&self,
kg: &mut KnowledgeGraph,
canonical_map: &HashMap<String, String>,
)
pub fn apply_to_graph( &self, kg: &mut KnowledgeGraph, canonical_map: &HashMap<String, String>, )
Apply sameAs closure to a knowledge graph, rewriting URIs to canonical forms and deduplicating triples that become identical after rewriting.
Auto Trait Implementations§
impl<E> Freeze for DistributedEntityResolver<E>
impl<E> RefUnwindSafe for DistributedEntityResolver<E>where
E: RefUnwindSafe,
impl<E> Send for DistributedEntityResolver<E>
impl<E> Sync for DistributedEntityResolver<E>
impl<E> Unpin for DistributedEntityResolver<E>
impl<E> UnsafeUnpin for DistributedEntityResolver<E>
impl<E> UnwindSafe for DistributedEntityResolver<E>where
E: RefUnwindSafe,
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