UNPKG

ancient-graph-spreading

Version:

Automatic maintenance spreading of graph according other graphs.

1,311 lines (339 loc) 20.3 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>SpreadGraph - Documentation</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="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="GraphSpreading.html">GraphSpreading</a><ul class='methods'><li data-type='method'><a href="GraphSpreading.html#_getFromFields">_getFromFields</a></li><li data-type='method'><a href="GraphSpreading.html#_getToFields">_getToFields</a></li><li data-type='method'><a href="GraphSpreading.html#_spreadByPathLink">_spreadByPathLink</a></li><li data-type='method'><a href="GraphSpreading.html#_spreadFromSpreadLinkByPathGraph">_spreadFromSpreadLinkByPathGraph</a></li><li data-type='method'><a href="GraphSpreading.html#_spreadFromSpreadLinkByPathLink">_spreadFromSpreadLinkByPathLink</a></li><li data-type='method'><a href="GraphSpreading.html#_wrapPathQuery">_wrapPathQuery</a></li><li data-type='method'><a href="GraphSpreading.html#_wrapSpreadQuery">_wrapSpreadQuery</a></li><li data-type='method'><a href="GraphSpreading.html#addPathGraph">addPathGraph</a></li><li data-type='method'><a href="GraphSpreading.html#each">each</a></li><li data-type='method'><a href="GraphSpreading.html#spreadByPathLink">spreadByPathLink</a></li><li data-type='method'><a href="GraphSpreading.html#spreadFromSpreadLink">spreadFromSpreadLink</a></li><li data-type='method'><a href="GraphSpreading.html#spreadFromSpreadLinkByPathGraph">spreadFromSpreadLinkByPathGraph</a></li><li data-type='method'><a href="GraphSpreading.html#spreadFromSpreadLinkByPathLink">spreadFromSpreadLinkByPathLink</a></li><li data-type='method'><a href="GraphSpreading.html#spreadNewSpreadLink">spreadNewSpreadLink</a></li><li data-type='method'><a href="GraphSpreading.html#spreadTo">spreadTo</a></li><li data-type='method'><a href="GraphSpreading.html#unspread">unspread</a></li><li data-type='method'><a href="GraphSpreading.html#unspreadByPathId">unspreadByPathId</a></li><li data-type='method'><a href="GraphSpreading.html#unspreadFromRemovedSpreadLinkByPrevId">unspreadFromRemovedSpreadLinkByPrevId</a></li></ul></li><li><a href="PathGraph.html">PathGraph</a></li><li><a href="QueueSpreading.html">QueueSpreading</a><ul class='methods'><li data-type='method'><a href="QueueSpreading.html#_getGraph">_getGraph</a></li><li data-type='method'><a href="QueueSpreading.html#removeFromLaunched">removeFromLaunched</a></li><li data-type='method'><a href="QueueSpreading.html#spreadByPath">spreadByPath</a></li><li data-type='method'><a href="QueueSpreading.html#spreadBySpread">spreadBySpread</a></li><li data-type='method'><a href="QueueSpreading.html#spreadBySpreader">spreadBySpreader</a></li><li data-type='method'><a href="QueueSpreading.html#unspreadByPath">unspreadByPath</a></li><li data-type='method'><a href="QueueSpreading.html#unspreadBySpread">unspreadBySpread</a></li><li data-type='method'><a href="QueueSpreading.html#unspreadBySpreader">unspreadBySpreader</a></li></ul></li><li><a href="SpreaderGraph.html">SpreaderGraph</a></li><li><a href="SpreadGraph.html">SpreadGraph</a><ul class='methods'><li data-type='method'><a href="SpreadGraph.html#_spreadingHandler">_spreadingHandler</a></li><li data-type='method'><a href="SpreadGraph.html#_unspreadingHandler">_unspreadingHandler</a></li><li data-type='method'><a href="SpreadGraph.html#insert">insert</a></li><li data-type='method'><a href="SpreadGraph.html#remove">remove</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#factoryLaunchedGraph">factoryLaunchedGraph</a></li><li><a href="global.html#factoryPathGraph">factoryPathGraph</a></li><li><a href="global.html#factoryRespreadGraph">factoryRespreadGraph</a></li><li><a href="global.html#factorySpreaderGraph">factorySpreaderGraph</a></li><li><a href="global.html#factorySpreadGraph">factorySpreadGraph</a></li></ul> </nav> <div id="main"> <h1 class="page-title">SpreadGraph</h1> <section> <header> <h2> SpreadGraph </h2> </header> <article> <div class="container-overview"> <h4 class="name" id="SpreadGraph"><span class="type-signature"></span>new SpreadGraph<span class="signature">(collection, fields, config)</span><span class="type-signature"></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>collection</code></td> <td class="type"> </td> <td class="description last"><p>A pointer to the collection dannymineobhodimye daapteru to work with the graph. This may be a connection to the SQL database and table name, for example, or a collection of Mongo.</p></td> </tr> <tr> <td class="name"><code>fields</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>Comparison of the data in the collection of data in the graph. It is necessary for the adapter.</p></td> </tr> <tr> <td class="name"><code>config</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>Additional config.</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>constantField</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last"><p>Constant field in graph</p></td> </tr> <tr> <td class="name"><code>variableField</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last"><p>Spreadable field in graph</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="spread.js.html">spread.js</a>, <a href="spread.js.html#line20">line 20</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="_spreadingHandler"><span class="type-signature"></span>_spreadingHandler<span class="signature">(prevSpreadLink<span class="signature-attributes">opt</span>, pathGraph<span class="signature-attributes">opt</span>, pathLink<span class="signature-attributes">opt</span>, newSpreadLink, context<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> <p>Default spreading handler. If spread specified link allowed, callback it link, else callback undefined.</p> </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>prevSpreadLink</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>pathGraph</code></td> <td class="type"> <span class="param-type"><a href="PathGraph.html">PathGraph</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>pathLink</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>newSpreadLink</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>context</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type"><a href="SpreadGraph.html#~_spreadingHandlerCallback">SpreadGraph~_spreadingHandlerCallback</a></span> </td> <td class="attributes"> &lt;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="spread.js.html">spread.js</a>, <a href="spread.js.html#line40">line 40</a> </li></ul></dd> </dl> <h4 class="name" id="_unspreadingHandler"><span class="type-signature"></span>_unspreadingHandler<span class="signature">(spreadLink, context<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> <p>Default unspreading handler. If unspread specified link allowed, callback it link, else callback undefined. It called in cases of dispute. When respread, if this method not replaced, will be respreaded all spread links.</p> </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>spreadLink</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>context</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type"><a href="SpreadGraph.html#~_unspreadingHandlerCallback">SpreadGraph~_unspreadingHandlerCallback</a></span> </td> <td class="attributes"> &lt;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="spread.js.html">spread.js</a>, <a href="spread.js.html#line59">line 59</a> </li></ul></dd> </dl> <h4 class="name" id="insert"><span class="type-signature"></span>insert<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Parent insert with parser of context.process.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="spread.js.html">spread.js</a>, <a href="spread.js.html#line73">line 73</a> </li></ul></dd> </dl> <h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>The method is strictly designed so that the class inherits from ExistedGraph. Adds to process field custom value from context.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="spread.js.html">spread.js</a>, <a href="spread.js.html#line84">line 84</a> </li></ul></dd> </dl> <h3 class="subsection-title">Type Definitions</h3> <h4 class="name" id="~_spreadingHandlerCallback"><span class="type-signature"></span>_spreadingHandlerCallback<span class="signature">(newSpreadLink<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> <p>Responce from _spreadingHandler method.</p> </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>newSpreadLink</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;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="spread.js.html">spread.js</a>, <a href="spread.js.html#line44">line 44</a> </li></ul></dd> </dl> <h4 class="name" id="~_unspreadingHandlerCallback"><span class="type-signature"></span>_unspreadingHandlerCallback<span class="signature">(premission<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> <p>Responce from _unspreadingHandler method.</p> </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>premission</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> true </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="spread.js.html">spread.js</a>, <a href="spread.js.html#line63">line 63</a> </li></ul></dd> </dl> </article> </section> </div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Sun Dec 04 2016 20:09:10 GMT+0000 (UTC) using the Minami theme. </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>