trilium/docs/frontend_api/NoteShort.html

3835 lines
38 KiB
HTML
Raw Normal View History

2018-08-30 02:44:35 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: NoteShort</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: NoteShort</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>NoteShort<span class="signature">()</span><span class="type-signature"></span></h2>
<div class="class-description">This note's representation is used in note tree and is kept in TreeCache.
Its notable omission is the note content.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="NoteShort"><span class="type-signature"></span>new NoteShort<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>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line12">line 12</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="archived"><span class="type-signature"></span>archived<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line26">line 26</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line20">line 20</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h4 class="name" id="mime"><span class="type-signature"></span>mime<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line24">line 24</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line16">line 16</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line18">line 18</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line22">line 22</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
2018-12-23 05:28:49 +08:00
<h4 class="name" id="getAttribute"><span class="type-signature">(async) </span>getAttribute<span class="signature">(type, name)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="Attribute.html">Attribute</a>>}</span></h4>
<h5>Parameters:</h5>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<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>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<tr>
<td class="name"><code>name</code></td>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<td class="type">
<span class="param-type">string</span>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</td>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<td class="description last">attribute name</td>
</tr>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</tbody>
</table>
2018-08-30 02:44:35 +08:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line144">line 144</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
2018-12-23 05:28:49 +08:00
<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>
2018-08-30 02:44:35 +08:00
<dl>
<dt>
Type
</dt>
<dd>
2018-12-23 05:28:49 +08:00
<span class="param-type">Promise.&lt;<a href="Attribute.html">Attribute</a>></span>
2018-08-30 02:44:35 +08:00
</dd>
</dl>
2018-12-23 05:28:49 +08:00
<h4 class="name" id="getAttributes"><span class="type-signature">(async) </span>getAttributes<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>>}</span></h4>
<h5>Parameters:</h5>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</td>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<td class="attributes">
&lt;optional><br>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</td>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<td class="description last">attribute name to filter</td>
</tr>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</tbody>
</table>
2018-08-30 02:44:35 +08:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line85">line 85</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
2018-12-23 05:28:49 +08:00
<span class="param-type">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
2018-08-30 02:44:35 +08:00
</dd>
</dl>
2018-12-23 05:28:49 +08:00
<h4 class="name" id="getAttributeValue"><span class="type-signature">(async) </span>getAttributeValue<span class="signature">(type, name)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</span></h4>
<h5>Parameters:</h5>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<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>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<tr>
<td class="name"><code>name</code></td>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<td class="type">
<span class="param-type">string</span>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</td>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<td class="description last">attribute name</td>
</tr>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</tbody>
</table>
2018-08-30 02:44:35 +08:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line155">line 155</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
2018-12-23 05:28:49 +08:00
<div class="param-desc">
attribute value of given type and name or null if no such attribute exists.
</div>
2018-08-30 02:44:35 +08:00
<dl>
<dt>
Type
</dt>
<dd>
2018-12-23 05:28:49 +08:00
<span class="param-type">Promise.&lt;string></span>
2018-08-30 02:44:35 +08:00
</dd>
</dl>
2018-12-23 05:28:49 +08:00
<h4 class="name" id="getBranches"><span class="type-signature">(async) </span>getBranches<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Branch.html">Branch</a>>>}</span></h4>
2018-08-30 02:44:35 +08:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line36">line 36</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
2018-12-23 05:28:49 +08:00
<span class="param-type">Promise.&lt;Array.&lt;<a href="Branch.html">Branch</a>>></span>
2018-08-30 02:44:35 +08:00
</dd>
</dl>
2018-12-23 05:28:49 +08:00
<h4 class="name" id="getChildBranches"><span class="type-signature">(async) </span>getChildBranches<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Branch.html">Branch</a>>>}</span></h4>
2018-08-30 02:44:35 +08:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line50">line 50</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
2018-12-23 05:28:49 +08:00
<span class="param-type">Promise.&lt;Array.&lt;<a href="Branch.html">Branch</a>>></span>
2018-08-30 02:44:35 +08:00
</dd>
</dl>
2018-12-23 05:28:49 +08:00
<h4 class="name" id="getChildNoteIds"><span class="type-signature"></span>getChildNoteIds<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;string>}</span></h4>
2018-08-30 02:44:35 +08:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line72">line 72</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
2018-12-23 05:28:49 +08:00
<span class="param-type">Array.&lt;string></span>
2018-08-30 02:44:35 +08:00
</dd>
</dl>
2018-12-23 05:28:49 +08:00
<h4 class="name" id="getChildNotes"><span class="type-signature">(async) </span>getChildNotes<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>>}</span></h4>
2018-08-30 02:44:35 +08:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line77">line 77</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
2018-12-23 05:28:49 +08:00
<span class="param-type">Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>></span>
2018-08-30 02:44:35 +08:00
</dd>
</dl>
2018-12-23 05:28:49 +08:00
<h4 class="name" id="getLabel"><span class="type-signature">(async) </span>getLabel<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="Attribute.html">Attribute</a>>}</span></h4>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<h5>Parameters:</h5>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<tr>
<td class="name"><code>name</code></td>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<td class="type">
<span class="param-type">string</span>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</td>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
<td class="description last">label name</td>
</tr>
2018-08-30 02:44:35 +08:00
2018-12-23 05:28:49 +08:00
</tbody>
</table>
2018-08-30 02:44:35 +08:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2018-12-23 05:28:49 +08:00
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line177">line 177</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">Promise.&lt;<a href="Attribute.html">Attribute</a>></span>
</dd>
</dl>
<h4 class="name" id="getLabelDefinitions"><span class="type-signature">(async) </span>getLabelDefinitions<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<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">
&lt;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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line110">line 110</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
all note's label definitions, including inherited ones
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
</dd>
</dl>
<h4 class="name" id="getLabels"><span class="type-signature">(async) </span>getLabels<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<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">
&lt;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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line102">line 102</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">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
</dd>
</dl>
<h4 class="name" id="getLabelValue"><span class="type-signature">(async) </span>getLabelValue<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line189">line 189</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">Promise.&lt;string></span>
</dd>
</dl>
<h4 class="name" id="getParentNoteIds"><span class="type-signature"></span>getParentNoteIds<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;string>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line62">line 62</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;string></span>
</dd>
</dl>
<h4 class="name" id="getParentNotes"><span class="type-signature">(async) </span>getParentNotes<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line67">line 67</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>></span>
</dd>
</dl>
<h4 class="name" id="getRelation"><span class="type-signature">(async) </span>getRelation<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;<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>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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line183">line 183</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">Promise.&lt;<a href="Attribute.html">Attribute</a>></span>
</dd>
</dl>
<h4 class="name" id="getRelationDefinitions"><span class="type-signature">(async) </span>getRelationDefinitions<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<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">
&lt;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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line126">line 126</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
all note's relation definitions including inherited ones
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
</dd>
</dl>
<h4 class="name" id="getRelations"><span class="type-signature">(async) </span>getRelations<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<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">
&lt;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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line118">line 118</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">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
</dd>
</dl>
<h4 class="name" id="getRelationTarget"><span class="type-signature">(async) </span>getRelationTarget<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;Note>|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"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line201">line 201</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
target note of the relation or null (if target is empty or note was not found)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;Note></span>
|
<span class="param-type">null</span>
</dd>
</dl>
<h4 class="name" id="getRelationValue"><span class="type-signature">(async) </span>getRelationValue<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line195">line 195</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">Promise.&lt;string></span>
</dd>
</dl>
<h4 class="name" id="hasAttribute"><span class="type-signature">(async) </span>hasAttribute<span class="signature">(type, name)</span><span class="type-signature"> &rarr; {Promise.&lt;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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line135">line 135</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
true if note has an attribute with given type and name (including inherited)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;boolean></span>
</dd>
</dl>
<h4 class="name" id="hasChildren"><span class="type-signature"></span>hasChildren<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line44">line 44</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">(async) </span>hasLabel<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line165">line 165</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">Promise.&lt;boolean></span>
</dd>
</dl>
<h4 class="name" id="hasRelation"><span class="type-signature">(async) </span>hasRelation<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;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="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line171">line 171</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">Promise.&lt;boolean></span>
</dd>
</dl>
<h4 class="name" id="invalidateAttributeCache"><span class="type-signature"></span>invalidateAttributeCache<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Clear note's attributes cache to force fresh reload for next attribute request.
Cache is note instance scoped.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line211">line 211</a>
</li></ul></dd>
</dl>
<h4 class="name" id="isJson"><span class="type-signature"></span>isJson<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line31">line 31</a>
2018-08-30 02:44:35 +08:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
2018-08-30 02:44:35 +08:00
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>