Class LedgerSectionWriter

java.lang.Object
network.ike.plugin.schema.LedgerSectionWriter

public final class LedgerSectionWriter extends Object
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.

  • Method Details

    • write

      public static String write(SchemaSignature signature, LedgerSectionWriter.Options options)
      Renders the signature as the source text of a ledger section.
      Parameters:
      signature - the signature to write
      options - the naming and wiring choices
      Returns:
      the Java source of the section class