Skip to content

Commit a83d7c9

Browse files
committed
Turn on support for SPARQL-star in sparqljs Parser
1 parent 420e955 commit a83d7c9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/graph/node/input/SparqlInputNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class SparqlInputNode extends CodeNode {
99

1010
inputNodePreRun() {
1111
try {
12-
new SparqlParser().parse(this.getValue())
12+
new SparqlParser({ sparqlStar: true }).parse(this.getValue())
1313
} catch (err) {
1414
let msg = err.message.split("...")[0]
1515
msg = msg.substring(0, msg.length - 2)

src/graph/node/processor/SparqlSelectExecNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class SparqlSelectExecNode extends TableNode {
1818
async processIncomingData() {
1919
try {
2020
let sparql = this.incomingData.filter(port => port.dataType === PORT.SPARQL)[0].data
21-
let queryObj = new SparqlParser().parse(sparql)
21+
let queryObj = new SparqlParser({ sparqlStar: true }).parse(sparql)
2222
if (queryObj.queryType !== "SELECT") {
2323
return this.handleError("Only SPARQL SELECT queries are supported")
2424
}

src/graph/node/view/GraphVisuNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class GraphVisuNode extends Node {
5353
}
5454

5555
async processSparqlData(sparql) {
56-
let ast = new SparqlParser().parse(sparql) // abstract syntax tree
56+
let ast = new SparqlParser({ sparqlStar: true }).parse(sparql) // abstract syntax tree
5757
if (ast.queryType !== "SELECT") {
5858
this.handleError("Only SPARQL SELECT queries are supported for now")
5959
return { nodes: [], links: [] }

0 commit comments

Comments
 (0)