<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Note</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: Note</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>Note<span class="signature">()</span><span class="type-signature"></span></h2> <div class="class-description">Trilium's main entity which can represent text note, image, code note, file attachment etc.</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Note"><span class="type-signature"></span>new Note<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line23">line 23</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Extends</h3> <ul> <li><a href="AbstractEntity.html">AbstractEntity</a></li> </ul> <h3 class="subsection-title">Members</h3> <h4 class="name" id="children"><span class="type-signature"></span>children<span class="type-signature"> :Array.<<a href="Note.html">Note</a>></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<<a href="Note.html">Note</a>></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line94">line 94</a> </li></ul></dd> </dl> <h4 class="name" id="contentSize"><span class="type-signature"></span>contentSize<span class="type-signature"> :int|null</span></h4> <div class="description"> size of the content in bytes </div> <h5>Type:</h5> <ul> <li> <span class="param-type">int</span> | <span class="param-type">null</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line120">line 120</a> </li></ul></dd> </dl> <h4 class="name" id="dateCreated"><span class="type-signature"></span>dateCreated<span class="type-signature"> :string</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line67">line 67</a> </li></ul></dd> </dl> <h4 class="name" id="dateModified"><span class="type-signature"></span>dateModified<span class="type-signature"> :string</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line69">line 69</a> </li></ul></dd> </dl> <h4 class="name" id="flatTextCache"><span class="type-signature"></span>flatTextCache<span class="type-signature"> :string|null</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> | <span class="param-type">null</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line83">line 83</a> </li></ul></dd> </dl> <h4 class="name" id="isDecrypted"><span class="type-signature"></span>isDecrypted<span class="type-signature"> :boolean</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">boolean</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line78">line 78</a> </li></ul></dd> </dl> <h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"> :boolean</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">boolean</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line61">line 61</a> </li></ul></dd> </dl> <h4 class="name" id="mime"><span class="type-signature"></span>mime<span class="type-signature"> :string</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line65">line 65</a> </li></ul></dd> </dl> <h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line57">line 57</a> </li></ul></dd> </dl> <h4 class="name" id="noteSize"><span class="type-signature"></span>noteSize<span class="type-signature"> :int|null</span></h4> <div class="description"> size of the content and note revision contents in bytes </div> <h5>Type:</h5> <ul> <li> <span class="param-type">int</span> | <span class="param-type">null</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line125">line 125</a> </li></ul></dd> </dl> <h4 class="name" id="ownedAttributes"><span class="type-signature"></span>ownedAttributes<span class="type-signature"> :Array.<<a href="Attribute.html">Attribute</a>></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line96">line 96</a> </li></ul></dd> </dl> <h4 class="name" id="parentBranches"><span class="type-signature"></span>parentBranches<span class="type-signature"> :Array.<<a href="Branch.html">Branch</a>></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<<a href="Branch.html">Branch</a>></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line90">line 90</a> </li></ul></dd> </dl> <h4 class="name" id="parents"><span class="type-signature"></span>parents<span class="type-signature"> :Array.<<a href="Note.html">Note</a>></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<<a href="Note.html">Note</a>></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line92">line 92</a> </li></ul></dd> </dl> <h4 class="name" id="revisionCount"><span class="type-signature"></span>revisionCount<span class="type-signature"> :int|null</span></h4> <div class="description"> number of note revisions for this note </div> <h5>Type:</h5> <ul> <li> <span class="param-type">int</span> | <span class="param-type">null</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line130">line 130</a> </li></ul></dd> </dl> <h4 class="name" id="targetRelations"><span class="type-signature"></span>targetRelations<span class="type-signature"> :Array.<<a href="Attribute.html">Attribute</a>></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line106">line 106</a> </li></ul></dd> </dl> <h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"> :string</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line59">line 59</a> </li></ul></dd> </dl> <h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line63">line 63</a> </li></ul></dd> </dl> <h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line71">line 71</a> </li></ul></dd> </dl> <h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line73">line 73</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="__getInheritableAttributes"><span class="type-signature"></span>__getInheritableAttributes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line407">line 407</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </dd> </dl> <h4 class="name" id="addAttribute"><span class="type-signature"></span>addAttribute<span class="signature">()</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1025">line 1025</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Attribute.html">Attribute</a></span> </dd> </dl> <h4 class="name" id="deleteNote"><span class="type-signature"></span>deleteNote<span class="signature">(deleteId<span class="signature-attributes">opt</span>, taskContext<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> (Soft) delete a note and all its descendants. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>deleteId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">optional delete identified</td> </tr> <tr> <td class="name"><code>taskContext</code></td> <td class="type"> <span class="param-type">TaskContext</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1137">line 1137</a> </li></ul></dd> </dl> <h4 class="name" id="getAllNotePaths"><span class="type-signature"></span>getAllNotePaths<span class="signature">()</span><span class="type-signature"> → {Array.<Array.<string>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line947">line 947</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> - array of notePaths (each represented by array of noteIds constituting the particular note path) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<Array.<string>></span> </dd> </dl> <h4 class="name" id="getAncestors"><span class="type-signature"></span>getAncestors<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line867">line 867</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Note.html">Note</a>></span> </dd> </dl> <h4 class="name" id="getAttribute"><span class="type-signature"></span>getAttribute<span class="signature">(type, name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">attribute type (label, relation, etc.)</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">attribute name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line525">line 525</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> 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. </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Attribute.html">Attribute</a></span> </dd> </dl> <h4 class="name" id="getAttributes"><span class="type-signature"></span>getAttributes<span class="signature">(type<span class="signature-attributes">opt</span>, name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">(optional) attribute type to filter</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">(optional) attribute name to filter</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line338">line 338</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> all note's attributes, including inherited ones </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </dd> </dl> <h4 class="name" id="getAttributeValue"><span class="type-signature"></span>getAttributeValue<span class="signature">(type, name)</span><span class="type-signature"> → {string|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">attribute type (label, relation, etc.)</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">attribute name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line536">line 536</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> attribute value of given type and name or null if no such attribute exists. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getBranches"><span class="type-signature"></span>getBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4> <dl class="details"> <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use getParentBranches() instead</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line152">line 152</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Branch.html">Branch</a>></span> </dd> </dl> <h4 class="name" id="getChildBranches"><span class="type-signature"></span>getChildBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line172">line 172</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Branch.html">Branch</a>></span> </dd> </dl> <h4 class="name" id="getChildNotes"><span class="type-signature"></span>getChildNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line162">line 162</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Note.html">Note</a>></span> </dd> </dl> <h4 class="name" id="getContent"><span class="type-signature"></span>getContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line186">line 186</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id="getContentMetadata"><span class="type-signature"></span>getContentMetadata<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line220">line 220</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> <h4 class="name" id="getFlatText"><span class="type-signature"></span>getFlatText<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> <div class="description"> This is used for: - fast searching - note similarity evaluation </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line662">line 662</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> - returns flattened textual representation of note, prefixes and attributes </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> </dd> </dl> <h4 class="name" id="getJsonContent"><span class="type-signature"></span>getJsonContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line231">line 231</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id="getLabel"><span class="type-signature"></span>getLabel<span class="signature">(name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">label name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line467">line 467</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> label if it exists, null otherwise </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Attribute.html">Attribute</a></span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getLabels"><span class="type-signature"></span>getLabels<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">label name to filter</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line557">line 557</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> all note's labels (attributes with type label), including inherited ones </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </dd> </dl> <h4 class="name" id="getLabelValue"><span class="type-signature"></span>getLabelValue<span class="signature">(name)</span><span class="type-signature"> → {string|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">label name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line491">line 491</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> label value if label exists, null otherwise </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getLabelValues"><span class="type-signature"></span>getLabelValues<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<string>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">label name to filter</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line565">line 565</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> all note's label values, including inherited ones </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<string></span> </dd> </dl> <h4 class="name" id="getOwnedAttribute"><span class="type-signature"></span>getOwnedAttribute<span class="signature">()</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line631">line 631</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> attribute belonging to this specific note (excludes inherited attributes) This method can be significantly faster than the getAttribute() </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Attribute.html">Attribute</a></span> </dd> </dl> <h4 class="name" id="getOwnedAttributes"><span class="type-signature"></span>getOwnedAttributes<span class="signature">(type<span class="signature-attributes">opt</span>, name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">(optional) attribute type to filter</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">(optional) attribute name to filter</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line606">line 606</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> note's "owned" attributes - excluding inherited ones </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </dd> </dl> <h4 class="name" id="getOwnedAttributeValue"><span class="type-signature"></span>getOwnedAttributeValue<span class="signature">(type, name)</span><span class="type-signature"> → {string|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">attribute type (label, relation, etc.)</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">attribute name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line547">line 547</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> attribute value of given type and name or null if no such attribute exists. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getOwnedLabel"><span class="type-signature"></span>getOwnedLabel<span class="signature">(name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">label name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line473">line 473</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> label if it exists, null otherwise </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Attribute.html">Attribute</a></span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getOwnedLabels"><span class="type-signature"></span>getOwnedLabels<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">label name to filter</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line573">line 573</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> all note's labels (attributes with type label), excluding inherited ones </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </dd> </dl> <h4 class="name" id="getOwnedLabelValue"><span class="type-signature"></span>getOwnedLabelValue<span class="signature">(name)</span><span class="type-signature"> → {string|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">label name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line497">line 497</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> label value if label exists, null otherwise </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getOwnedLabelValues"><span class="type-signature"></span>getOwnedLabelValues<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<string>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">label name to filter</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line581">line 581</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> all note's label values, excluding inherited ones </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<string></span> </dd> </dl> <h4 class="name" id="getOwnedRelation"><span class="type-signature"></span>getOwnedRelation<span class="signature">(name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">relation name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line485">line 485</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> relation if it exists, null otherwise </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Attribute.html">Attribute</a></span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getOwnedRelations"><span class="type-signature"></span>getOwnedRelations<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">relation name to filter</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line597">line 597</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> all note's relations (attributes with type relation), excluding inherited ones </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </dd> </dl> <h4 class="name" id="getOwnedRelationValue"><span class="type-signature"></span>getOwnedRelationValue<span class="signature">(name)</span><span class="type-signature"> → {string|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">relation name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line509">line 509</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> relation value if relation exists, null otherwise </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getParentBranches"><span class="type-signature"></span>getParentBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line144">line 144</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Branch.html">Branch</a>></span> </dd> </dl> <h4 class="name" id="getParentNotes"><span class="type-signature"></span>getParentNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line157">line 157</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Note.html">Note</a>></span> </dd> </dl> <h4 class="name" id="getRelation"><span class="type-signature"></span>getRelation<span class="signature">(name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">relation name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line479">line 479</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> relation if it exists, null otherwise </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Attribute.html">Attribute</a></span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getRelations"><span class="type-signature"></span>getRelations<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">relation name to filter</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line589">line 589</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> all note's relations (attributes with type relation), including inherited ones </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span> </dd> </dl> <h4 class="name" id="getRelationValue"><span class="type-signature"></span>getRelationValue<span class="signature">(name)</span><span class="type-signature"> → {string|null}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">relation name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line503">line 503</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> relation value if relation exists, null otherwise </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getScriptEnv"><span class="type-signature"></span>getScriptEnv<span class="signature">()</span><span class="type-signature"> → {string|null}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line317">line 317</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> JS script environment - either "frontend" or "backend" </div> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="getSubtreeNoteIds"><span class="type-signature"></span>getSubtreeNoteIds<span class="signature">()</span><span class="type-signature"> → {Array.<String>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line810">line 810</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<String></span> </dd> </dl> <h4 class="name" id="getSubtreeNotes"><span class="type-signature"></span>getSubtreeNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line789">line 789</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Note.html">Note</a>></span> </dd> </dl> <h4 class="name" id="getSubtreeNotesIncludingTemplated"><span class="type-signature"></span>getSubtreeNotesIncludingTemplated<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line758">line 758</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Note.html">Note</a>></span> </dd> </dl> <h4 class="name" id="getTemplatedNotes"><span class="type-signature"></span>getTemplatedNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line909">line 909</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> - returns only notes which are templated, does not include their subtrees in effect returns notes which are influenced by note's non-inheritable attributes </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.<<a href="Note.html">Note</a>></span> </dd> </dl> <h4 class="name" id="hasAncestor"><span class="type-signature"></span>hasAncestor<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line893">line 893</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="hasChildren"><span class="type-signature"></span>hasChildren<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line167">line 167</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="hasLabel"><span class="type-signature"></span>hasLabel<span class="signature">(name)</span><span class="type-signature"> → {boolean}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">label name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line443">line 443</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if label exists (including inherited) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="hasOwnedAttribute"><span class="type-signature"></span>hasOwnedAttribute<span class="signature">(type, name)</span><span class="type-signature"> → {boolean}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">attribute type (label, relation, etc.)</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">attribute name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line516">line 516</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if note has an attribute with given type and name (excluding inherited) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="hasOwnedLabel"><span class="type-signature"></span>hasOwnedLabel<span class="signature">(name)</span><span class="type-signature"> → {boolean}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">label name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line449">line 449</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if label exists (excluding inherited) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="hasOwnedRelation"><span class="type-signature"></span>hasOwnedRelation<span class="signature">(name)</span><span class="type-signature"> → {boolean}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">relation name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line461">line 461</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if relation exists (excluding inherited) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="hasRelation"><span class="type-signature"></span>hasRelation<span class="signature">(name)</span><span class="type-signature"> → {boolean}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">relation name</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line455">line 455</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if relation exists (including inherited) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isDescendantOfNote"><span class="type-signature"></span>isDescendantOfNote<span class="signature">(ancestorNoteId)</span><span class="type-signature"> → {boolean}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>ancestorNoteId</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line968">line 968</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> - true if ancestorNoteId occurs in at least one of the note's paths </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isHtml"><span class="type-signature"></span>isHtml<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line306">line 306</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if this note is HTML </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isJavaScript"><span class="type-signature"></span>isJavaScript<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line298">line 298</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if this note is JavaScript (code or attachment) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isJson"><span class="type-signature"></span>isJson<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line293">line 293</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if this note is of application/json content type </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isRoot"><span class="type-signature"></span>isRoot<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line288">line 288</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if this note is the root of the note tree. Root note has "root" noteId </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isStringNote"><span class="type-signature"></span>isStringNote<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line312">line 312</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> true if the note has string content (not binary) </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="markAsDeleted"><span class="type-signature"></span>markAsDeleted<span class="signature">(deleteId<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Mark the entity as (soft) deleted. It will be completely erased later. This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>deleteId</code></td> <td class="type"> </td> <td class="attributes"> <optional><br> </td> <td class="default"> null </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a> </li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a> </li></ul></dd> </dl> <h4 class="name" id="removeAttribute"><span class="type-signature"></span>removeAttribute<span class="signature">(type, name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Removes given attribute name-value pair if it exists. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">attribute type (label, relation, etc.)</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">attribute name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">attribute value (optional)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1012">line 1012</a> </li></ul></dd> </dl> <h4 class="name" id="removeLabel"><span class="type-signature"></span>removeLabel<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Remove label name-value pair, if it exists. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">label name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">label value</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1103">line 1103</a> </li></ul></dd> </dl> <h4 class="name" id="removeRelation"><span class="type-signature"></span>removeRelation<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Remove relation name-value pair, if it exists. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">relation name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">relation value (noteId)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1111">line 1111</a> </li></ul></dd> </dl> <h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4> <div class="description"> Saves entity - executes SQL, but doesn't commit the transaction on its own </div> <dl class="details"> <dt class="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a href="AbstractEntity.html#save">AbstractEntity#save</a> </li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span> </dd> </dl> <h4 class="name" id="saveNoteRevision"><span class="type-signature"></span>saveNoteRevision<span class="signature">()</span><span class="type-signature"> → {<a href="NoteRevision.html">NoteRevision</a>|null}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1172">line 1172</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="NoteRevision.html">NoteRevision</a></span> | <span class="param-type">null</span> </dd> </dl> <h4 class="name" id="setAttribute"><span class="type-signature"></span>setAttribute<span class="signature">(type, name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Update's given attribute's value or creates it if it doesn't exist </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">attribute type (label, relation, etc.)</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">attribute name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">attribute value (optional)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line981">line 981</a> </li></ul></dd> </dl> <h4 class="name" id="setLabel"><span class="type-signature"></span>setLabel<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Update's given label's value or creates it if it doesn't exist </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">label name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">label value</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1087">line 1087</a> </li></ul></dd> </dl> <h4 class="name" id="setRelation"><span class="type-signature"></span>setRelation<span class="signature">(name, value)</span><span class="type-signature"></span></h4> <div class="description"> Update's given relation's value or creates it if it doesn't exist </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">relation name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">relation value (noteId)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1095">line 1095</a> </li></ul></dd> </dl> <h4 class="name" id="toggleAttribute"><span class="type-signature"></span>toggleAttribute<span class="signature">(type, enabled, name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Based on enabled, attribute is either set or removed. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">attribute type ('relation', 'label' etc.)</td> </tr> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> </td> <td class="description last">toggle On or Off</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">attribute name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">attribute value (optional)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1054">line 1054</a> </li></ul></dd> </dl> <h4 class="name" id="toggleLabel"><span class="type-signature"></span>toggleLabel<span class="signature">(enabled, name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Based on enabled, label is either set or removed. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> </td> <td class="description last">toggle On or Off</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">label name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">label value (optional)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1070">line 1070</a> </li></ul></dd> </dl> <h4 class="name" id="toggleRelation"><span class="type-signature"></span>toggleRelation<span class="signature">(enabled, name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Based on enabled, relation is either set or removed. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>enabled</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> </td> <td class="description last">toggle On or Off</td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">relation name</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">relation value (noteId)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1079">line 1079</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>