org.gedcomx.agent
Class Agent

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by org.gedcomx.links.HypermediaEnabledData
          extended by org.gedcomx.agent.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:
foaf:Agent

Field Summary
 
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
 
Constructor Summary
Agent()
           
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 Agent account(OnlineAccount account)
          Build up this agent with an online account.
 void addAccount(OnlineAccount account)
          Add an account.
 void addAddress(Address address)
          Add an address.
 void addEmail(ResourceReference email)
          Add an email.
 void addIdentifier(Identifier identifier)
          Add an identifier.
 void addName(TextValue name)
          Add a name.
 void addPhone(ResourceReference phone)
          Add a phone.
 Agent address(Address address)
          Build up this agent with an address.
 Agent email(ResourceReference email)
          Build up this agent with an email address.
 Agent email(String email)
          Build up this agent with an email address.
 Agent email(URI email)
          Build up this agent with an email address.
 void embed(Agent agent)
          Embed another agent.
 List<OnlineAccount> getAccounts()
          The accounts that belong to this person or organization.
 List<Address> getAddresses()
          The addresses that belong to this person or organization.
 List<ResourceReference> getEmails()
          The emails that belong to this person or organization.
 ResourceReference getHomepage()
          The homepage of the person or organization.
 List<Identifier> getIdentifiers()
          The list of identifiers for the agent.
 TextValue getName()
          The preferred name for this agent.
 List<TextValue> getNames()
          The list of names for the agent.
 ResourceReference getOpenid()
          The openid of the person or organization.
 List<ResourceReference> getPhones()
          The phones that belong to this person or organization.
 Agent homepage(ResourceReference homepage)
          Build up this agent with a home page.
 Agent homepage(URI homepage)
          Build up this agent with a home page.
 Agent id(String id)
          Build up this object with an id.
 Agent identifier(Identifier identifier)
          Build up this agent with an identifier.
 Agent link(Link link)
          Build up this data with a link.
 Agent link(String rel, URI href)
          Build up this data with a link.
 Agent name(String name)
          Build up this agent with a name.
 Agent name(TextValue name)
          Build up this agent with a name.
 Agent openid(ResourceReference openid)
          Build up this agent with a open id.
 Agent openid(URI openid)
          Build up this agent with a open id.
 Agent phone(ResourceReference phone)
          Build up this agent with a phone number.
 Agent phone(String phone)
          Build up this agent with a phone number.
 Agent phone(URI phone)
          Build up this agent with a phone number.
 void setAccounts(List<OnlineAccount> accounts)
          The accounts that belong to this person or organization.
 void setAddresses(List<Address> addresses)
          The addresses that belong to this person or organization.
 void setEmails(List<ResourceReference> emails)
          The emails that belong to this person or organization.
 void setHomepage(ResourceReference homepage)
          The homepage of the person or organization.
 void setIdentifiers(List<Identifier> identifiers)
          The list of identifiers of the agent.
 void setNames(List<TextValue> names)
          The list of names for the agent.
 void setOpenid(ResourceReference openid)
          The openid of the person or organization.
 void setPhones(List<ResourceReference> phones)
          The phones that belong to this person or organization.
 
Methods inherited from class org.gedcomx.links.HypermediaEnabledData
addLink, addLink, addTemplatedLink, embed, getLink, getLinks, getLinks, setLinks
 
Methods inherited from class org.gedcomx.common.ExtensibleData
addExtensionElement, embed, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Agent

public Agent()
Method Detail

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.

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. param 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.

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.


Copyright © 2015. All rights reserved.