new SourceReference( [json])
A reference to a discription of a source.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
json |
Object |
<optional> |
- See:
Extends
Methods
-
addField(field)
-
Add a field
Parameters:
Name Type Description fieldField - Inherited From:
Returns:
this- Type
- ExtensibleData
-
addLink(link)
-
Add a link
Parameters:
Name Type Description linkLink - Inherited From:
Returns:
this- Type
- ExtensibleData
-
addQualifier(qualifier)
-
Add a qualifier
Parameters:
Name Type Description qualifierQualifiers Returns:
this- Type
- SourceReference
-
getAttribution()
-
Get the attribution.
Returns:
- Type
- Attribution
-
getDescription()
-
Get the description.
Returns:
- Type
- String
-
getDescriptionId()
-
Get the description id.
Returns:
- Type
- String
-
getFields()
-
Get the fields
- Inherited From:
Returns:
- Type
- Array.<Field>
-
getId()
-
Get the object's id.
- Inherited From:
Returns:
Id- Type
- String
-
getLink(rel)
-
Get a link
Parameters:
Name Type Description relString - Inherited From:
Returns:
- Type
- Link
-
getLinks()
-
Get the links
- Inherited From:
Returns:
- Type
- Array.<Link>
-
getQualifiers()
-
Get the qualifiers
Returns:
qualifiers- Type
- Array.<Qualifier>
-
init(json)
-
Initialize from JSON
Parameters:
Name Type Description jsonObject - Overrides:
Returns:
this- Type
- SourceReference
-
<static> isInstance(obj)
-
Check whether the given object is an instance of this class.
Parameters:
Name Type Description objObject Returns:
- Type
- Boolean
-
setAttribution(attribution)
-
Set the attribution
Parameters:
Name Type Description attributionObject | Attribution Returns:
This instance.- Type
- SourceReference
-
setDescription(description)
-
Set the description.
Parameters:
Name Type Description descriptionString Returns:
This instance.- Type
- SourceReference
-
setDescriptionId(descriptionId)
-
Set the description id.
Parameters:
Name Type Description descriptionIdString Returns:
This instance.- Type
- SourceReference
-
setFields(fields)
-
Set the fields
Parameters:
Name Type Description fieldsArray.<Field> - Inherited From:
Returns:
this- Type
- ExtensibleData
-
setId(id)
-
Set the object's id.
Parameters:
Name Type Description idString - Inherited From:
Returns:
This object, for chaining.- Type
- ExtensibleData
-
setLinks(links)
-
Set the links
Parameters:
Name Type Description linksLinks - Inherited From:
Returns:
this- Type
- ExtensibleData
-
setQualifiers(qualifiers)
-
Set the qualifiers
Parameters:
Name Type Description qualifiersArray.<Qualifier> Returns:
this- Type
- SourceReference
-
toJSON()
-
Export the object as JSON
- Overrides:
Returns:
JSON object- Type
- Object