Package atessera.json

Class PresentationContent

java.lang.Object
atessera.json.PresentationContent

public final class PresentationContent extends Object
Structured description of a presentation (LaTeX Beamer slides).

This class captures the metadata (title, authors, date, theme) and the slide content of a presentation. It is designed to be serialized to and from JSON via toJson(PresentationContent) and fromJson(String), and serves as the primary input for PresentationTemplate.

Supported frame types

Each PresentationContent.Frame within the presentation has a PresentationContent.FrameType that determines how its source text is processed:

Supported figure types

The PresentationContent.Figure class describes standalone figures (independent of a particular frame) with the following PresentationContent.FigureTypes:

See Also:
  • Field Details

    • ALL_FRAME_TYPES

      public static final Set<PresentationContent.FrameType> ALL_FRAME_TYPES
      Immutable set of all frame types. Convenient for validation and iteration.
    • ALL_FIGURE_TYPES

      public static final Set<PresentationContent.FigureType> ALL_FIGURE_TYPES
      Immutable set of all figure types. Convenient for validation and iteration.
  • Constructor Details

    • PresentationContent

      public PresentationContent()
  • Method Details

    • toJson

      public static String toJson(PresentationContent c)
      Serializes a PresentationContent to its JSON representation.
      Parameters:
      c - the presentation content to serialize; if null, an empty default instance is serialized
      Returns:
      a JSON string; never null
    • fromJson

      public static PresentationContent fromJson(String s)
      Deserializes a JSON string into a PresentationContent.
      Parameters:
      s - the JSON string; if null or empty, a default empty instance is returned
      Returns:
      the deserialized presentation content; never null
    • getTitle

      public String getTitle()
      Presentation title.
    • getSubtitle

      public String getSubtitle()
      Presentation subtitle (optional).
    • getAuthors

      public String getAuthors()
      Authors string (e.g. "Ivanov I. I.").
    • getDate

      public String getDate()
      Presentation date (free-form string).
    • getTheme

      public String getTheme()
      Beamer theme name (e.g. "Madrid", "Copenhagen").
    • getOutFile

      public String getOutFile()
      Output file name (e.g. "slides.pdf").
    • getFrames

      public List<PresentationContent.Frame> getFrames()
      The list of frames (slides) that make up the presentation.
    • setTitle

      public void setTitle(String title)
      Presentation title.
    • setSubtitle

      public void setSubtitle(String subtitle)
      Presentation subtitle (optional).
    • setAuthors

      public void setAuthors(String authors)
      Authors string (e.g. "Ivanov I. I.").
    • setDate

      public void setDate(String date)
      Presentation date (free-form string).
    • setTheme

      public void setTheme(String theme)
      Beamer theme name (e.g. "Madrid", "Copenhagen").
    • setOutFile

      public void setOutFile(String outFile)
      Output file name (e.g. "slides.pdf").
    • setFrames

      public void setFrames(List<PresentationContent.Frame> frames)
      The list of frames (slides) that make up the presentation.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object