YUML#
Deprecated
The yuml generator is deprecated and is no longer supported.
Please use one of the following alternatives, which offer enhanced visualization options:
gen-doc
– Generates documentation with embedded Mermaid class diagrams.gen-plantuml
– Produces PlantUML diagrams.gen-mermaid-class-diagram
– Creates standalone Mermaid class diagrams.gen-erdiagram
– For Entity-Relationship (ER) diagrams.
Generate yuml
https://yuml.me/diagram/scruffy/class/samples
- class linkml.generators.yumlgen.YumlGenerator(schema: str | ~typing.TextIO | ~linkml_runtime.linkml_model.meta.SchemaDefinition | ~linkml.utils.generator.Generator | ~pathlib.Path, schemaview: ~linkml_runtime.utils.schemaview.SchemaView | None = None, format: str | None = None, metadata: bool = True, useuris: bool | None = None, log_level: int | None = 30, mergeimports: bool | None = True, source_file_date: str | None = None, source_file_size: int | None = None, logger: ~logging.Logger | None = None, verbose: bool | None = None, output: str | None = None, namespaces: ~linkml_runtime.utils.namespaces.Namespaces | None = None, directory_output: bool = False, base_dir: str = None, metamodel_name_map: dict[str, str] = None, importmap: str | ~collections.abc.Mapping[str, str] | None = None, emit_prefixes: set[str] = <factory>, metamodel: ~linkml.utils.schemaloader.SchemaLoader = None, stacktrace: bool = False, include: str | ~pathlib.Path | ~linkml_runtime.linkml_model.meta.SchemaDefinition | None = None, referenced: set[linkml_runtime.linkml_model.meta.ClassDefinitionName] | None = None, generated: set[linkml_runtime.linkml_model.meta.ClassDefinitionName] | None = None, box_generated: set[linkml_runtime.linkml_model.meta.ClassDefinitionName] | None = None, associations_generated: set[linkml_runtime.linkml_model.meta.ClassDefinitionName] | None = None, focus_classes: set[linkml_runtime.linkml_model.meta.ClassDefinitionName] | None = None, gen_classes: set[linkml_runtime.linkml_model.meta.ClassDefinitionName] | None = None, output_file_name: str | None = None, classes: set[linkml_runtime.linkml_model.meta.ClassDefinitionName] = None, directory: str | None = None, diagram_name: str | None = None, load_image: bool = True)[source]#
Deprecated
The yuml generator is being deprecated and is no longer supported.
Going forward, we recommend using one of the following alternatives that offer improved visualization capabilities:
gen-doc – Generates documentation with embedded Mermaid class diagrams.
gen-plantuml – Produces PlantUML diagrams.
gen-mermaid-class-diagram – Creates standalone Mermaid class diagrams.
gen-erdiagram – For Entity-Relationship (ER) diagrams.
Deprecated since version v1.8.7.
Recommendation: Migrate to one of the supported generators listed above.
- static cardinality(slot: SlotDefinition, is_attribute: bool = True) str [source]#
- class_associations(cn: ClassDefinitionName, must_render: bool = False) str [source]#
Emit all associations for a focus class. If none are specified, all classes are generated
@param cn: Name of class to be emitted @param must_render: True means render even if this is a target (class is specifically requested) @return: YUML representation of the association
- class_box(cn: ClassDefinitionName) str [source]#
Generate a box for the class. Populate its interior only if (a) it hasn’t previously been generated and (b) it appears in the gen_classes list
@param cn: @return:
- filtered_cls_slots(cn: ~linkml_runtime.linkml_model.meta.ClassDefinitionName, all_slots: bool = True, filtr: ~typing.Callable[[~linkml_runtime.linkml_model.meta.SlotDefinition], bool] = <function YumlGenerator.<lambda>>) list[linkml_runtime.linkml_model.meta.SlotDefinition] [source]#
Return the set of slots associated with the class that meet the filter criteria. Slots will be returned in defining order, with class slots returned last
@param cn: name of class to filter @param all_slots: True means include attributes @param filtr: Slot filter predicate @return: List of slot definitions
- generatorname: ClassVar[str] = 'yumlgen.py'#
Name of the generator. Override with os.path.basename(__file__)
- generatorversion: ClassVar[str] = '0.1.1'#
Version of the generator. Consider deprecating and instead use overall linkml version
- prop_modifier(cls: ClassDefinition, slot: SlotDefinition) str [source]#
- Return the modifiers for the slot:
(i) - inherited (m) - inherited through mixin (a) - injected (pk) - primary ckey
@param cls: @param slot: @return:
- valid_formats: ClassVar[list[str]] = ['yuml', 'png', 'pdf', 'jpg', 'json', 'svg']#
Allowed formats - first format is default
- visit_all_class_slots: ClassVar[bool] = False#
False means only visit own slots, True means visit all slots
- Type:
Visitor ClassVar
- visit_schema(classes: set[linkml_runtime.linkml_model.meta.ClassDefinitionName] = None, directory: str | None = None, diagram_name: str | None = None, load_image: bool = True, **_) str | None [source]#
Visited once at the beginning of generation
@param kwargs: Arguments passed through from CLI – implementation dependent