Class OmlWriter

java.lang.Object
dev.omnist.oml.OmlWriter

public class OmlWriter extends Object
OML (Omnist Markup Language) Canonical Writer (omnist-spec §4 and §9.5). Serializes a Document into canonical OML text format.
  • Method Details

    • write

      public static String write(Document doc)
      Serializes a Document to canonical indented OML text (omnist-spec §4 and §9.5). Nested objects are indented by two spaces per level; edges are separated by newlines.
      Parameters:
      doc - the document to serialize; must not be null
      Returns:
      the canonical OML text; never null
    • writeCompact

      public static String writeCompact(Document doc)
      Serializes a Document to compact inline OML text. Edges are separated by "; " instead of newlines and indentation is suppressed, producing output suitable for single-line display or embedding in other formats.
      Parameters:
      doc - the document to serialize; must not be null
      Returns:
      the compact OML text; never null