Class KonceptSvgRenderer
java.lang.Object
network.ike.docs.koncept.KonceptSvgRenderer
Generates inline SVG badge markup for Koncept references.
The badge renders as a compact, clickable pill that links to the glossary anchor for the
referenced Koncept. The component-kind sigil (ike-issues#638) leads the badge: a coloured
letter (D/S/P/?) for description/semantic/pattern/unknown, the
locked StampSigilGeometry pentagon for a stamp — whose compact provenance text stands in
place of a name — and nothing for a bare Koncept.
SVG is used rather than HTML/CSS to ensure consistent rendering across HTML and PDF backends.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringrender(String target, String label, KonceptKind kind) Render an inline SVG badge for a Koncept reference, honest about its kind.static Stringrender(String target, String label, KonceptKind kind, boolean inactive) Render an inline SVG badge for a Koncept reference — the no-computable-identity fallback, converged to the identicon-pill look (ike-issues#864): the spec's light pill, the small-caps IKE-blue label (struck through in the retired colour wheninactive), and the leading kind sigil — no more solid-blue box, white text, orKprefix.static StringrenderSigil(KonceptKind kind) Render a component-kind sigil on its own at natural badge scale — seerenderSigil(KonceptKind, double).static StringrenderSigil(KonceptKind kind, double scale) Render a component-kind sigil on its own — no badge, no anchor, no name — as standalone inline SVG from the same locked constants the badge renderers use (KonceptKind's glyph/colour data and theStampSigilGeometrypentagon), so a sigil shown in prose can never drift from the sigil shown in a badge.static StringrenderStampSigil(String target, String label) Render a STAMP badge without an identicon — the no-computable-identity fallback (the identicon-bearing stamp chip isKonceptInlineMacro#renderHtmlStampChip): the locked gray pentagon (computed from the sharedStampSigilGeometry) as inline SVG — five asymmetric reading dots and a centre hub — beside the compact provenance text that stands in place of a name.static StringrenderStampSpecimen(String label) Render a stamp chip as a specimen — the pentagon and compact provenance text, exactly asrenderStampSigil(String, String)draws them, but with no anchor: for prose that shows what a stamp badge looks like (a "How to Read This Guide" front matter) rather than referencing a glossary-curated component.
-
Method Details
-
render
Render an inline SVG badge for a Koncept reference, honest about its kind.- Parameters:
target- the CamelCase koncept identifier (used for the anchor link)label- the human-readable display labelkind- the component kind;nullis treated asKonceptKind.CONCEPT- Returns:
- complete SVG+anchor HTML string suitable for inline passthrough
-
render
Render an inline SVG badge for a Koncept reference — the no-computable-identity fallback, converged to the identicon-pill look (ike-issues#864): the spec's light pill, the small-caps IKE-blue label (struck through in the retired colour wheninactive), and the leading kind sigil — no more solid-blue box, white text, orKprefix. Identicon-less by definition: this path only renders when noPublicIdresolves, so there is nothing to draw an identicon from.- Parameters:
target- the CamelCase koncept identifier (used for the anchor link)label- the human-readable display labelkind- the component kind;nullis treated asKonceptKind.CONCEPTinactive- whether the referent's latest version is inactive (retired parity, #742)- Returns:
- complete SVG+anchor HTML string suitable for inline passthrough
-
renderStampSigil
Render a STAMP badge without an identicon — the no-computable-identity fallback (the identicon-bearing stamp chip isKonceptInlineMacro#renderHtmlStampChip): the locked gray pentagon (computed from the sharedStampSigilGeometry) as inline SVG — five asymmetric reading dots and a centre hub — beside the compact provenance text that stands in place of a name. The geometry is the same numbers the JavaFX node and the Java2D PNG use, so the pentagon is identical in every medium.The
labelis the caller-formatted, verbatim provenance string; this renderer only HTML-escapes it and never reformats or re-spells it. In particular the status token withinlabelmust already be the verbatim closed-vocabulary value (render closed vocabularies verbatim).- Parameters:
target- the CamelCase koncept identifier (used for the anchor link)label- the compact stamp text (status · date-time · author) shown beside the pentagon — provenance, in place of a name- Returns:
- complete SVG+anchor HTML string for the stamp pentagon + compact text
-
renderStampSpecimen
Render a stamp chip as a specimen — the pentagon and compact provenance text, exactly asrenderStampSigil(String, String)draws them, but with no anchor: for prose that shows what a stamp badge looks like (a "How to Read This Guide" front matter) rather than referencing a glossary-curated component.- Parameters:
label- the compact stamp text (status · date-time · author), verbatim- Returns:
- the stamp chip SVG, unlinked
-
renderSigil
Render a component-kind sigil on its own at natural badge scale — seerenderSigil(KonceptKind, double).- Parameters:
kind- the component kind;nullis treated asKonceptKind.CONCEPT- Returns:
- the sigil SVG, or an empty string for the bare
KonceptKind.CONCEPT
-
renderSigil
Render a component-kind sigil on its own — no badge, no anchor, no name — as standalone inline SVG from the same locked constants the badge renderers use (KonceptKind's glyph/colour data and theStampSigilGeometrypentagon), so a sigil shown in prose can never drift from the sigil shown in a badge. Carries the kind'sKonceptKind.accessibleName()as the SVG<title>for assistive technology. The geometry lives in the SVGviewBox;scaleonly enlarges the rendered box (legend and teaching contexts want the mark bigger than badge scale without redrawing it).- Parameters:
kind- the component kind;nullis treated asKonceptKind.CONCEPTscale- the display scale,1.0being natural badge scale- Returns:
- the sigil SVG, or an empty string for the bare
KonceptKind.CONCEPT, which by design shows no sigil
-