g3-toolkit API Reference
    Preparing search index...

    Interface SchemaViewProps

    interface SchemaViewProps {
        className?: string;
        schema?: SchemaModel;
        shapes?: (ShaclShape | SchemaViewShape)[];
        subClassOf?: Record<string, string | string[]>;
        ugm?: UGM;
        validationResults?: ShaclValidationResult[];
    }
    Index

    Properties

    className?: string
    schema?: SchemaModel

    SHACL shapes to badge target classes with. Accepts @g3-toolkit/core's ShaclShape (what ShaclValidator and ShaclShapeBrowser use) or this view's display-only SchemaViewShape. Every shape whose targetClass or targets (kind class) names a class counts toward that class's badge (issue #37: the first match alone used to win; issue #56: targets was ignored). With subClassOf, a shape declared on a superclass also counts toward each subclass, listed after the direct shapes and marked inherited, because SHACL's sh:targetClass selects instances of subclasses as well.

    subClassOf?: Record<string, string | string[]>

    rdfs:subClassOf as class -> parent class(es), keyed by the same names schema.nodeTypes / the registry use. A class nests under every listed parent that is itself a class here (issue #56: the first used to win), as one card per parent that agree on shapes, inheritance and status; a parent that is not a class here (say owl:Thing when it is not in the list), the class itself, and a repeat are ignored, and a class with no usable parent stays at the top level, where the flat sorted order still applies. Neither SchemaModel nor the UGM registry carries subclass edges, so the host derives this from its ontology (the SHACL shapes parser, R1.16, would supply it once it lands).

    ugm?: UGM
    validationResults?: ShaclValidationResult[]

    Validation results (from validateShacl or ShaclValidator). When given, each class badge also reports the most severe status across every shape targeting it: violation > warning > info, or conforms when nothing targeting the class failed.