sparqlalgebrajs
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -92,2 +92,2 @@ "use strict"; | ||
exports.default = Factory; | ||
//# sourceMappingURL=Factory.js.map | ||
//# sourceMappingURL=factory.js.map |
@@ -6,10 +6,10 @@ import * as Algebra from './algebra'; | ||
* @param sparql - Either a SPARQL string or an object generated by sparql.js | ||
* @param options - Options object. Current options: | ||
* * dataFactory: The Datafactory used to generate terms | ||
* * quads?: Boolean indicating whether triples should be converted to Quads (consumes GRAPH statements) | ||
* @param options - Optional options object. Current options: | ||
* * dataFactory: The Datafactory used to generate terms. Default rdf-data-model. | ||
* * quads: Boolean indicating whether triples should be converted to Quads (consumes GRAPH statements). Default false. | ||
* @returns {Operation} | ||
*/ | ||
export default function translate(sparql: any, options: { | ||
dataFactory: RDF.DataFactory; | ||
export default function translate(sparql: any, options?: { | ||
dataFactory?: RDF.DataFactory; | ||
quads?: boolean; | ||
}): Algebra.Operation; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const factory_1 = require("./factory"); | ||
const DataFactory = require("rdf-data-model"); | ||
const Parser = require('sparqljs').Parser; | ||
@@ -16,9 +17,10 @@ const isEqual = require('lodash.isequal'); | ||
* @param sparql - Either a SPARQL string or an object generated by sparql.js | ||
* @param options - Options object. Current options: | ||
* * dataFactory: The Datafactory used to generate terms | ||
* * quads?: Boolean indicating whether triples should be converted to Quads (consumes GRAPH statements) | ||
* @param options - Optional options object. Current options: | ||
* * dataFactory: The Datafactory used to generate terms. Default rdf-data-model. | ||
* * quads: Boolean indicating whether triples should be converted to Quads (consumes GRAPH statements). Default false. | ||
* @returns {Operation} | ||
*/ | ||
function translate(sparql, options) { | ||
factory = new factory_1.default(options.dataFactory); | ||
options = options || {}; | ||
factory = new factory_1.default(options.dataFactory || DataFactory); | ||
return translateQuery(sparql, options.quads); | ||
@@ -25,0 +27,0 @@ } |
{ | ||
"name": "sparqlalgebrajs", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Convert SPARQL to SPARL algebra", | ||
@@ -16,2 +16,3 @@ "author": "Joachim Van Herwegen", | ||
"n3": "^0.11.2", | ||
"rdf-data-model": "^1.0.0", | ||
"sparqljs": "^1.5.2" | ||
@@ -30,3 +31,2 @@ }, | ||
"pre-commit": "^1.2.2", | ||
"rdf-data-model": "^1.0.0", | ||
"typescript": "^2.5.3" | ||
@@ -33,0 +33,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38870
11
868
8
5
+ Addedrdf-data-model@^1.0.0
+ Addedrdf-data-model@1.0.0(transitive)