@@ -259,6 +259,39 @@ WOQLQuery.prototype.value = function (a, b, c) {
259
259
return this ;
260
260
} ;
261
261
262
+ /**
263
+ * @description Creates a pattern matching rule for a quad [Subject, Predicate, Object, Graph]
264
+ * or for a triple [Subject, Predicate, Object]
265
+ * add extra information about the type of the value object
266
+ * @param {string } subject - The IRI of a triple’s subject or a variable
267
+ * @param {string } predicate - The IRI of a property or a variable
268
+ * @param {string | number | boolean } objValue - an specific value
269
+ * @param {string } [graph] - specify a graph type, default is instance schema|instance
270
+ */
271
+ /* WOQLQuery.prototype.value = function (subject, predicate, objValue, graph) {
272
+ if (typeof objValue === 'string') {
273
+ objValue = this.string(objValue);
274
+ } else if (typeof objValue === 'number') {
275
+ objValue = this.literal(objValue, 'xsd:decimal');
276
+ } else if (typeof objValue === 'boolean') {
277
+ objValue = this.literal(objValue, 'xsd:boolean');
278
+ }
279
+ if (graph) {
280
+ return this.quad(subject, predicate, objValue, graph);
281
+ }
282
+ return this.triple(subject, predicate, objValue);
283
+ };
284
+
285
+ WOQLQuery.prototype.link = function (a, b, c, g) {
286
+ if (typeof c === 'string') {
287
+ c = this.iri(c);
288
+ }
289
+ if (g) {
290
+ return this.quad(a, b, c, g);
291
+ }
292
+ return this.triple(a, b, c);
293
+ }; */
294
+
262
295
WOQLQuery . prototype . quad = function ( a , b , c , g ) {
263
296
if ( this . cursor [ '@type' ] ) this . wrapCursorWithAnd ( ) ;
264
297
const args = this . triple ( a , b , c ) ;
0 commit comments