Class LedgerSectionWriter
java.lang.Object
network.ike.plugin.schema.LedgerSectionWriter
Writes a
SchemaSignature as a ledger section in the KnowledgeSet DSL, a node catalog, the same
shape the hand-written sections of a starter set have (IKE-Network/ike-issues#1104):
one concept per type with the schema's own documentation as its definition, is-a from
the extension base, one concept per argument position, per schema primitive, and per
type of another schema the catalog refers to, one concept per enumeration and per
enumerated value, and a type-position pattern whose semantics record, on each type, its
positions with their value type and cardinality.
Every label carries a prefix chosen per namespace, ELM for the expression
nodes and ELM System for the System types, because koncept identifiers are
derived from labels alone, a foundation already holds concepts named Concept, Code,
Quantity, Interval, and List, and ELM itself declares an Interval in both of its
namespaces. The generated class is a source file to check in and regenerate, never to
edit.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordWhat the writer needs beyond the signature. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringwrite(SchemaSignature signature, LedgerSectionWriter.Options options) Renders the signature as the source text of a ledger section.
-
Method Details
-
write
Renders the signature as the source text of a ledger section.- Parameters:
signature- the signature to writeoptions- the naming and wiring choices- Returns:
- the Java source of the section class
-