Skip to content

Latest commit

 

History

History

sparql

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

#The Jassa SPARQL module

Introduction

This module provides classes for creating SPARQL queries. It mimics some of the SPARQL classes of the Apache Jena project.

Example Usage of the sparql module

The sparql module contains several classes for the syntactic representation of SPARQL queries. In addition to the Query class, there alse exist the Expr and Element class hierarchies known from Apache Jena.

var rdf = jassa.rdf;
var sparql = jassa.sparql;

var query = new sparql.Query();
var s = rdf.NodeFactory.createVar("s");
var p = rdf.NodeFactory.createVar("p");
var o = rdf.NodeFactory.createVar("o");

var triple = new rdf.Triple(s, p, o);

query.setQueryPattern(new sparql.ElementTriplesBlock([triple]));
query.setResultStar(true);
query.setLimit(10);

console.log("QueryString: " + query);

Misc

These resources are useful entry points to see which SPARQL classes are available: