Download / SemwidgQL

Download SemwidgQL for JavaScript

If you want to use the SemwidgQL library independently of SemwidgJS, you can download it here. You do not need this library file if you already use SemwidgJS. It is already integrated there.

Usage:

var sparqlQueries = SemwidgQL.toSparql(semwidgQuery, prefixes, resources, throwExceptions);

semwidgQuery is a string that contains the SemwidgQL query.

prefixes can be null or an array of SemwidgQL.Prefix elements: new SemwidgQL.Prefix(prefixString, uriString);

resources can be null or an array of SemwidgQL.NamedResource elements: new SemwidgQL.NamedResource(nameString, uriString);

throwException can be null or a boolean that indicates if an exception should be thrown when it comes to an error. If set to false, the exception message will be logged in the console and null will be returned.

The function returns an array of strings. Each string contains a SPARQL query. You will only receive a single query, except you concat several SemwidgQL queries by a | character.

Newest version (loading...)

All versions

Download SemwidgQL for Java (beta)

If you want to translate SemwidgQL queries to SPARQL in Java, you can download a beta version of the library here. Since dates are handled differently in Java as in JavaScript, the pseudo-filter expressions that handle times and dates might not work as expected yet.

Usage:

Add lib/antlr-3.5.2-complete-no-st3.jar to you build path.

ArrayList<String> sparqlQueries = org.semwidg.semwidgql.SemwidgQL.toSparql(query, prefixes, namedResources);

semwidgQuery is a string that contains the SemwidgQL query.

prefixes can be null or an ArrayList of SemwidgQL.Prefix elements: new org.semwidg.semwidgql.Prefix(prefixString, uriString);

resources can be null or an ArrayList of SemwidgQL.NamedResource elements: new org.semwidg.semwidgql.NamedResource(nameString, uriString);

The function returns an ArrayList of strings. Each string contains a SPARQL query. You will only receive a single query, except you concat several SemwidgQL queries by a | character.

Newest version (loading...)

All versions