Class: Agent

Agent


new Agent( [json])

Someone or something that curates genealogical data, such as a genealogical researcher, user of software, or organization.
Parameters:
Name Type Argument Description
json Object <optional>
See:

Extends

Methods


addAccount(account)

Add an account
Parameters:
Name Type Description
account OnlineAccount | Object
Returns:
Type
Agent

addAddress(address)

Add an address
Parameters:
Name Type Description
address Address | Object
Returns:
Type
Agent

addEmail(email)

Add an email
Parameters:
Name Type Description
email ResourceReference | Object
Returns:
Type
Agent

addField(field)

Add a field
Parameters:
Name Type Description
field Field
Inherited From:
Returns:
this
Type
ExtensibleData

Add a link
Parameters:
Name Type Description
link Link
Inherited From:
Returns:
this
Type
ExtensibleData

addName(name)

Add a name
Parameters:
Name Type Description
name TextValue | Object
Returns:
Type
Agent

addPhone(phone)

Add a phone
Parameters:
Name Type Description
phone ResourceReference | Object
Returns:
Type
Agent

getAccounts()

Get the accounts
Returns:
Type
Array.<OnlineAccount>

getAddresses()

Get the addresses
Returns:
Type
Array.<Address>

getEmails()

Get the emails
Returns:
Type
Array.<ResourceReference>

getFields()

Get the fields
Inherited From:
Returns:
Type
Array.<Field>

getHomepage()

Get the home page
Returns:
Type
ResourceReference

getId()

Get the object's id.
Inherited From:
Returns:
Id
Type
String

getIdentifiers()

Get the identifiers
Returns:
Type
Identifiers

Get a link
Parameters:
Name Type Description
rel String
Inherited From:
Returns:
Type
Link

Get the links
Inherited From:
Returns:
Type
Array.<Link>

getNames()

Get the names
Returns:
Type
Array.<TextValue>

getOpenid()

Get the openid
Returns:
Type
ResourceReference

getPerson()

Get the person reference
Returns:
Type
ResourceReference

getPhones()

Get the phones
Returns:
Type
Array.<ResourceReference>

init(json)

Initialize from JSON
Parameters:
Name Type Description
json Object
Overrides:
Returns:
this
Type
Agent

<static> isInstance(obj)

Check whether the given object is an instance of this class.
Parameters:
Name Type Description
obj Object
Returns:
Type
Boolean

setAccounts(accounts)

Set the accounts
Parameters:
Name Type Description
accounts Array.<OnlineAccount> | Array.<Object>
Returns:
Type
Agent

setAddresses(addresses)

Set the addresses
Parameters:
Name Type Description
addresses Array.<Address> | Array.<Object>
Returns:
Type
Agent

setEmails(emails)

Set the emails
Parameters:
Name Type Description
emails Array.<ResourceReference> | Array.<Object>
Returns:
Type
Agent

setFields(fields)

Set the fields
Parameters:
Name Type Description
fields Array.<Field>
Inherited From:
Returns:
this
Type
ExtensibleData

setHomepage(homepage)

Set the home page
Parameters:
Name Type Description
homepage ResourceReference | Object
Returns:
Type
Agent

setId(id)

Set the object's id.
Parameters:
Name Type Description
id String
Inherited From:
Returns:
This object, for chaining.
Type
ExtensibleData

setIdentifiers(identifiers)

Set the identifiers
Parameters:
Name Type Description
identifiers Identifiers
Returns:
Type
Agent

Set the links
Parameters:
Name Type Description
links Links
Inherited From:
Returns:
this
Type
ExtensibleData

setNames(names)

Set the names
Parameters:
Name Type Description
names Array.<TextValue> | Array.<Object>
Returns:
Type
Agent

setOpenid()

Set the openid
Returns:
Type
Agent

setPerson(person)

Set the person reference
Parameters:
Name Type Description
person ResourceReference
Returns:
Type
Agent

setPhones(phones)

Set the phones
Parameters:
Name Type Description
phones Array.<ResourceReference> | Array.<Object>
Returns:
Type
Agent

toJSON()

Export the object as JSON
Overrides:
Returns:
JSON object
Type
Object