ddn.data.cdm

CDM (Configuration Data Model) package.

A unified data model for configuration file formats with full roundtrip fidelity. CDM preserves all metadata needed to read, modify, and write back configuration files without losing comments, formatting, or structural details.

The core types are:

  • CdmNode - The primary node type for all values
  • CdmDocument - Root container for a parsed document
  • CdmLocation - Source location tracking
  • CdmComment - Preserved comments
  • CdmFormat - Formatting metadata
  • CdmMember - Object key-value pairs with roundtrip metadata
  • CdmAttribute - SDL tag attributes
  • ConfigStore - Lightweight config with format-preserving save

Builder pattern:

  • CdmBuilder - Produces CdmDocument with full metadata
  • VarBuilder - Produces lightweight var without metadata

Conversion utilities:

  • toVar() - Convert CdmNode to ddn.var
  • fromVar() - Convert ddn.var to CdmNode
  • toJson() - Export to JSON string

Traversal utilities:

  • traverse() - Depth-first traversal
  • findAll() - Find nodes matching a predicate
  • findFirst() - Find first node matching a predicate
  • findByType() - Find nodes by type
  • findByKey() - Find objects containing a key
No exported symbols.