public final class CitationGenerator extends Object
Dataset
and Organization
objects. Documentation : /docs/citations.mdModifier and Type | Class and Description |
---|---|
static class |
CitationGenerator.CitationData |
Modifier and Type | Method and Description |
---|---|
static List<String> |
generateAuthorsName(List<CitationContact> authors)
|
static CitationGenerator.CitationData |
generateCitation(Dataset dataset,
Organization org) |
static CitationGenerator.CitationData |
generateCitation(Dataset dataset,
String organizationTitle)
Generate a citation for a
Dataset and its Organization . |
static String |
generatePublisherProvidedCitation(Dataset dataset)
Generate a citation for a
Dataset using the publisher's provided citation. |
static String |
getAuthorName(Contact creator)
Given a
Contact , generates a String for that contact for citation purpose. |
static List<CitationContact> |
getAuthors(List<Contact> contacts)
Extracts an ordered list of unique authors from a list of contacts.
|
public static CitationGenerator.CitationData generateCitation(Dataset dataset, Organization org)
public static String generatePublisherProvidedCitation(Dataset dataset)
Dataset
using the publisher's provided citation.dataset
- datasetString
public static CitationGenerator.CitationData generateCitation(Dataset dataset, String organizationTitle)
Dataset
and its Organization
. TODO add support for
i18nString
public static List<CitationContact> getAuthors(List<Contact> contacts)
Contact
is
identified as an author when his ContactType
is contained in AUTHOR_CONTACT_TYPE
. But, we shall at least have one contact of type MANDATORY_CONTACT_TYPE.contacts
- list of contacts availablepublic static List<String> generateAuthorsName(List<CitationContact> authors)
List
of String
representing the authors
name. If a contact doesn't have a first AND last name it will not be included.authors
- ordered list of authorspublic static String getAuthorName(Contact creator)
Contact
, generates a String for that contact for citation purpose. The
organization will be used (if present) in case we don't have both lastName and firstNames of
the contact.creator
- contact objectCopyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.