new ExtensibleData( [json])
A set of data that supports extension elements.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
json |
Object |
<optional> |
Extends
Methods
-
addField(field)
-
Add a field
Parameters:
Name Type Description fieldField Returns:
this- Type
- ExtensibleData
-
addLink(link)
-
Add a link
Parameters:
Name Type Description linkLink Returns:
this- Type
- ExtensibleData
-
getFields()
-
Get the fields
Returns:
- Type
- Array.<Field>
-
getId()
-
Get the object's id.
Returns:
Id- Type
- String
-
getLink(rel)
-
Get a link
Parameters:
Name Type Description relString Returns:
- Type
- Link
-
getLinks()
-
Get the links
Returns:
- Type
- Array.<Link>
-
init(json)
-
Initialize from JSON
Parameters:
Name Type Description jsonObject - Overrides:
Returns:
this- Type
- ExtensibleData
-
<static> isInstance(obj)
-
Check whether the given object is an instance of this class.
Parameters:
Name Type Description objObject Returns:
- Type
- Boolean
-
setFields(fields)
-
Set the fields
Parameters:
Name Type Description fieldsArray.<Field> Returns:
this- Type
- ExtensibleData
-
setId(id)
-
Set the object's id.
Parameters:
Name Type Description idString Returns:
This object, for chaining.- Type
- ExtensibleData
-
setLinks(links)
-
Set the links
Parameters:
Name Type Description linksLinks Returns:
this- Type
- ExtensibleData
-
toJSON()
-
Export the object as JSON
- Overrides:
Returns:
JSON object- Type
- Object