Record Class Hierarchical

java.lang.Object
java.lang.Record
ai.doctruth.Hierarchical
Record Components:
maxDepth - maximum number of summarisation levels (1 = single pass).
All Implemented Interfaces:
ContextStrategy

public record Hierarchical(int maxDepth) extends Record implements ContextStrategy
Multi-level summarisation: condense the document at increasing granularities, hand the LLM the level that fits the budget. Placeholder shape — Phase 3 will decide whether to extend the record's components (per-level summarisers, fan-out, etc.) or split into a builder.

Invariants (compact constructor):

  • maxDepth >= 1.
Since:
0.1.0
  • Constructor Details

    • Hierarchical

      public Hierarchical(int maxDepth)
      Creates an instance of a Hierarchical record class.
      Parameters:
      maxDepth - the value for the maxDepth record component
  • Method Details

    • assemble

      public String assemble(ParsedDocument doc)
      v0.1.0-alpha stub: not yet implemented. Phase 3 wires up multi-level summarisation; the audit-able UnsupportedOperationException marker is intentional (per CONTRIBUTING.md §2 — no silent failures) so any caller using the stub fails loudly.
      Specified by:
      assemble in interface ContextStrategy
      Parameters:
      doc - the parsed document; must not be null.
      Returns:
      a single string suitable for use as the user prompt.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxDepth

      public int maxDepth()
      Returns the value of the maxDepth record component.
      Returns:
      the value of the maxDepth record component