Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/query/woqlBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,11 @@ WOQLQuery.prototype.nuke = function (graphRef) {
};

/**
*
* @param {string|Var} node - The IRI of a node or a variable containing an IRI which will
* be the subject of the builder functions
* @param {typedef.FuntionType} [type] - Optional type of builder function to build
* (default is triple)
* @returns {WOQLQuery} - A WOQLQuery which contains the partial Node pattern matching expression
* @example
*/

WOQLQuery.prototype.node = function (node, type) {
Expand Down
4 changes: 2 additions & 2 deletions lib/query/woqlDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function convert(obj) {

/**
* @param {string} name The variable name
* @returns
* @returns {Var}
*/
function Var(name) {
this.name = name;
Expand All @@ -108,7 +108,7 @@ function Var(name) {
let uniqueVarCounter = 0;
/**
* @param {string} name The variable name
* @returns
* @returns {VarUnique}
*/
function VarUnique(name) {
uniqueVarCounter += 1;
Expand Down
15 changes: 4 additions & 11 deletions lib/query/woqlQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class WOQLQuery extends WOQLCore {
* @param {typedef.GraphRef} [graphRef] Resource String identifying the graph which will
* be used for subsequent chained schema calls
* @returns {WOQLQuery} A WOQLQuery which contains the partial Graph pattern matching expression
* @example
*/
graph(graphRef) { return this; }

Expand Down Expand Up @@ -127,31 +126,27 @@ class WOQLQuery extends WOQLCore {
/**
* @param {boolean} tf
* @returns {object}
* @example
*/
boolean(tf) { return {}; }

/**
* @param {string} s
* @returns {object}
* @example
*/
string(s) { return {}; }

/**
* @param {any} s
* @param {string} t
* @returns {object}
* @example

*/
literal(s, t) { return {}; }

/**
* @param {string} s
* @returns {object}
* @example
*/

* @param {string} s
* @returns {object}
*/
iri(s) { return {}; }

// eslint-disable-next-line no-underscore-dangle
Expand Down Expand Up @@ -1181,7 +1176,6 @@ WOQLQuery.prototype.idgenerator = WOQLQuery.prototype.idgen;
* @param {string} prefix - prefix for the generated ID
* @param {string} outputVar - variable that stores the generated ID
* @returns {WOQLQuery} A WOQLQuery which contains the random ID generation pattern
* @example
* idgen_random("Person/", "v:person_id")
*/
WOQLQuery.prototype.idgen_random = function (prefix, outputVar) {
Expand Down Expand Up @@ -1439,7 +1433,6 @@ WOQLQuery.prototype.length = function (inputVarList, resultVarName) {
* @param {number|string|Var} start - The start index (0-based, supports negative indices)
* @param {number|string|Var} [end] - The end index (exclusive, optional - defaults to list length)
* @returns {WOQLQuery} A WOQLQuery which contains the Slice pattern matching expression
* @example
* let [result] = vars("result")
* slice(["a", "b", "c", "d"], result, 1, 3) // result = ["b", "c"]
* slice(["a", "b", "c", "d"], result, -2) // result = ["c", "d"]
Expand Down
4 changes: 2 additions & 2 deletions lib/viewer/frameRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const TerminusRule = require('./terminusRule');

/**
* @typedef {import('../typedef').Frame} Frame
* @typedef {Object} Frame
*/

/**
Expand All @@ -26,7 +26,7 @@ Object.setPrototypeOf(FrameRule.prototype, TerminusRule.TerminusRule.prototype);

/**
* Returns an array of rules that match the paased frame
* @param {[FrameRule]} rules - array of rules to be tested
* @param {Array<FrameRule>} rules - array of rules to be tested
* @param {Frame | object} frame - document frame, object frame, or property frame to be tested
* @param {function} [onmatch] - optional function to be called with args (frame, rule)
* on each match
Expand Down
4 changes: 1 addition & 3 deletions lib/viewer/objectFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const WOQL = require('../woql');
* doc.loadJSON(json_frames, cls) //console.log(this.document)
* doc.loadDataFrames(json_frames, cls)
* doc.loadClassFrames(json_frames, cls)
* @example
*
* @description Represents a frame for programmatic access to object frame,
* anywhere within a document
* Recursive data structure where this.children contains an indexed array of object frames
Expand All @@ -49,7 +47,7 @@ const WOQL = require('../woql');
* @param classframe - an array of frames representing a class
* @param archetypes list of class frames
* @param parent parent object
* @returns
* @returns {ObjectFrame}
*/

function ObjectFrame(cls, jsonld, classframes, parent) {
Expand Down
2 changes: 1 addition & 1 deletion lib/viewer/woqlChooser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const UTILS = require('../utils');
const { WOQLRule } = require('./woqlRule');

/**
* @typedef {import('../woqlClient')} WOQLClient
* @typedef {Object} WOQLClient
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/viewer/woqlResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const WOQL = require('../woql');
const WOQLQ = require('./woqlPaging');

/**
* @typedef {import('../query/woqlCore')} WOQLQuery
* @typedef {Object} WOQLQuery
*/

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/viewer/woqlRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Object.setPrototypeOf(WOQLRule.prototype, TerminusRule.TerminusRule.prototype);

/**
* Specifies that the rule only applies to specific variables returned by the WOQL query
* @param {[String]} - array of strings, each representing a variable name, variable prefixes
* @param {Array<string>} vars - array of strings, each a variable name, variable prefixes
* ("v:") are added automatically if absent
*/
WOQLRule.prototype.setVariables = function (vars) {
Expand Down Expand Up @@ -80,7 +80,7 @@ WOQLRule.prototype.rownum = function (rownum) {

/**
* Specifies that the value of a variable must be one of the values contained in the list
* @param {[String|Number]} list - parameters are any atomic value (string | number) -
* @param {...(string|number)} list - parameters are any atomic value (string | number) -
* the rule will match only cells that have one of these values
*/
WOQLRule.prototype.in = function (...list) {
Expand Down Expand Up @@ -223,7 +223,7 @@ WOQLPattern.prototype.prettyPrint = function () {

/**
* @param {String|Object} data
* @param {String|[String, String]} [key] - a variable or an array of two variables
* @param {string|Array<string>} [key] - a variable or an array of two variables
* (in the case of edge scope) which constitutes the key being tested
* @param {String} [scope] - the scope in which the test is being carried out (row, column, cell)
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/viewer/woqlStream.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const WOQLStreamConfig = require('./streamConfig');

/**
* @typedef {import('../woqlClient')} WOQLClient
* @typedef {Object} WOQLClient
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/woqlClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const WOQL = require('./woql');
const WOQLQuery = require('./query/woqlCore');

/**
* @typedef {import('./typedef').NamedResourceData} NamedResourceData
* @typedef {Object} NamedResourceData
*/

/**
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"webpack-dev-server": "^5.2.1"
},
"scripts": {
"mkdocs:docs": "npx jsdoc --template ./jsdoc-terminusdb-template --recurse ./lib/ > docs.json",
"mkdocs:multi": "node ./docs/createDocs.js",
"mkdocs:src": "docco lib/*.js -l plain -x md -o docs/api",
"mkdocs:api": "jsdoc2md --configure docs/doc_config.json --partial docs/partial/scope.hbs docs/partial/member-index.hbs docs/partial/header.hbs --helper docs/helper/format.js --files lib/woql.js lib/woqlClient.js lib/typedef.js > docs/api/api.js.md",
Expand Down