Skip to content

wikipathways/Snorql-UI

 
 

Repository files navigation

Snorql-UI - A SPARQL Explorer

Simple SPARQL query interface based on the original idea of kurtjx/SNORQL and adapted from the fork eccenca/SNORQL

The purpose of this project is to develop a fully new UI implementation for Snorql that uses the latest web standards for HTML5, CSS3 and JQuery, and add new productivity features to facilitate query retrieval and sharing.

Live Demo of Snorql-UI: Demo 1 Demo 2

Features

  1. Modern web UI built with HTML5, Bootstrap and JQuery.
  2. Responsive design with wonderful look on mobiles and tablets.
  3. Text editor CodeMirror for the SPARQL query with awesome features like SPARQL syntax highlighter, line numbering and bracket matching.
  4. SPARQL examples panel that can fetch SPARQL queries (.rq extension) from any GitHub repository on the fly and execute them against the SPARQL endpoint of your choice.
  5. Export query results into multiple file formats.
  6. Generate short URLs for your queries for easy sharing.
  7. No need for any backend programming language!! it is totally a front end application.

GitHub Examples URL

Get a URL for a query with JavaScript

  • if you want to get a URL for your query (automatically generated for example) without using the permanent link, then you can use the following JavaScript code:
// the SPARQL endpoint URL followed by the query variable 'q'
let endpoint = "https://sparql.wikipathways.org/?q=";

// The SPARQL query itself
let sparql = `SELECT DISTINCT ?dataset (str(?titleLit) as ?title) ?date ?license 
WHERE {
   ?dataset a void:Linkset ;
   dcterms:title ?titleLit .
   OPTIONAL {
	 ?dataset dcterms:license ?license ;
	   pav:createdOn ?date .
   }
}`;
			
// create the URL from the endpoint URL and the URI-encoded query string
let encodedQueryUrl = endpoint + encodeURI(sparql);

// now, encodedQueryUrl can be used for your own purpose

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.2%
  • HTML 21.1%
  • CSS 1.7%
  • Shell 1.3%
  • Dockerfile 0.7%