Package atessera.json
Class PublicationContent
java.lang.Object
atessera.json.PublicationContent
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:
GRADUATION_WORK— graduation qualification workCOURSE_WORK— course project/paperPAPER— conference or journal paperTHESIS— master's or PhD thesisBOOK— a full book
Supported section types
Each PublicationContent.Section within the publication has a
PublicationContent.SectionType that determines how its source text is processed:
MARKDOWN— text in Markdown formatLATEX— raw LaTeX sourceEQUATION— a mathematical equationTABLE— a tableLISTING— source code listingMETAPOST— MetaPost figureGNUPLOT— GNUPlot chartPLANTUML— PlantUML diagramGRAPHVIZ_DOT— Graphviz (dot layout)GRAPHVIZ_NEATO— Graphviz (neato layout)GRAPHVIZ_TWOPI— Graphviz (twopi layout)GRAPHVIZ_CIRCO— Graphviz (circo layout)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a single content section within a publication.static enumEnumerates the types of content that a section may contain.static enumEnumerates the types of publications supported by Alpha Tessera. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<PublicationContent.SectionType>Immutable set of all section types.static final Set<PublicationContent.Type>Immutable set of all publication types. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic PublicationContentDeserializes a JSON string into aPublicationContent.getAbs()Abstract section (displayed before the main content).Authors string (e.g.getBbk()BBK (Library-Bibliographic Classification) index.Type of book binding or format (e.g.Copyright notice.getDate()Publication date (free-form string).getIsbn()ISBN identifier.Issue/edition information section.Keywords for indexing.Publication location (city, country).intNumber of text columns per page.getOrg()Organization associated with the publication.Output file name (e.g.intBottom page margin (in the units expected by the LaTeX document class).intPage height (in the units expected by the LaTeX document class).intLeft page margin (in the units expected by the LaTeX document class).intRight page margin (in the units expected by the LaTeX document class).intTop page margin (in the units expected by the LaTeX document class).intPage width (in the units expected by the LaTeX document class).Where or how the work was published (mostly relevant for papers and proceedings).The list of content sections that make up the publication body.Specialty name (for academic works).getSpNum()Specialty number (for academic works).Student group identifier (for academic works).Publication subtitle (optional).Supervisor academic degree.Supervisor name (for academic works).Supervisor academic rank.getTitle()Publication title.Optional note displayed at the bottom of the title page.Optional note displayed at the top of the title page.getType()The overall type of this publication.getUdk()UDK (Universal Decimal Classification) index.getXAttr()Extension attributes map.inthashCode()booleanWhether to include a table of contents at the beginning.booleanisTocEnd()Whether to include a table of contents at the end.voidAbstract section (displayed before the main content).voidsetAuthors(String authors) Authors string (e.g.voidBBK (Library-Bibliographic Classification) index.voidsetBookType(String bookType) Type of book binding or format (e.g.voidsetCopyright(String copyright) Copyright notice.voidPublication date (free-form string).voidISBN identifier.voidsetIssueInfo(PublicationContent.Section issueInfo) Issue/edition information section.voidsetKeywords(String keywords) Keywords for indexing.voidsetLocation(String location) Publication location (city, country).voidsetNumCols(int numCols) Number of text columns per page.voidOrganization associated with the publication.voidsetOutFile(String outFile) Output file name (e.g.voidsetPageBottomMargin(int pageBottomMargin) Bottom page margin (in the units expected by the LaTeX document class).voidsetPageHeight(int pageHeight) Page height (in the units expected by the LaTeX document class).voidsetPageLeftMargin(int pageLeftMargin) Left page margin (in the units expected by the LaTeX document class).voidsetPageRightMargin(int pageRightMargin) Right page margin (in the units expected by the LaTeX document class).voidsetPageTopMargin(int pageTopMargin) Top page margin (in the units expected by the LaTeX document class).voidsetPageWidth(int pageWidth) Page width (in the units expected by the LaTeX document class).voidsetPublished(String published) Where or how the work was published (mostly relevant for papers and proceedings).voidsetSections(List<PublicationContent.Section> sections) The list of content sections that make up the publication body.voidSpecialty name (for academic works).voidSpecialty number (for academic works).voidsetStGroup(String stGroup) Student group identifier (for academic works).voidsetSubtitle(String subtitle) Publication subtitle (optional).voidsetSvDegree(String svDegree) Supervisor academic degree.voidSupervisor name (for academic works).voidSupervisor academic rank.voidPublication title.voidsetTitlePageBottomNote(String titlePageBottomNote) Optional note displayed at the bottom of the title page.voidsetTitlePageTopNote(String titlePageTopNote) Optional note displayed at the top of the title page.voidsetTocBegin(boolean tocBegin) Whether to include a table of contents at the beginning.voidsetTocEnd(boolean tocEnd) Whether to include a table of contents at the end.voidThe overall type of this publication.voidUDK (Universal Decimal Classification) index.voidExtension attributes map.static StringSerializes aPublicationContentto its JSON representation.toString()
-
Field Details
-
ALL_TYPES
Immutable set of all publication types. Convenient for validation and iteration. -
ALL_SECTION_TYPES
Immutable set of all section types. Convenient for validation and iteration.
-
-
Constructor Details
-
PublicationContent
public PublicationContent()
-
-
Method Details
-
toJson
Serializes aPublicationContentto its JSON representation.- Parameters:
c- the publication content to serialize; ifnull, an empty default instance is serialized- Returns:
- a JSON string; never
null
-
fromJson
Deserializes a JSON string into aPublicationContent.- Parameters:
s- the JSON string; ifnullor empty, a default empty instance is returned- Returns:
- the deserialized publication content; never
null
-
getType
The overall type of this publication. -
getOutFile
Output file name (e.g."paper.pdf"). -
getTitle
Publication title. -
getSubtitle
Publication subtitle (optional). -
getAuthors
Authors string (e.g."Ivanov I. I., Petrov P. P."). -
getDate
Publication date (free-form string). -
getLocation
Publication location (city, country). -
getPublished
Where or how the work was published (mostly relevant for papers and proceedings). -
getOrg
Organization associated with the publication. -
getKeywords
Keywords for indexing. -
getIsbn
ISBN identifier. -
getCopyright
Copyright notice. -
getUdk
UDK (Universal Decimal Classification) index. -
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
Student group identifier (for academic works). -
getSpNum
Specialty number (for academic works). -
getSpName
Specialty name (for academic works). -
getSvName
Supervisor name (for academic works). -
getSvDegree
Supervisor academic degree. -
getSvRank
Supervisor academic rank. -
getTitlePageTopNote
Optional note displayed at the top of the title page. -
getTitlePageBottomNote
Optional note displayed at the bottom of the title page. -
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
Abstract section (displayed before the main content). -
getIssueInfo
Issue/edition information section. -
getSections
The list of content sections that make up the publication body. -
getXAttr
Extension attributes map. Allows storing arbitrary key-value pairs without modifying the class structure. Keys and values are free-form strings. -
setType
The overall type of this publication. -
setOutFile
Output file name (e.g."paper.pdf"). -
setTitle
Publication title. -
setSubtitle
Publication subtitle (optional). -
setAuthors
Authors string (e.g."Ivanov I. I., Petrov P. P."). -
setDate
Publication date (free-form string). -
setLocation
Publication location (city, country). -
setPublished
Where or how the work was published (mostly relevant for papers and proceedings). -
setOrg
Organization associated with the publication. -
setKeywords
Keywords for indexing. -
setIsbn
ISBN identifier. -
setCopyright
Copyright notice. -
setUdk
UDK (Universal Decimal Classification) index. -
setBbk
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
Student group identifier (for academic works). -
setSpNum
Specialty number (for academic works). -
setSpName
Specialty name (for academic works). -
setSvName
Supervisor name (for academic works). -
setSvDegree
Supervisor academic degree. -
setSvRank
Supervisor academic rank. -
setTitlePageTopNote
Optional note displayed at the top of the title page. -
setTitlePageBottomNote
Optional note displayed at the bottom of the title page. -
setBookType
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
Abstract section (displayed before the main content). -
setIssueInfo
Issue/edition information section. -
setSections
The list of content sections that make up the publication body. -
setXAttr
Extension attributes map. Allows storing arbitrary key-value pairs without modifying the class structure. Keys and values are free-form strings. -
equals
-
hashCode
public int hashCode() -
toString
-