Package de.undercouch.citeproc.csl
Class CSLCitationItem
- java.lang.Object
-
- de.undercouch.citeproc.csl.CSLCitationItem
-
- All Implemented Interfaces:
JsonObject
public class CSLCitationItem extends 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(String id)CSLCitationItem(String id, CSLItemData itemData, String prefix, String suffix, String locator, Integer position, Boolean nearNote, Integer noteNumber, Integer firstReferenceNoteNumber, CSLLabel label, Boolean suppressAuthor, Boolean authorOnly, String[] uris)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static CSLCitationItemfromJson(Map<String,Object> obj)Converts a JSON object to a CSLCitationItem object.BooleangetAuthorOnly()IntegergetFirstReferenceNoteNumber()StringgetId()CSLItemDatagetItemData()CSLLabelgetLabel()StringgetLocator()BooleangetNearNote()IntegergetNoteNumber()IntegergetPosition()StringgetPrefix()StringgetSuffix()BooleangetSuppressAuthor()String[]getUris()inthashCode()ObjecttoJson(JsonBuilder builder)Converts this object to a JSON object
-
-
-
Constructor Detail
-
CSLCitationItem
public CSLCitationItem(String id)
-
-
Method Detail
-
getId
public String getId()
- Returns:
- the citation item's id
-
getItemData
public CSLItemData getItemData()
- Returns:
- the citation item's itemData
-
getPrefix
public String getPrefix()
- Returns:
- the citation item's prefix
-
getSuffix
public String getSuffix()
- Returns:
- the citation item's suffix
-
getLocator
public String getLocator()
- Returns:
- the citation item's locator
-
getPosition
public Integer getPosition()
- Returns:
- the citation item's position
-
getNearNote
public Boolean getNearNote()
- Returns:
- the citation item's near-note
-
getNoteNumber
public Integer getNoteNumber()
- Returns:
- the citation item's note-number
-
getFirstReferenceNoteNumber
public Integer getFirstReferenceNoteNumber()
- Returns:
- the citation item's first-reference-note-number
-
getLabel
public CSLLabel getLabel()
- Returns:
- the citation item's label
-
getSuppressAuthor
public Boolean getSuppressAuthor()
- Returns:
- the citation item's suppress-author
-
getAuthorOnly
public Boolean getAuthorOnly()
- Returns:
- the citation item's author-only
-
getUris
public String[] getUris()
- Returns:
- the citation item's uris
-
toJson
public 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(Map<String,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
-
-