Class CSLCitationItem

  • All Implemented Interfaces:
    JsonObject

    public class CSLCitationItem
    extends java.lang.Object
    implements JsonObject
    A citation item is used to register a citation in the CSL processor. It usually only consists of the citation's ID but can also contain other formatting parameters.
    Author:
    Michel Kraemer
    • Constructor Detail

      • CSLCitationItem

        public CSLCitationItem​(java.lang.String id)
      • CSLCitationItem

        public CSLCitationItem​(java.lang.String id,
                               CSLItemData itemData,
                               java.lang.String prefix,
                               java.lang.String suffix,
                               java.lang.String locator,
                               java.lang.Integer position,
                               java.lang.Boolean nearNote,
                               java.lang.Integer noteNumber,
                               java.lang.Integer firstReferenceNoteNumber,
                               CSLLabel label,
                               java.lang.Boolean suppressAuthor,
                               java.lang.Boolean authorOnly,
                               java.lang.String[] uris)
    • Method Detail

      • getId

        public java.lang.String getId()
        Returns:
        the citation item's id
      • getItemData

        public CSLItemData getItemData()
        Returns:
        the citation item's itemData
      • getPrefix

        public java.lang.String getPrefix()
        Returns:
        the citation item's prefix
      • getSuffix

        public java.lang.String getSuffix()
        Returns:
        the citation item's suffix
      • getLocator

        public java.lang.String getLocator()
        Returns:
        the citation item's locator
      • getPosition

        public java.lang.Integer getPosition()
        Returns:
        the citation item's position
      • getNearNote

        public java.lang.Boolean getNearNote()
        Returns:
        the citation item's near-note
      • getNoteNumber

        public java.lang.Integer getNoteNumber()
        Returns:
        the citation item's note-number
      • getFirstReferenceNoteNumber

        public java.lang.Integer getFirstReferenceNoteNumber()
        Returns:
        the citation item's first-reference-note-number
      • getLabel

        public CSLLabel getLabel()
        Returns:
        the citation item's label
      • getSuppressAuthor

        public java.lang.Boolean getSuppressAuthor()
        Returns:
        the citation item's suppress-author
      • getAuthorOnly

        public java.lang.Boolean getAuthorOnly()
        Returns:
        the citation item's author-only
      • getUris

        public java.lang.String[] getUris()
        Returns:
        the citation item's uris
      • toJson

        public java.lang.Object toJson​(JsonBuilder builder)
        Description copied from interface: JsonObject
        Converts this object to a JSON object
        Specified by:
        toJson in interface JsonObject
        Parameters:
        builder - a builder that can be used to perform the conversion
        Returns:
        the JSON object
      • fromJson

        public static CSLCitationItem fromJson​(java.util.Map<java.lang.String,​java.lang.Object> obj)
        Converts a JSON object to a CSLCitationItem object. The JSON object must at least contain the following required properties: id
        Parameters:
        obj - the JSON object to convert
        Returns:
        the converted CSLCitationItem object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object