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 TypeMethodDescriptionvoidaddAddress(String address) voidvoidaddHomepage(URI homepage) voidvoidaddPosition(String position) voidvoidAdds 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.booleandeliveryPoint in EMLgetCity()city in EMLcountry in EML@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date@Size(min=3) StringgetEmail()electronicMailAddress in EML@Size(min=1) StringList of homepage websites.@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) IntegergetKey()@Size(min=1) String@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date@Size(min=3) String@Size(min=2) StringInstitution name as part of the addressgetPhone()phone in EMLpostalCode in EMLadministrativeArea in EMLgetType()inthashCode()booleanbooleanlenientEquals(Contact contact) This implementation of theequals(Object)method does only check business equality and disregards automatically set and maintained fields likecreatedBy, keyand others.voidsetAddress(List<String> address) voidvoidsetCountry(Country country) voidsetCreated(Date created) voidsetCreatedBy(String createdBy) voidsetDescription(String description) voidvoidsetFirstName(String firstName) voidsetHomepage(List<URI> homepage) voidvoidsetLastName(String lastName) voidsetModified(Date modified) voidsetModifiedBy(String modifiedBy) voidsetOrganization(String organization) voidvoidsetPosition(List<String> position) voidsetPostalCode(String postalCode) voidsetPrimary(boolean primary) voidsetProvince(String province) voidsetSalutation(String salutation) voidsetType(ContactType type) voidtoString()
-
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:AddresselectronicMailAddress in EML -
setEmail
-
addEmail
-
getPhone
Description copied from interface:Addressphone in EML -
setPhone
-
addPhone
-
getAddress
Description copied from interface:AddressdeliveryPoint in EML- Specified by:
getAddressin interfaceAddress
-
setAddress
- Specified by:
setAddressin interfaceAddress
-
addAddress
-
getCity
Description copied from interface:Addresscity in EML -
setCity
-
getProvince
Description copied from interface:AddressadministrativeArea in EML- Specified by:
getProvincein interfaceAddress
-
setProvince
- Specified by:
setProvincein interfaceAddress
-
getCountry
Description copied from interface:Addresscountry in EML- Specified by:
getCountryin interfaceAddress
-
setCountry
- Specified by:
setCountryin interfaceAddress
-
getPostalCode
Description copied from interface:AddresspostalCode in EML- Specified by:
getPostalCodein interfaceAddress
-
setPostalCode
- Specified by:
setPostalCodein interfaceAddress
-
getOrganization
Description copied from interface:AddressInstitution name as part of the address- Specified by:
getOrganizationin interfaceAddress
-
setOrganization
- Specified by:
setOrganizationin interfaceAddress
-
getHomepage
Description copied from interface:AddressList of homepage websites.- Specified by:
getHomepagein interfaceAddress
-
setHomepage
- Specified by:
setHomepagein 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, keyand others.- Specified by:
lenientEqualsin interfaceLenientEquals<Contact>- Parameters:
contact- To compare against- Returns:
- true if...
-