Package org.gbif.api.model.registry
Class Contact
java.lang.Object
org.gbif.api.model.registry.Contact
- All Implemented Interfaces:
Serializable
,Address
,LenientEquals<Contact>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAddress
(String address) void
void
addHomepage
(URI homepage) void
void
addPosition
(String position) void
void
Adds a new user id that is assembled from a directory name and a local id within it.Compute and returns the complete name in the form: FirstName LastName.boolean
deliveryPoint in EMLgetCity()
city in EMLcountry in EML@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date
@Size(min=3) String
getEmail()
electronicMailAddress in EML@Size(min=1) String
List of homepage websites.@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Integer
getKey()
@Size(min=1) String
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date
@Size(min=3) String
@Size(min=2) String
Institution name as part of the addressgetPhone()
phone in EMLpostalCode in EMLadministrativeArea in EMLgetType()
int
hashCode()
boolean
boolean
lenientEquals
(Contact contact) This implementation of theequals(Object)
method does only check business equality and disregards automatically set and maintained fields likecreatedBy, key
and others.void
setAddress
(List<String> address) void
void
setCountry
(Country country) void
setCreated
(Date created) void
setCreatedBy
(String createdBy) void
setDescription
(String description) void
void
setFirstName
(String firstName) void
setHomepage
(List<URI> homepage) void
void
setLastName
(String lastName) void
setModified
(Date modified) void
setModifiedBy
(String modifiedBy) void
setOrganization
(String organization) void
void
setPosition
(List<String> position) void
setPostalCode
(String postalCode) void
setPrimary
(boolean primary) void
setProvince
(String province) void
setSalutation
(String salutation) void
setType
(ContactType type) void
toString()
-
Constructor Details
-
Contact
public Contact()
-
-
Method Details
-
getKey
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Integer getKey() -
setKey
-
getType
-
setType
-
isPrimary
-
setPrimary
-
getUserId
-
setUserId
-
addUserId
-
addUserId
Adds a new user id that is assembled from a directory name and a local id within it. Format used by EML, though see https://github.com/gbif/gbif-api/issues/30. The directory should be a valid URI, if it's not, it will be ignored by this method.- Parameters:
directory
- identifier for the directory, preferably a URL domain like http://orcid.orgid
- the identifier in that directory
-
getSalutation
-
setSalutation
-
getFirstName
-
setFirstName
-
getLastName
-
setLastName
-
computeCompleteName
Compute and returns the complete name in the form: FirstName LastName. Since all parts are optional, this method can return an empty string (but never null)- Returns:
- the non-empty parts of FirstName LastName or empty string if none
-
getPosition
-
setPosition
-
addPosition
-
getDescription
-
setDescription
-
getEmail
Description copied from interface:Address
electronicMailAddress in EML -
setEmail
-
addEmail
-
getPhone
Description copied from interface:Address
phone in EML -
setPhone
-
addPhone
-
getAddress
Description copied from interface:Address
deliveryPoint in EML- Specified by:
getAddress
in interfaceAddress
-
setAddress
- Specified by:
setAddress
in interfaceAddress
-
addAddress
-
getCity
Description copied from interface:Address
city in EML -
setCity
-
getProvince
Description copied from interface:Address
administrativeArea in EML- Specified by:
getProvince
in interfaceAddress
-
setProvince
- Specified by:
setProvince
in interfaceAddress
-
getCountry
Description copied from interface:Address
country in EML- Specified by:
getCountry
in interfaceAddress
-
setCountry
- Specified by:
setCountry
in interfaceAddress
-
getPostalCode
Description copied from interface:Address
postalCode in EML- Specified by:
getPostalCode
in interfaceAddress
-
setPostalCode
- Specified by:
setPostalCode
in interfaceAddress
-
getOrganization
Description copied from interface:Address
Institution name as part of the address- Specified by:
getOrganization
in interfaceAddress
-
setOrganization
- Specified by:
setOrganization
in interfaceAddress
-
getHomepage
Description copied from interface:Address
List of homepage websites.- Specified by:
getHomepage
in interfaceAddress
-
setHomepage
- Specified by:
setHomepage
in interfaceAddress
-
addHomepage
-
getCreatedBy
-
setCreatedBy
-
getModifiedBy
-
setModifiedBy
-
getCreated
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getCreated() -
setCreated
-
getModified
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getModified() -
setModified
-
equals
-
hashCode
-
toString
-
lenientEquals
This implementation of theequals(Object)
method does only check business equality and disregards automatically set and maintained fields likecreatedBy, key
and others.- Specified by:
lenientEquals
in interfaceLenientEquals<Contact>
- Parameters:
contact
- To compare against- Returns:
- true if...
-