Person
@Document(name = "builtin:Person")
public class Person extends Thing
AppSearch document representing a Person entity modeled after Person.
The Person document includes commonly searchable properties such as name, organization, and notes, as well as contact information such as phone numbers, email addresses, etc, grouped by their label. The labeled contact information is present in a nested ContactPoint document.
Summary
Nested types |
|---|
public class Person.AdditionalNameHolds type information for additional names for Person. |
public final class Person.BuilderBuilder class for |
Public methods |
|
|---|---|
@NonNull List<String> |
Returns a list of additional names for this |
@NonNull List<String> |
Returns a list of affiliation for this |
@NonNull List<ContactPoint> |
Returns a list of |
@Nullable Uri |
Returns an external uri for this |
@Nullable String |
Returns the family (or last) name for this |
@Nullable String |
Returns the given (or first) name for this |
@Nullable Uri |
|
@Nullable String |
Returns the middle name(s) for this |
@NonNull List<String> |
getNotes()Returns the notes about this |
@NonNull List<String> |
Returns a list of relations for this |
@NonNull List<Person.AdditionalName> |
Returns a list of |
boolean |
isBot()Returns whether this |
boolean |
Returns whether this |
Inherited methods |
||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public methods
getAdditionalNames
public @NonNull List<String> getAdditionalNames()
Returns a list of additional names for this Person.
Additional names can include something like phonetic names, or nicknames.
Different from getTypedAdditionalNames, the return value doesn't include type information for the additional names.
getAffiliations
public @NonNull List<String> getAffiliations()
Returns a list of affiliation for this Person. Like company, school, etc.
For a contact with the title "Software Engineer" in a department "Engineering" at a company "Cloud Company", this can include a flattened value of "Software Engineer, Engineering, Cloud Company".
getContactPoints
public @NonNull List<ContactPoint> getContactPoints()
Returns a list of ContactPoint.
More information can be found in ContactPoint.
getExternalUri
public @Nullable Uri getExternalUri()
Returns an external uri for this Person. Or null if no Uri is provided. A Uri can be any of the following:
- A
CONTENT_LOOKUP_URI. - A
mailto:schema* - A
tel:schema*
For mailto: and tel: URI schemes, it is recommended that the path portion refers to a valid contact in the Contacts Provider.
getFamilyName
public @Nullable String getFamilyName()
Returns the family (or last) name for this Person.
getGivenName
public @Nullable String getGivenName()
Returns the given (or first) name for this Person.
getMiddleName
public @Nullable String getMiddleName()
Returns the middle name(s) for this Person.
For a Person with multiple middle names, this method returns a flattened and whitespace separated list. For example, "middle1 middle2 ..."
getNotes
public @NonNull List<String> getNotes()
Returns the notes about this Person.
getRelations
public @NonNull List<String> getRelations()
Returns a list of relations for this Person, like "Father" or "Mother".
getTypedAdditionalNames
public @NonNull List<Person.AdditionalName> getTypedAdditionalNames()
Returns a list of AdditionalName for this Person.
Additional names can include something like phonetic names, or nicknames.
Each AdditionalName contains type information for the additional name.
isBot
public boolean isBot()
Returns whether this Person is a machine rather than a human.
isImportant
public boolean isImportant()
Returns whether this Person is important to the user of this device with regards to how frequently they interact.