# Class: NoteShort

## NoteShort()

This note's representation is used in note tree and is kept in TreeCache. Its notable omission is the note content.

## Constructor

#### new NoteShort()

Source:
  - entities/note_short.js, line 12

### Members

#### archived

Source:
  - entities/note_short.js, line 26

#### isProtected

Source:
  - entities/note_short.js, line 20

#### mime

Source:
  - entities/note_short.js, line 24

#### noteId

Source:
  - entities/note_short.js, line 16

#### title

Source:
  - entities/note_short.js, line 18

#### type

Source:
  - entities/note_short.js, line 22

### Methods

#### (async) getAttribute(type, name) → {Promise.<Attribute>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` | string | attribute type (label, relation, etc.)
`name` | string | attribute name

Source:
  - entities/note_short.js, line 144

##### Returns:

attribute of given type and name. If there's more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.

Type
  Promise.<Attribute>

#### (async) getAttributes(nameopt) → {Promise.<Array.<Attribute>>}

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | string | <optional> | attribute name to filter

Source:
  - entities/note_short.js, line 85

##### Returns:

Type
  Promise.<Array.<Attribute>>

#### (async) getAttributeValue(type, name) → {Promise.<string>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` | string | attribute type (label, relation, etc.)
`name` | string | attribute name

Source:
  - entities/note_short.js, line 155

##### Returns:

attribute value of given type and name or null if no such attribute exists.

Type
  Promise.<string>

#### (async) getBranches() → {Promise.<Array.<Branch>>}

Source:
  - entities/note_short.js, line 36

##### Returns:

Type
  Promise.<Array.<Branch>>

#### (async) getChildBranches() → {Promise.<Array.<Branch>>}

Source:
  - entities/note_short.js, line 50

##### Returns:

Type
  Promise.<Array.<Branch>>

#### getChildNoteIds() → {Array.<string>}

Source:
  - entities/note_short.js, line 72

##### Returns:

Type
  Array.<string>

#### (async) getChildNotes() → {Promise.<Array.<NoteShort>>}

Source:
  - entities/note_short.js, line 77

##### Returns:

Type
  Promise.<Array.<NoteShort>>

#### (async) getLabel(name) → {Promise.<Attribute>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | label name

Source:
  - entities/note_short.js, line 177

##### Returns:

label if it exists, null otherwise

Type
  Promise.<Attribute>

#### (async) getLabelDefinitions(nameopt) → {Promise.<Array.<Attribute>>}

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | string | <optional> | label name to filter

Source:
  - entities/note_short.js, line 110

##### Returns:

all note's label definitions, including inherited ones

Type
  Promise.<Array.<Attribute>>

#### (async) getLabels(nameopt) → {Promise.<Array.<Attribute>>}

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | string | <optional> | label name to filter

Source:
  - entities/note_short.js, line 102

##### Returns:

all note's labels (attributes with type label), including inherited ones

Type
  Promise.<Array.<Attribute>>

#### (async) getLabelValue(name) → {Promise.<string>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | label name

Source:
  - entities/note_short.js, line 189

##### Returns:

label value if label exists, null otherwise

Type
  Promise.<string>

#### getParentNoteIds() → {Array.<string>}

Source:
  - entities/note_short.js, line 62

##### Returns:

Type
  Array.<string>

#### (async) getParentNotes() → {Promise.<Array.<NoteShort>>}

Source:
  - entities/note_short.js, line 67

##### Returns:

Type
  Promise.<Array.<NoteShort>>

#### (async) getRelation(name) → {Promise.<Attribute>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | relation name

Source:
  - entities/note_short.js, line 183

##### Returns:

relation if it exists, null otherwise

Type
  Promise.<Attribute>

#### (async) getRelationDefinitions(nameopt) → {Promise.<Array.<Attribute>>}

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | string | <optional> | relation name to filter

Source:
  - entities/note_short.js, line 126

##### Returns:

all note's relation definitions including inherited ones

Type
  Promise.<Array.<Attribute>>

#### (async) getRelations(nameopt) → {Promise.<Array.<Attribute>>}

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | string | <optional> | relation name to filter

Source:
  - entities/note_short.js, line 118

##### Returns:

all note's relations (attributes with type relation), including inherited ones

Type
  Promise.<Array.<Attribute>>

#### (async) getRelationTarget(name) → {Promise.<Note>|null}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string |

Source:
  - entities/note_short.js, line 201

##### Returns:

target note of the relation or null (if target is empty or note was not found)

Type
  Promise.<Note> | null

#### (async) getRelationValue(name) → {Promise.<string>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | relation name

Source:
  - entities/note_short.js, line 195

##### Returns:

relation value if relation exists, null otherwise

Type
  Promise.<string>

#### (async) hasAttribute(type, name) → {Promise.<boolean>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` | string | attribute type (label, relation, etc.)
`name` | string | attribute name

Source:
  - entities/note_short.js, line 135

##### Returns:

true if note has an attribute with given type and name (including inherited)

Type
  Promise.<boolean>

#### hasChildren() → {boolean}

Source:
  - entities/note_short.js, line 44

##### Returns:

Type
  boolean

#### (async) hasLabel(name) → {Promise.<boolean>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | label name

Source:
  - entities/note_short.js, line 165

##### Returns:

true if label exists (including inherited)

Type
  Promise.<boolean>

#### (async) hasRelation(name) → {Promise.<boolean>}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | relation name

Source:
  - entities/note_short.js, line 171

##### Returns:

true if relation exists (including inherited)

Type
  Promise.<boolean>

#### invalidateAttributeCache()

Clear note's attributes cache to force fresh reload for next attribute request. Cache is note instance scoped.

Source:
  - entities/note_short.js, line 211

#### isJson() → {boolean}

Source:
  - entities/note_short.js, line 31

##### Returns:

Type
  boolean