Package atessera.json

Class PublicationContent

java.lang.Object
atessera.json.PublicationContent

public final class PublicationContent extends Object
Structured description of a publication (book, paper, thesis, etc.).

This class captures both the bibliographic metadata and the content structure of a publication. It is designed to be serialized to and from JSON via toJson(PublicationContent) and fromJson(String), and serves as the primary input for PublicationTemplate.

Supported publication types

Defined by the PublicationContent.Type enum:

Supported section types

Each PublicationContent.Section within the publication has a PublicationContent.SectionType that determines how its source text is processed:

See Also:
  • Field Details

    • ALL_TYPES

      public static final Set<PublicationContent.Type> ALL_TYPES
      Immutable set of all publication types. Convenient for validation and iteration.
    • ALL_SECTION_TYPES

      public static final Set<PublicationContent.SectionType> ALL_SECTION_TYPES
      Immutable set of all section types. Convenient for validation and iteration.
  • Constructor Details

    • PublicationContent

      public PublicationContent()
  • Method Details

    • toJson

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

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

      public PublicationContent.Type getType()
      The overall type of this publication.
    • getOutFile

      public String getOutFile()
      Output file name (e.g. "paper.pdf").
    • getTitle

      public String getTitle()
      Publication title.
    • getSubtitle

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

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

      public String getDate()
      Publication date (free-form string).
    • getLocation

      public String getLocation()
      Publication location (city, country).
    • getPublished

      public String getPublished()
      Where or how the work was published (mostly relevant for papers and proceedings).
    • getOrg

      public String getOrg()
      Organization associated with the publication.
    • getKeywords

      public String getKeywords()
      Keywords for indexing.
    • getIsbn

      public String getIsbn()
      ISBN identifier.
    • getCopyright

      public String getCopyright()
      Copyright notice.
    • getUdk

      public String getUdk()
      UDK (Universal Decimal Classification) index.
    • getBbk

      public String getBbk()
      BBK (Library-Bibliographic Classification) index.
    • isTocBegin

      public boolean isTocBegin()
      Whether to include a table of contents at the beginning.
    • isTocEnd

      public boolean isTocEnd()
      Whether to include a table of contents at the end.
    • getStGroup

      public String getStGroup()
      Student group identifier (for academic works).
    • getSpNum

      public String getSpNum()
      Specialty number (for academic works).
    • getSpName

      public String getSpName()
      Specialty name (for academic works).
    • getSvName

      public String getSvName()
      Supervisor name (for academic works).
    • getSvDegree

      public String getSvDegree()
      Supervisor academic degree.
    • getSvRank

      public String getSvRank()
      Supervisor academic rank.
    • getTitlePageTopNote

      public String getTitlePageTopNote()
      Optional note displayed at the top of the title page.
    • getTitlePageBottomNote

      public String getTitlePageBottomNote()
      Optional note displayed at the bottom of the title page.
    • getBookType

      public String getBookType()
      Type of book binding or format (e.g. "hardcover").
    • getNumCols

      public int getNumCols()
      Number of text columns per page.
    • getPageWidth

      public int getPageWidth()
      Page width (in the units expected by the LaTeX document class).
    • getPageHeight

      public int getPageHeight()
      Page height (in the units expected by the LaTeX document class).
    • getPageTopMargin

      public int getPageTopMargin()
      Top page margin (in the units expected by the LaTeX document class).
    • getPageLeftMargin

      public int getPageLeftMargin()
      Left page margin (in the units expected by the LaTeX document class).
    • getPageBottomMargin

      public int getPageBottomMargin()
      Bottom page margin (in the units expected by the LaTeX document class).
    • getPageRightMargin

      public int getPageRightMargin()
      Right page margin (in the units expected by the LaTeX document class).
    • getAbs

      public PublicationContent.Section getAbs()
      Abstract section (displayed before the main content).
    • getIssueInfo

      public PublicationContent.Section getIssueInfo()
      Issue/edition information section.
    • getSections

      public List<PublicationContent.Section> getSections()
      The list of content sections that make up the publication body.
    • getXAttr

      public Map<String,String> getXAttr()
      Extension attributes map. Allows storing arbitrary key-value pairs without modifying the class structure. Keys and values are free-form strings.
    • setType

      public void setType(PublicationContent.Type type)
      The overall type of this publication.
    • setOutFile

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

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

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

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

      public void setDate(String date)
      Publication date (free-form string).
    • setLocation

      public void setLocation(String location)
      Publication location (city, country).
    • setPublished

      public void setPublished(String published)
      Where or how the work was published (mostly relevant for papers and proceedings).
    • setOrg

      public void setOrg(String org)
      Organization associated with the publication.
    • setKeywords

      public void setKeywords(String keywords)
      Keywords for indexing.
    • setIsbn

      public void setIsbn(String isbn)
      ISBN identifier.
    • setCopyright

      public void setCopyright(String copyright)
      Copyright notice.
    • setUdk

      public void setUdk(String udk)
      UDK (Universal Decimal Classification) index.
    • setBbk

      public void setBbk(String bbk)
      BBK (Library-Bibliographic Classification) index.
    • setTocBegin

      public void setTocBegin(boolean tocBegin)
      Whether to include a table of contents at the beginning.
    • setTocEnd

      public void setTocEnd(boolean tocEnd)
      Whether to include a table of contents at the end.
    • setStGroup

      public void setStGroup(String stGroup)
      Student group identifier (for academic works).
    • setSpNum

      public void setSpNum(String spNum)
      Specialty number (for academic works).
    • setSpName

      public void setSpName(String spName)
      Specialty name (for academic works).
    • setSvName

      public void setSvName(String svName)
      Supervisor name (for academic works).
    • setSvDegree

      public void setSvDegree(String svDegree)
      Supervisor academic degree.
    • setSvRank

      public void setSvRank(String svRank)
      Supervisor academic rank.
    • setTitlePageTopNote

      public void setTitlePageTopNote(String titlePageTopNote)
      Optional note displayed at the top of the title page.
    • setTitlePageBottomNote

      public void setTitlePageBottomNote(String titlePageBottomNote)
      Optional note displayed at the bottom of the title page.
    • setBookType

      public void setBookType(String bookType)
      Type of book binding or format (e.g. "hardcover").
    • setNumCols

      public void setNumCols(int numCols)
      Number of text columns per page.
    • setPageWidth

      public void setPageWidth(int pageWidth)
      Page width (in the units expected by the LaTeX document class).
    • setPageHeight

      public void setPageHeight(int pageHeight)
      Page height (in the units expected by the LaTeX document class).
    • setPageTopMargin

      public void setPageTopMargin(int pageTopMargin)
      Top page margin (in the units expected by the LaTeX document class).
    • setPageLeftMargin

      public void setPageLeftMargin(int pageLeftMargin)
      Left page margin (in the units expected by the LaTeX document class).
    • setPageBottomMargin

      public void setPageBottomMargin(int pageBottomMargin)
      Bottom page margin (in the units expected by the LaTeX document class).
    • setPageRightMargin

      public void setPageRightMargin(int pageRightMargin)
      Right page margin (in the units expected by the LaTeX document class).
    • setAbs

      public void setAbs(PublicationContent.Section abs)
      Abstract section (displayed before the main content).
    • setIssueInfo

      public void setIssueInfo(PublicationContent.Section issueInfo)
      Issue/edition information section.
    • setSections

      public void setSections(List<PublicationContent.Section> sections)
      The list of content sections that make up the publication body.
    • setXAttr

      public void setXAttr(Map<String,String> xAttr)
      Extension attributes map. Allows storing arbitrary key-value pairs without modifying the class structure. Keys and values are free-form strings.
    • 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