We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use SPARQL with JS components?

About SPARQL:

The SPARQL is a query language for databases that helps to retrieve and manipulate data stored in Resource Description Framework format. SPARQL allows a query to have triple patterns, conjunctions, disjunctions, and optional patterns.

A SPARQL query comprises of:

Prefix declarations

Used for abbreviating URIs

Dataset definition

states the type of RDF graph(s) are being queried

A result clause

identifies the information returned from the query

The query pattern

specifies query for the underlying dataset

Query modifiers

slicing, ordering, and rearranging query results

The SPARQL manipulates and returns data in different formats. They are,

How to Use SPARQL with our JS Components:

All our Essential JS data Source Components receives the data in the format of JSON. You can use SPARQL Query that returns the data in the JSON format to initialize the data for JS data source controls.

The following steps explains how to create our Essential JS DropDownList component by getting the data from SPARQL Query.

Solution

  1. To render your JS components, you need to refer to the following code example that contains the scripts and theme files.

HTML

 

Refer to the following common user guide for JavaScript to know more about getting started with our components. The “Concepts and features” section under each components explains about the features of the particular component. Refer to the following link.

Link: http://help.syncfusion.com/web

SPARQL requires the following dependency files. You need to include the following dependency files to use SPARQL query with your JS components.

  • jquery.sparql.js
  • urlEncode.js

You can download both the JavaScript dependency library files from the following link:

https://github.com/jgeldart/jquery-sparql

  1. The following code example describes the declaration of your JS DropDownList component

 

  1. The following code example explains how to declare and form a SPARQL query by using JavaScript and how to retrieve the data that is assigned to your JS DropDownList control.

 

 

The above sample describes the SPARQL support with your JS DropdownList control. You can download the sample from the following location.

 

Sample Link: Sample

Article ID: Published Date: Last Revised Date: Platform: Control:
3069 01/02/2015 01/02/2015 JavaScript General
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon