public class Contact extends Object implements Address, LenientEquals<Contact>
Constructor and Description |
---|
Contact() |
Modifier and Type | Method and Description |
---|---|
void |
addAddress(String address) |
void |
addEmail(String email) |
void |
addHomepage(URI homepage) |
void |
addPhone(String phone) |
void |
addPosition(String position) |
void |
addUserId(String userId) |
void |
addUserId(String directory,
String id)
Adds a new user id that is assembled from a directory name and a local id within it.
|
String |
computeCompleteName()
Compute and returns the complete name in the form: FirstName LastName.
|
boolean |
equals(Object o) |
List<String> |
getAddress()
deliveryPoint in EML
|
String |
getCity()
city in EML
|
Country |
getCountry()
country in EML
|
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date |
getCreated() |
@Size(min=3) String |
getCreatedBy() |
String |
getDescription() |
List<String> |
getEmail()
electronicMailAddress in EML
|
@Size(min=1) String |
getFirstName() |
List<URI> |
getHomepage()
List of homepage websites.
|
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Integer |
getKey() |
@Size(min=1) String |
getLastName() |
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date |
getModified() |
@Size(min=3) String |
getModifiedBy() |
@Size(min=2) String |
getOrganization()
Institution name as part of the address
|
List<String> |
getPhone()
phone in EML
|
List<String> |
getPosition() |
String |
getPostalCode()
postalCode in EML
|
String |
getProvince()
administrativeArea in EML
|
ContactType |
getType() |
List<String> |
getUserId() |
int |
hashCode() |
boolean |
isPrimary() |
boolean |
lenientEquals(Contact contact)
This implementation of the
equals(Object) method does only check business equality and disregards
automatically set and maintained fields like createdBy, key and others. |
void |
setAddress(List<String> address) |
void |
setCity(String city) |
void |
setCountry(Country country) |
void |
setCreated(Date created) |
void |
setCreatedBy(String createdBy) |
void |
setDescription(String description) |
void |
setEmail(List<String> email) |
void |
setFirstName(String firstName) |
void |
setHomepage(List<URI> homepage) |
void |
setKey(Integer key) |
void |
setLastName(String lastName) |
void |
setModified(Date modified) |
void |
setModifiedBy(String modifiedBy) |
void |
setOrganization(String organization) |
void |
setPhone(List<String> phone) |
void |
setPosition(List<String> position) |
void |
setPostalCode(String postalCode) |
void |
setPrimary(boolean primary) |
void |
setProvince(String province) |
void |
setType(ContactType type) |
void |
setUserId(List<String> userId) |
String |
toString() |
public Contact()
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Integer getKey()
@Nullable public ContactType getType()
public void setType(ContactType type)
public boolean isPrimary()
public void setPrimary(boolean primary)
public void addUserId(String directory, String id)
directory
- identifier for the directory, preferably a URL domain like http://orcid.orgid
- the identifier in that directory@Nullable @Size(min=1) public @Size(min=1) String getFirstName()
public void setFirstName(String firstName)
@Nullable @Size(min=1) public @Size(min=1) String getLastName()
public void setLastName(String lastName)
public String computeCompleteName()
public List<String> getPosition()
public void setPosition(List<String> position)
public void addPosition(String position)
@Nullable public String getDescription()
public void setDescription(String description)
@Nullable public List<String> getEmail()
Address
@Nullable public List<String> getPhone()
Address
public List<String> getAddress()
Address
getAddress
in interface Address
public void setAddress(List<String> address)
setAddress
in interface Address
public void addAddress(String address)
public String getProvince()
Address
getProvince
in interface Address
public void setProvince(String province)
setProvince
in interface Address
public Country getCountry()
Address
getCountry
in interface Address
public void setCountry(Country country)
setCountry
in interface Address
public String getPostalCode()
Address
getPostalCode
in interface Address
public void setPostalCode(String postalCode)
setPostalCode
in interface Address
@Nullable @Size(min=2) public @Size(min=2) String getOrganization()
Address
getOrganization
in interface Address
public void setOrganization(String organization)
setOrganization
in interface Address
public List<URI> getHomepage()
Address
getHomepage
in interface Address
public void setHomepage(List<URI> homepage)
setHomepage
in interface Address
public void addHomepage(URI homepage)
@Size(min=3) public @Size(min=3) String getCreatedBy()
public void setCreatedBy(String createdBy)
@Size(min=3) public @Size(min=3) String getModifiedBy()
public void setModifiedBy(String modifiedBy)
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getCreated()
public void setCreated(Date created)
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getModified()
public void setModified(Date modified)
public boolean lenientEquals(Contact contact)
equals(Object)
method does only check business equality and disregards
automatically set and maintained fields like createdBy, key
and others.lenientEquals
in interface LenientEquals<Contact>
contact
- To compare againstCopyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.