Package atessera.json
Class PresentationContent
java.lang.Object
atessera.json.PresentationContent
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:
MARKDOWN— text in Markdown formatLATEX— raw LaTeX sourceMETAPOST— MetaPost figureGNUPLOT— GNUPlot chartPLANTUML— PlantUML diagramLISTING— source code listingEQUATION— mathematical equationGRAPHVIZ_DOT— Graphviz (dot layout)GRAPHVIZ_NEATO— Graphviz (neato layout)GRAPHVIZ_TWOPI— Graphviz (twopi layout)GRAPHVIZ_CIRCO— Graphviz (circo layout)
Supported figure types
The PresentationContent.Figure class describes standalone figures (independent of
a particular frame) with the following PresentationContent.FigureTypes:
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a standalone figure associated with a presentation, independent of a particular frame.static enumEnumerates the types of standalone figures that can be associated with a presentation.static final classRepresents a single frame (slide) within a presentation.static enumEnumerates the types of content that a presentation frame may contain. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<PresentationContent.FigureType>Immutable set of all figure types.static final Set<PresentationContent.FrameType>Immutable set of all frame types. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic PresentationContentDeserializes a JSON string into aPresentationContent.Authors string (e.g.getDate()Presentation date (free-form string).The list of frames (slides) that make up the presentation.Output file name (e.g.Presentation subtitle (optional).getTheme()Beamer theme name (e.g.getTitle()Presentation title.inthashCode()voidsetAuthors(String authors) Authors string (e.g.voidPresentation date (free-form string).voidsetFrames(List<PresentationContent.Frame> frames) The list of frames (slides) that make up the presentation.voidsetOutFile(String outFile) Output file name (e.g.voidsetSubtitle(String subtitle) Presentation subtitle (optional).voidBeamer theme name (e.g.voidPresentation title.static StringSerializes aPresentationContentto its JSON representation.toString()
-
Field Details
-
ALL_FRAME_TYPES
Immutable set of all frame types. Convenient for validation and iteration. -
ALL_FIGURE_TYPES
Immutable set of all figure types. Convenient for validation and iteration.
-
-
Constructor Details
-
PresentationContent
public PresentationContent()
-
-
Method Details
-
toJson
Serializes aPresentationContentto its JSON representation.- Parameters:
c- the presentation content to serialize; ifnull, an empty default instance is serialized- Returns:
- a JSON string; never
null
-
fromJson
Deserializes a JSON string into aPresentationContent.- Parameters:
s- the JSON string; ifnullor empty, a default empty instance is returned- Returns:
- the deserialized presentation content; never
null
-
getTitle
Presentation title. -
getSubtitle
Presentation subtitle (optional). -
getAuthors
Authors string (e.g."Ivanov I. I."). -
getDate
Presentation date (free-form string). -
getTheme
Beamer theme name (e.g."Madrid","Copenhagen"). -
getOutFile
Output file name (e.g."slides.pdf"). -
getFrames
The list of frames (slides) that make up the presentation. -
setTitle
Presentation title. -
setSubtitle
Presentation subtitle (optional). -
setAuthors
Authors string (e.g."Ivanov I. I."). -
setDate
Presentation date (free-form string). -
setTheme
Beamer theme name (e.g."Madrid","Copenhagen"). -
setOutFile
Output file name (e.g."slides.pdf"). -
setFrames
The list of frames (slides) that make up the presentation. -
equals
-
hashCode
public int hashCode() -
toString
-