public class ContactAdapter extends Object
| Constructor and Description |
|---|
ContactAdapter(List<Contact> contacts) |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatContactName(Contact contact)
Format the name of the contact as "FirstName LastName".
|
Contact |
getAdministrativeContact()
Get the AdministrativeContact
Contact. |
List<Contact> |
getAllType(ContactType type)
Get all
Contact for the provided type. |
List<Contact> |
getAssociatedParties()
Get the list of AssociatedParties.
|
List<Contact> |
getContacts()
Get the list of
Contact of type ContactType.ADMINISTRATIVE_POINT_OF_CONTACT. |
List<Contact> |
getCreators()
Get the list of
Contact of type ContactType.ORIGINATOR. |
List<Contact> |
getFilteredContacts(ContactType... types)
Filter contacts based on the provided contact types.
|
Contact |
getFirstPreferredType(ContactType type)
Get the first primary
Contact for the provided type. |
List<Contact> |
getMetadataProviders()
Get the list of
Contact of type ContactType.METADATA_AUTHOR. |
Contact |
getResourceCreator()
Get the ResourceCreator
Contact. |
public ContactAdapter(List<Contact> contacts)
public List<Contact> getAssociatedParties()
Contact,
excluding contacts with types the following types considered primary types: Originator,
MetadataAuthor and AdministrativePointOfContact.public Contact getResourceCreator()
Contact. This is defined as the first primary Contact
of type ContactType.ORIGINATOR.public static String formatContactName(Contact contact)
contact - contactpublic Contact getAdministrativeContact()
Contact. This is defined as the first primary Contact of type ContactType.ADMINISTRATIVE_POINT_OF_CONTACT.public List<Contact> getFilteredContacts(ContactType... types)
getFirstPreferredType(org.gbif.api.vocabulary.ContactType) method.types - contact typespublic Contact getFirstPreferredType(ContactType type)
Contact for the provided type.public List<Contact> getCreators()
Contact of type ContactType.ORIGINATOR.public List<Contact> getContacts()
Contact of type ContactType.ADMINISTRATIVE_POINT_OF_CONTACT.public List<Contact> getMetadataProviders()
Contact of type ContactType.METADATA_AUTHOR.public List<Contact> getAllType(ContactType type)
Contact for the provided type.Contact for specified type or empty list if none foundCopyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.