Feature
Extends
AbstractEntity
class Feature extends AbstractEntity
Static
create
static create(json = null): Feature
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Returns:
Type: Feature
getName
static getName(): string
Returns:
Type: constant ("Feature": string)
Constructor
constructor
constructor(json = null): Feature
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Properties
children
Type | Default | Description |
---|---|---|
OrderedCollection<Feature> | new OrderedCollection('Feature') |
client_id
Type | Default | Description |
---|---|---|
string | null | null |
id
Type | Default | Description |
---|---|---|
null | int | symbol | null | The entity identifier |
metadata
Type | Default | Description |
---|---|---|
Map | new Map() |
name
Type | Default | Description |
---|---|---|
string | null |
parents
Type | Default | Description |
---|---|---|
Collection<Feature> | new Collection('Feature') |
signature
Type | Default | Description |
---|---|---|
string | null | null |
site
Type | Default | Description |
---|---|---|
Reference<Site> | new Reference('Site', null) |
values
Type | Default | Description |
---|---|---|
Collection<FeatureValue> | new Collection('FeatureValue') |
Methods
toJSON
toJSON(): object
Returns:
Type: object (see properties bellow)
Name | Type | Description |
---|---|---|
children | Array<{id: int | symbol, position: int}> | |
client_id | string | null | |
id | int | symbol | null | |
metadata | object | |
name | string | null | |
parents | Array<int | symbol> | |
signature | string | null | |
site | int | symbol | null | |
values | Array< int | symbol > |
fromJSON
fromJSON(json: object): Feature
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | object | Yes | - | |
json.children | Array<{id: int | symbol, position: int}> | No | [] | |
json.client_id | string | null | No | null | |
json.id | int | symbol | null | No | null | |
json.metadata | object | No | {} | |
json.name | string | null | No | null | |
json.parents | Array<int | symbol> | No | [] | |
json.signature | string | null | No | null | |
json.site | int | symbol | null | No | null | |
json.values | Array< int | symbol > | No | null |
Returns:
Returns this
clone
clone(): Feature
Returns:
A new deep copy
Type: Feature