Class Agent

All Implemented Interfaces:
HasTransientProperties, SupportsLinks, SupportsExtensionElements

public class Agent extends HypermediaEnabledData
An agent, e.g. person, organization, or group. In genealogical research, an agent often takes the role of a contributor.
Author:
Ryan Heaton
See Also:
  • Constructor Details

    • Agent

      public Agent()
    • Agent

      public Agent(Agent copy)
  • Method Details

    • id

      public Agent id(String id)
      Description copied from class: ExtensibleData
      Build up this object with an id.
      Overrides:
      id in class ExtensibleData
      Parameters:
      id - The id.
      Returns:
      this.
    • extensionElement

      public Agent extensionElement(Object element)
      Overrides:
      extensionElement in class ExtensibleData
    • link

      public Agent link(String rel, URI href)
      Description copied from class: HypermediaEnabledData
      Build up this data with a link.
      Overrides:
      link in class HypermediaEnabledData
      Parameters:
      rel - The rel.
      href - The href.
      Returns:
      this.
    • link

      public Agent link(Link link)
      Description copied from class: HypermediaEnabledData
      Build up this data with a link.
      Overrides:
      link in class HypermediaEnabledData
      Parameters:
      link - The link.
      Returns:
      this.
    • getName

      public TextValue getName()
      The preferred name for this agent.
      Returns:
      The preferred name for this agent.
    • getNames

      public List<TextValue> getNames()
      The list of names for the agent.
      Returns:
      The list of names for the agent.
    • setNames

      public void setNames(List<TextValue> names)
      The list of names for the agent.
      Parameters:
      names - The list of names for the agent.
    • name

      public Agent name(TextValue name)
      Build up this agent with a name.
      Parameters:
      name - The name.
      Returns:
      this.
    • name

      public Agent name(String name)
      Build up this agent with a name.
      Parameters:
      name - The name.
      Returns:
      this.
    • addName

      public void addName(TextValue name)
      Add a name.
      Parameters:
      name - The name.
    • getIdentifiers

      public List<Identifier> getIdentifiers()
      The list of identifiers for the agent.
      Returns:
      The list of identifiers for the agent.
    • setIdentifiers

      public void setIdentifiers(List<Identifier> identifiers)
      The list of identifiers of the agent.
      Parameters:
      identifiers - The list of identifiers of the agent.
    • identifier

      public Agent identifier(Identifier identifier)
      Build up this agent with an identifier.
      Parameters:
      identifier - The identifier.
      Returns:
      this.
    • addIdentifier

      public void addIdentifier(Identifier identifier)
      Add an identifier.
      Parameters:
      identifier - The identifier to add.
    • getHomepage

      public ResourceReference getHomepage()
      The homepage of the person or organization. Note this is different from the homepage of the service where the person or organization has an account.
      Returns:
      The homepage.
    • setHomepage

      public void setHomepage(ResourceReference homepage)
      The homepage of the person or organization. Note this is different from the homepage of the service where the person or organization has an account.
      Parameters:
      homepage - The homepage.
    • homepage

      public Agent homepage(ResourceReference homepage)
      Build up this agent with a home page.
      Parameters:
      homepage - The home page of the agent.
      Returns:
      this.
    • homepage

      public Agent homepage(URI homepage)
      Build up this agent with a home page.
      Parameters:
      homepage - The home page of the agent.
      Returns:
      this.
    • getOpenid

      public ResourceReference getOpenid()
      The openid of the person or organization.
      Returns:
      The openid of the person or organization.
    • setOpenid

      public void setOpenid(ResourceReference openid)
      The openid of the person or organization.
      Parameters:
      openid - The openid of the person or organization.
    • openid

      public Agent openid(ResourceReference openid)
      Build up this agent with a open id.
      Parameters:
      openid - The open id of the agent.
      Returns:
      this.
    • openid

      public Agent openid(URI openid)
      Build up this agent with a open id.
      Parameters:
      openid - The open id of the agent.
      Returns:
      this.
    • getAccounts

      public List<OnlineAccount> getAccounts()
      The accounts that belong to this person or organization.
      Returns:
      The accounts that belong to this person or organization.
    • setAccounts

      public void setAccounts(List<OnlineAccount> accounts)
      The accounts that belong to this person or organization.
      Parameters:
      accounts - The accounts that belong to this person or organization.
    • account

      public Agent account(OnlineAccount account)
      Build up this agent with an online account.
      Parameters:
      account - The account.
      Returns:
      this.
    • addAccount

      public void addAccount(OnlineAccount account)
      Add an account.
      Parameters:
      account - The account to add.
    • getEmails

      public List<ResourceReference> getEmails()
      The emails that belong to this person or organization.
      Returns:
      The emails that belong to this person or organization.
    • setEmails

      public void setEmails(List<ResourceReference> emails)
      The emails that belong to this person or organization.
      Parameters:
      emails - The emails that belong to this person or organization.
    • email

      public Agent email(ResourceReference email)
      Build up this agent with an email address.
      Parameters:
      email - The email address.
      Returns:
      this.
    • email

      public Agent email(URI email)
      Build up this agent with an email address.
      Parameters:
      email - The email address.
      Returns:
      this.
    • email

      public Agent email(String email)
      Build up this agent with an email address.
      Parameters:
      email - The email address.
      Returns:
      this.
    • addEmail

      public void addEmail(ResourceReference email)
      Add an email.
      Parameters:
      email - The email.
    • getPhones

      public List<ResourceReference> getPhones()
      The phones that belong to this person or organization.
      Returns:
      The phones that belong to this person or organization.
    • setPhones

      public void setPhones(List<ResourceReference> phones)
      The phones that belong to this person or organization.
      Parameters:
      phones - The phones that belong to this person or organization.
    • phone

      public Agent phone(ResourceReference phone)
      Build up this agent with a phone number.
      Parameters:
      phone - The phone number.
      Returns:
      this.
    • phone

      public Agent phone(URI phone)
      Build up this agent with a phone number.
      Parameters:
      phone - The phone number.
      Returns:
      this.
    • phone

      public Agent phone(String phone)
      Build up this agent with a phone number.
      Parameters:
      phone - The phone number.
      Returns:
      this.
    • addPhone

      public void addPhone(ResourceReference phone)
      Add a phone.
      Parameters:
      phone - The phone to add.
    • getAddresses

      public List<Address> getAddresses()
      The addresses that belong to this person or organization.
      Returns:
      The addresses that belong to this person or organization.
    • setAddresses

      public void setAddresses(List<Address> addresses)
      The addresses that belong to this person or organization.
      Parameters:
      addresses - The addresses that belong to this person or organization.
    • address

      public Agent address(Address address)
      Build up this agent with an address.
      Parameters:
      address - The address.
      Returns:
      this.
    • addAddress

      public void addAddress(Address address)
      Add an address.
      Parameters:
      address - The address to add.
    • getPerson

      public ResourceReference getPerson()
      The person that describes this agent.
      Returns:
      The person.
    • setPerson

      public void setPerson(ResourceReference person)
      The person that describes this agent.
      Parameters:
      person - The person.
    • person

      public Agent person(ResourceReference person)
      Build up this agent with a person.
      Parameters:
      person - The person of the agent.
      Returns:
      this.
    • person

      public Agent person(URI person)
      Build up this agent with a person.
      Parameters:
      person - The person of the agent.
      Returns:
      this.
    • accept

      public void accept(GedcomxModelVisitor visitor)
      Accept a visitor.
      Parameters:
      visitor - The visitor.
    • embed

      public void embed(Agent agent)
      Embed another agent.
      Parameters:
      agent - The agent to embed.