Package org.gedcomx.agent
Class Agent
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- 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
Constructors Constructor Description Agent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.Agentaccount(OnlineAccount account)Build up this agent with an online account.voidaddAccount(OnlineAccount account)Add an account.voidaddAddress(Address address)Add an address.voidaddEmail(ResourceReference email)Add an email.voidaddIdentifier(Identifier identifier)Add an identifier.voidaddName(TextValue name)Add a name.voidaddPhone(ResourceReference phone)Add a phone.Agentaddress(Address address)Build up this agent with an address.Agentemail(String email)Build up this agent with an email address.Agentemail(ResourceReference email)Build up this agent with an email address.Agentemail(URI email)Build up this agent with an email address.voidembed(Agent agent)Embed another agent.AgentextensionElement(Object element)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.ResourceReferencegetHomepage()The homepage of the person or organization.List<Identifier>getIdentifiers()The list of identifiers for the agent.TextValuegetName()The preferred name for this agent.List<TextValue>getNames()The list of names for the agent.ResourceReferencegetOpenid()The openid of the person or organization.ResourceReferencegetPerson()The person that describes this agent.List<ResourceReference>getPhones()The phones that belong to this person or organization.Agenthomepage(ResourceReference homepage)Build up this agent with a home page.Agenthomepage(URI homepage)Build up this agent with a home page.Agentid(String id)Build up this object with an id.Agentidentifier(Identifier identifier)Build up this agent with an identifier.Agentlink(String rel, URI href)Build up this data with a link.Agentlink(Link link)Build up this data with a link.Agentname(String name)Build up this agent with a name.Agentname(TextValue name)Build up this agent with a name.Agentopenid(ResourceReference openid)Build up this agent with a open id.Agentopenid(URI openid)Build up this agent with a open id.Agentperson(ResourceReference person)Build up this agent with a person.Agentperson(URI person)Build up this agent with a person.Agentphone(String phone)Build up this agent with a phone number.Agentphone(ResourceReference phone)Build up this agent with a phone number.Agentphone(URI phone)Build up this agent with a phone number.voidsetAccounts(List<OnlineAccount> accounts)The accounts that belong to this person or organization.voidsetAddresses(List<Address> addresses)The addresses that belong to this person or organization.voidsetEmails(List<ResourceReference> emails)The emails that belong to this person or organization.voidsetHomepage(ResourceReference homepage)The homepage of the person or organization.voidsetIdentifiers(List<Identifier> identifiers)The list of identifiers of the agent.voidsetNames(List<TextValue> names)The list of names for the agent.voidsetOpenid(ResourceReference openid)The openid of the person or organization.voidsetPerson(ResourceReference person)The person that describes this agent.voidsetPhones(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
-
-
-
-
Method Detail
-
id
public Agent id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.- Overrides:
idin classExtensibleData- Parameters:
id- The id.- Returns:
- this.
-
extensionElement
public Agent extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
link
public Agent link(String rel, URI href)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- Parameters:
rel- The rel.href- The href.- Returns:
- this.
-
link
public Agent link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- 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.
-
-