new Note( [json])
A note about a resource.
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
-
getAttribution()
-
Get the attribution.
Returns:
- Type
- Attribution
-
getFields()
-
Get the fields
- Inherited From:
Returns:
- Type
- Array.<Field>
-
getId()
-
Get the object's id.
- Inherited From:
Returns:
Id- Type
- String
-
getLang()
-
Get the language identifier.
Returns:
lang- 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>
-
getSubject()
-
Get the subject.
-
getText()
-
Get the text.
Returns:
text- Type
- String
-
init(json)
-
Initialize from JSON
Parameters:
Name Type Description jsonObject - Overrides:
Returns:
this- Type
- Note
-
<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
- Note
-
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
-
setLang(lang)
-
Set the language identifier.
Parameters:
Name Type Description langString Returns:
This instance.- Type
- Note
-
setLinks(links)
-
Set the links
Parameters:
Name Type Description linksLinks - Inherited From:
Returns:
this- Type
- ExtensibleData
-
setSubject(subject)
-
Set the subject.
Parameters:
Name Type Description subjectString Returns:
This note.- Type
- Note
-
setText(text)
-
Set the text.
Parameters:
Name Type Description textString Returns:
This note.- Type
- Note
-
toJSON()
-
Export the object as JSON
- Overrides:
Returns:
JSON object- Type
- Object