Class: Attribution

Attribution


new Attribution( [json])

Define who is contributing information, when they contributed it, and why they are making the contribution.
Parameters:
Name Type Argument Description
json Object <optional>
See:

Extends

Methods


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

getChangeMessage()

Get the change message.
Returns:
Change message
Type
String

getContributor()

Get the contributor.
Returns:
contributor
Type
ResourceReference

getCreated()

Get the created timestamp
Returns:
created
Type
Date

getCreator()

Get the creator
Returns:
Creator
Type
ResourceReference

getFields()

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

getId()

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

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

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

getModified()

Get the modified timestamp
Returns:
modified
Type
Date

init(json)

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

<static> isInstance(obj)

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

setChangeMessage(changeMessage)

Set the change message.
Parameters:
Name Type Description
changeMessage String
Returns:
This object
Type
Attribution

setContributor(contributor)

Set the contributor
Parameters:
Name Type Description
contributor Object | ResourceReference ResourceReference representing the contributor.
Returns:
This instance
Type
Attribution

setCreated(date)

Set the created timestamp
Parameters:
Name Type Description
date Date | Number Integer timestamp (milliseconds since epoch) or JavaScript Date instance
Returns:
This instance
Type
Attribution

setCreator(creator)

Set the creator
Parameters:
Name Type Description
creator Object | ResourceReference ResourceReference representing the creator.
Returns:
This instance
Type
Attribution

setFields(fields)

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

setId(id)

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

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

setModified(date)

Set the modified timestamp
Parameters:
Name Type Description
date Date | Number Integer timestamp (milliseconds since epoch) or JavaScript Date instance
Returns:
This instance
Type
Attribution

toJSON()

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