new FNote(froca, row)
Parameters:
| Name | Type | Description | 
|---|---|---|
| froca | Froca | |
| row | Object.<string, Object> | 
Members
attributes :Array.<string>
Type:
- Array.<string>
childToBranch :Object.<string, string>
Type:
- Object.<string, string>
children :Array.<string>
Type:
- Array.<string>
isProtected :boolean
Type:
- boolean
mime :string
    content-type, e.g. "application/json"
    Type:
- string
noteId :string
Type:
- string
parentToBranch :Object.<string, string>
Type:
- Object.<string, string>
parents :Array.<string>
Type:
- Array.<string>
targetRelations :Array.<string>
Type:
- Array.<string>
title :string
Type:
- string
type :string
    one of 'text', 'code', 'file' or 'render'
    Type:
- string
Methods
getAttribute(type, name) → {FAttribute}
Parameters:
| Name | Type | Description | 
|---|---|---|
| type | string | attribute type (label, relation, etc.) | 
| name | string | attribute name | 
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
- FAttribute
getAttributeValue(type, name) → {string}
Parameters:
| Name | Type | Description | 
|---|---|---|
| type | string | attribute type (label, relation, etc.) | 
| name | string | attribute name | 
Returns:
    attribute value of given type and name or null if no such attribute exists.
- Type
- string
getAttributes(typeopt, nameopt) → {Array.<FAttribute>}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | string | <optional> | (optional) attribute type to filter | 
| name | string | <optional> | (optional) attribute name to filter | 
Returns:
    all note's attributes, including inherited ones
- Type
- Array.<FAttribute>
getBranchIds() → {Array.<string>}
- Deprecated:
- use getParentBranchIds() instead
 
Returns:
- Type
- Array.<string>
getBranches() → {Array.<FBranch>}
- Deprecated:
- use getParentBranches() instead
 
Returns:
- Type
- Array.<FBranch>
getChildBranches() → {Array.<FBranch>}
Returns:
- Type
- Array.<FBranch>
getChildNoteIds() → {Array.<string>}
Returns:
- Type
- Array.<string>
(async) getChildNotes() → {Promise.<Array.<FNote>>}
Returns:
- Type
- Promise.<Array.<FNote>>
getLabel(name) → {FAttribute}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | label name | 
Returns:
    label if it exists, null otherwise
- Type
- FAttribute
getLabelValue(name) → {string}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | label name | 
Returns:
    label value if label exists, null otherwise
- Type
- string
getLabels(nameopt) → {Array.<FAttribute>}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| name | string | <optional> | label name to filter | 
Returns:
    all note's labels (attributes with type label), including inherited ones
- Type
- Array.<FAttribute>
(async) getNoteComplement() → {Promise.<FNoteComplement>}
    Return note complement which is most importantly note's content
Returns:
- Type
- Promise.<FNoteComplement>
getOwnedAttribute(type, name) → {FAttribute}
Parameters:
| Name | Type | Description | 
|---|---|---|
| type | string | attribute type (label, relation, etc.) | 
| name | string | attribute name | 
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
- FAttribute
getOwnedAttributeValue(type, name) → {string}
Parameters:
| Name | Type | Description | 
|---|---|---|
| type | string | attribute type (label, relation, etc.) | 
| name | string | attribute name | 
Returns:
    attribute value of given type and name or null if no such attribute exists.
- Type
- string
getOwnedAttributes(typeopt, nameopt) → {Array.<FAttribute>}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | string | <optional> | (optional) attribute type to filter | 
| name | string | <optional> | (optional) attribute name to filter | 
Returns:
    all note's attributes, including inherited ones
- Type
- Array.<FAttribute>
getOwnedLabel(name) → {FAttribute}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | label name | 
Returns:
    label if it exists, null otherwise
- Type
- FAttribute
getOwnedLabelValue(name) → {string}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | label name | 
Returns:
    label value if label exists, null otherwise
- Type
- string
getOwnedLabels(nameopt) → {Array.<FAttribute>}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| name | string | <optional> | label name to filter | 
Returns:
    all note's labels (attributes with type label), including inherited ones
- Type
- Array.<FAttribute>
getOwnedRelation(name) → {FAttribute}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | relation name | 
Returns:
    relation if it exists, null otherwise
- Type
- FAttribute
getOwnedRelationValue(name) → {string}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | relation name | 
Returns:
    relation value if relation exists, null otherwise
- Type
- string
getOwnedRelations(nameopt) → {Array.<FAttribute>}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| name | string | <optional> | relation name to filter | 
Returns:
    all note's relations (attributes with type relation), including inherited ones
- Type
- Array.<FAttribute>
getParentBranchIds() → {Array.<string>}
Returns:
- Type
- Array.<string>
getParentBranches() → {Array.<FBranch>}
Returns:
- Type
- Array.<FBranch>
getParentNoteIds() → {Array.<string>}
Returns:
- Type
- Array.<string>
getParentNotes() → {Array.<FNote>}
Returns:
- Type
- Array.<FNote>
getRelation(name) → {FAttribute}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | relation name | 
Returns:
    relation if it exists, null otherwise
- Type
- FAttribute
(async) getRelationTarget(name) → {Promise.<FNote>|null}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | 
Returns:
    target note of the relation or null (if target is empty or note was not found)
- Type
- Promise.<FNote> | null
(async) getRelationTargets(nameopt) → {Promise.<Array.<FNote>>}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| name | string | <optional> | relation name to filter | 
Returns:
- Type
- Promise.<Array.<FNote>>
getRelationValue(name) → {string}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | relation name | 
Returns:
    relation value if relation exists, null otherwise
- Type
- string
getRelations(nameopt) → {Array.<FAttribute>}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| name | string | <optional> | relation name to filter | 
Returns:
    all note's relations (attributes with type relation), including inherited ones
- Type
- Array.<FAttribute>
getScriptEnv() → {string|null}
Returns:
    JS script environment - either "frontend" or "backend"
- Type
- string | null
(async) getTargetRelationSourceNotes() → {Array.<FNote>}
    Get relations which target this note
Returns:
- Type
- Array.<FNote>
getTargetRelations() → {Array.<FAttribute>}
    Get relations which target this note
Returns:
- Type
- Array.<FAttribute>
getTemplateNotes() → {Array.<FNote>}
Returns:
- Type
- Array.<FNote>
hasAttribute(type, name) → {boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
| type | string | attribute type (label, relation, etc.) | 
| name | string | attribute name | 
Returns:
    true if note has an attribute with given type and name (including inherited)
- Type
- boolean
hasChildren() → {boolean}
Returns:
- Type
- boolean
hasLabel(name) → {boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | label name | 
Returns:
    true if label exists (including inherited)
- Type
- boolean
hasOwnedAttribute(type, name) → {boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
| type | string | attribute type (label, relation, etc.) | 
| name | string | attribute name | 
Returns:
    true if note has an attribute with given type and name (including inherited)
- Type
- boolean
hasOwnedLabel(name) → {boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | label name | 
Returns:
    true if label exists (excluding inherited)
- Type
- boolean
hasOwnedRelation(name) → {boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | relation name | 
Returns:
    true if relation exists (excluding inherited)
- Type
- boolean
hasRelation(name) → {boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | relation name | 
Returns:
    true if relation exists (including inherited)
- Type
- boolean
invalidateAttributeCache()
- Deprecated:
- NOOP
 
isHtml() → {boolean}
Returns:
    true if this note is HTML
- Type
- boolean
isJavaScript() → {boolean}
Returns:
    true if this note is JavaScript (code or attachment)
- Type
- boolean
isJson() → {boolean}
Returns:
- Type
- boolean