pub enum VisualRDFNode {
Reifies,
Iri {
label: String,
url: String,
},
BlankNode {
label: String,
},
Literal {
value: String,
},
Predicate {
label: String,
url: String,
},
NonAssertedTriple(Box<VisualRDFNode>, Box<VisualRDFNode>, Box<VisualRDFNode>),
AssertedTriple(Box<VisualRDFNode>, Box<VisualRDFNode>, Box<VisualRDFNode>),
}Expand description
Represents a visual node in an RDF graph for visualization purposes. Each variant corresponds to different types of RDF terms or special constructs used in rendering RDF graphs.
Variants§
Reifies
Special node representing the “reifies” predicate.
Iri
An IRI node with a qualified label and full URL.
BlankNode
A blank node with a label.
Literal
A literal value node.
Predicate
A predicate IRI node with a qualified label and full URL.
NonAssertedTriple(Box<VisualRDFNode>, Box<VisualRDFNode>, Box<VisualRDFNode>)
A non-asserted triple (subject, predicate, object) as a node.
AssertedTriple(Box<VisualRDFNode>, Box<VisualRDFNode>, Box<VisualRDFNode>)
An asserted triple (subject, predicate, object) as a node.
Implementations§
Source§impl VisualRDFNode
Implementation of methods for VisualRDFNode.
impl VisualRDFNode
Implementation of methods for VisualRDFNode.
Sourcepub fn from_predicate<R: Rdf>(rdf: &R, predicate: &R::IRI) -> VisualRDFNode
pub fn from_predicate<R: Rdf>(rdf: &R, predicate: &R::IRI) -> VisualRDFNode
Sourcepub fn from_subject<R: NeighsRDF>(
rdf: &R,
subject: &R::Subject,
graph: &mut VisualRDFGraph,
) -> Result<Self, RDFError>
pub fn from_subject<R: NeighsRDF>( rdf: &R, subject: &R::Subject, graph: &mut VisualRDFGraph, ) -> Result<Self, RDFError>
Sourcepub fn from_term<R: NeighsRDF>(
rdf: &R,
term: &R::Term,
graph: &mut VisualRDFGraph,
) -> Result<Self, RDFError>
pub fn from_term<R: NeighsRDF>( rdf: &R, term: &R::Term, graph: &mut VisualRDFGraph, ) -> Result<Self, RDFError>
Sourcepub fn non_asserted_triple(
s: VisualRDFNode,
p: VisualRDFNode,
o: VisualRDFNode,
) -> Self
pub fn non_asserted_triple( s: VisualRDFNode, p: VisualRDFNode, o: VisualRDFNode, ) -> Self
Sourcepub fn asserted_triple(
s: VisualRDFNode,
p: VisualRDFNode,
o: VisualRDFNode,
) -> Self
pub fn asserted_triple( s: VisualRDFNode, p: VisualRDFNode, o: VisualRDFNode, ) -> Self
Sourcepub fn as_plantuml(
&self,
node_id: NodeId,
show_if_predicate: bool,
_graph: &VisualRDFGraph,
) -> Result<String, RdfVisualizerError>
pub fn as_plantuml( &self, node_id: NodeId, show_if_predicate: bool, _graph: &VisualRDFGraph, ) -> Result<String, RdfVisualizerError>
Converts the node to a PlantUML string representation.
The node_id is used for unique identification in the diagram.
show_if_predicate controls whether predicate nodes are displayed.
Returns a string suitable for PlantUML rendering or an error.
§Arguments
node_id- The unique ID for the nodeshow_if_predicate- Whether to show predicate nodes_graph- The visual graph (unused)
§Returns
Result<String, RdfVisualizerError>- The PlantUML string or an error
Trait Implementations§
Source§impl Clone for VisualRDFNode
impl Clone for VisualRDFNode
Source§fn clone(&self) -> VisualRDFNode
fn clone(&self) -> VisualRDFNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VisualRDFNode
impl Debug for VisualRDFNode
Source§impl Display for VisualRDFNode
Implementation of Display for VisualRDFNode.
Provides a human-readable string representation of the node.
impl Display for VisualRDFNode
Implementation of Display for VisualRDFNode.
Provides a human-readable string representation of the node.
Source§impl Hash for VisualRDFNode
impl Hash for VisualRDFNode
Source§impl PartialEq for VisualRDFNode
impl PartialEq for VisualRDFNode
impl Eq for VisualRDFNode
impl StructuralPartialEq for VisualRDFNode
Auto Trait Implementations§
impl Freeze for VisualRDFNode
impl RefUnwindSafe for VisualRDFNode
impl Send for VisualRDFNode
impl Sync for VisualRDFNode
impl Unpin for VisualRDFNode
impl UnsafeUnpin for VisualRDFNode
impl UnwindSafe for VisualRDFNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.