pub struct Style { /* private fields */ }Expand description
Main style container for RDF visualization.
Represents a collection of stereotype styles that define the visual appearance of different RDF term types in PlantUML diagrams. This struct manages the overall styling configuration and provides methods to generate PlantUML style declarations.
Implementations§
Source§impl Style
impl Style
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty Style instance.
The returned style has no stereotype styles configured.
Sourcepub fn add_stereotype_style(&mut self, style: StereotypeStyle)
pub fn add_stereotype_style(&mut self, style: StereotypeStyle)
Adds a stereotype style to this style collection.
§Arguments
style- TheStereotypeStyleto add to the collection.
Sourcepub fn as_uml(&self) -> String
pub fn as_uml(&self) -> String
Generates PlantUML style declarations for all configured stereotype styles.
This method produces a complete PlantUML <style> block containing all
the stereotype definitions, followed by a directive to hide stereotypes
in the final diagram.
§Returns
A string containing the PlantUML style declarations.
Sourcepub fn from_config(config: &RDFVisualizationConfig) -> Self
pub fn from_config(config: &RDFVisualizationConfig) -> Self
Creates a Style instance from an RDF visualization configuration.
This method automatically generates stereotype styles for all RDF term types (URI nodes, blank nodes, literals, reifiers, asserted triples, non-asserted triples) based on the provided configuration.
§Arguments
config- TheRDFVisualizationConfigcontaining style settings.
§Returns
A new Style instance with stereotype styles configured according to the config.