Package de.undercouch.citeproc.csl
Class CSLCitationItem
- java.lang.Object
-
- de.undercouch.citeproc.csl.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 Summary
Constructors Constructor Description CSLCitationItem(java.lang.String id)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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)static CSLCitationItemfromJson(java.util.Map<java.lang.String,java.lang.Object> obj)Converts a JSON object to a CSLCitationItem object.java.lang.BooleangetAuthorOnly()java.lang.IntegergetFirstReferenceNoteNumber()java.lang.StringgetId()CSLItemDatagetItemData()CSLLabelgetLabel()java.lang.StringgetLocator()java.lang.BooleangetNearNote()java.lang.IntegergetNoteNumber()java.lang.IntegergetPosition()java.lang.StringgetPrefix()java.lang.StringgetSuffix()java.lang.BooleangetSuppressAuthor()java.lang.String[]getUris()inthashCode()java.lang.ObjecttoJson(JsonBuilder builder)Converts this object to a JSON object
-
-
-
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:JsonObjectConverts this object to a JSON object- Specified by:
toJsonin interfaceJsonObject- 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-