Interface DeltaResult

All Known Implementing Classes:
DefaultDeltaResult

public interface DeltaResult
The full output of comparing two JSON documents.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the ordered atomic changes that make up this delta.
    Returns when the delta result was created.
    Returns a generated identifier for this delta result.
    Returns the serialized delta format version.
    boolean
    Returns whether the compared documents differ.
    com.fasterxml.jackson.databind.JsonNode
    Returns the minimal changed-only projection, or a null node when no projection is available.
    Returns summary counts derived from the atomic change list.
    com.fasterxml.jackson.databind.JsonNode
    Serializes this result into the stable Helix Delta JSON shape.
    Optional<com.fasterxml.jackson.databind.JsonNode>
    Returns a JSON Patch representation when every change can be expressed as RFC 6902 add/remove/replace operations.
    Optional<com.fasterxml.jackson.databind.JsonNode>
    Returns a JSON Merge Patch representation when it can be produced without losing semantics.
  • Method Details

    • formatVersion

      String formatVersion()
      Returns the serialized delta format version.
      Returns:
      format version identifier
    • deltaId

      String deltaId()
      Returns a generated identifier for this delta result.
      Returns:
      delta identifier
    • createdAt

      Instant createdAt()
      Returns when the delta result was created.
      Returns:
      creation timestamp
    • summary

      DeltaSummary summary()
      Returns summary counts derived from the atomic change list.
      Returns:
      delta summary
    • projection

      com.fasterxml.jackson.databind.JsonNode projection()
      Returns the minimal changed-only projection, or a null node when no projection is available.
      Returns:
      changed-only projection
    • changes

      List<DeltaChange> changes()
      Returns the ordered atomic changes that make up this delta.
      Returns:
      immutable change list
    • toJsonPatch

      Optional<com.fasterxml.jackson.databind.JsonNode> toJsonPatch()
      Returns a JSON Patch representation when every change can be expressed as RFC 6902 add/remove/replace operations.
      Returns:
      optional JSON Patch document
    • toMergePatch

      Optional<com.fasterxml.jackson.databind.JsonNode> toMergePatch()
      Returns a JSON Merge Patch representation when it can be produced without losing semantics.
      Returns:
      optional JSON Merge Patch document
    • toJson

      com.fasterxml.jackson.databind.JsonNode toJson()
      Serializes this result into the stable Helix Delta JSON shape.
      Returns:
      serialized delta JSON
    • hasChanges

      boolean hasChanges()
      Returns whether the compared documents differ.
      Returns:
      true when at least one change exists