A Sparql Editor As An Eclipse Plug In Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

The semantic web is in my opinion a revolution in the world of the Internet. At the moment as far as the internet is concerned, computers are only used to present information to us, but the reasoning of this information has to be done by us people. The Semantic web, which is an evolution of the current web, aims to give information on the web better semantics, enabling the computer to understand the information on the Internet. This in turn opens new doors for us users and the whole experience of finding and interacting with information on the web which interests us becomes a much easier and enjoyable task.

Sparql is a query language for the Semantic web. The Semantic web uses ontologies for structuring information and Sparql is used to query these ontologies. Sparql queries can be written by humans to query ontologies so that relationships among data concepts can be identified. In the not too distant future, Sparql can be used by intelligent agents to query information on the web and return the results to the user, like a type of personal assistant for the web.

Eclipse is arguably the most popular development environment used in industry today. A developer can author a range of different software including applications for the Semantic web using the Jena framework. The ability to be able to develop such a broad number of different types of software is largely down to the ability to use plug-ins with eclipse. These plug-ins extend the functionality of eclipse by allowing the user to develop software using technologies for which the plug-in was created for. There is currently no plug-in for Sparql in eclipse.

As the semantic web is becoming increasingly important, the need to write queries will become unavoidable. Therefore, there should be a Sparql plug-in for eclipse as Sparql is a major semantic web technology and eclipse is a major development platform. One could ask why Sparql queries are not written in a text editor or other application and the answer is simple, Sparql queries can become very complex very quickly, which in turn makes it easy to produce mistakes. A Sparql editor in eclipse will help the user to create syntactically correct queries which can then be used to query ontologies. Using Jena, Ontologies can already be loaded in eclipse. The proposed Sparql editor and Jena's ability to load Ontologies can complement one another when developing semantic web applications.

Project Aims

The main aims for this project are:

Create Sparql editor as a plug-in for eclipse

Editor must prevent the user from creating syntactically incorrect Sparql queries

The editor must allow the user to write any and all types of queries, regardless of complexity

The editor must be able to save and load the files which contain the queries

The editor itself must be easy to use

The editor must make the task of writing Sparql queries easy

The editor itself must be attractive when writing queries i.e. syntax highlighting, underlining errors etc.

The queries must be able to execute on an ontology

If time allows, extending the plug-in to work with Protégé 4 as well as eclipse

Project Objectives

The main Objectives for this project are:

Define the EBNF grammar in Xtext to be used by the editor to check the correctness of the queries

Successfully compile the grammar and execute it (Generate Xtext Artefacts successfully).

Edit the Xtext editor sub-project in order to customise its appearance by writing java files

Add additional functionality to the editor by writing additional java files e.g. keyword description, automatic indentation etc.

Use the Jena framework in order to load ontologies

Write code necessary in java sing the Jena framework to execute Sparql queries on ontologies

Write the code necessary to return the results of these queries to the user

Deploy Xtext project as a plug-in

Main Challenges

In my opinion there are three main challenges I must meet in order to complete this project. The first one is to learn about EBNF in its entirety. EBNF or Extended Backus-Naur Form is a language for creating grammars. This is important to learn as I will need the EBNF of Sparql as the base of my editor. The EBNF of Sparql will be inputted into Xtext and will be used to check the correctness of the queries that are inputted by the user.

The second main challenge of this project is to learn about eclipse plug-in development in its entirety. Once the Xtext editor is functional I must learn how to customise the user interface and extend the base editor that is provided by Xtext so that it is much more attractive, much easier to use and so that it provides additional features to help the user whilst writing Sparql queries. All these extensions will be created using Java.

The third main challenge is to learn about the Jena framework in its entirety. This framework is used with Java to load ontologies into eclipse. Once the ontologies are loaded they can be queried using the Sparql queries written in the editor. Finally the results from these queries must be formatted and returned to the user. Also, using Jena, concepts and relationships can be added or deleted to/from ontologies. In Sparql 1.1 there is an Update capability, so Jena's ability to added/remove concepts and relationships will be useful for this.

Technologies to be used

One of the main technologies that will be used for this project is Xtext. Xtext is a plug-in for eclipse that allows the user to create programming languages. The language in my case is Sparql. Just like how an editor for java or any other programming language works, it will check for syntactic correctness by comparing the input to the production rules specified in the grammar. The editor can then be further customised using java to provide an IDE for Sparql.

The other main technology to use for my project as mentioned above is Java. The base editor provided by Xtext, although functional, is very basic and not that attractive. Using java one can edit the editor to provide more functionality, such as an inbuilt feature to load ontologies and execute queries over them. I will also be required to use the Jena framework with Java, which is a framework for creating applications for the semantic web, to be able to use ontologies in eclipse and to query them.

Literature Review

http://www.w3.org/TR/2010/WD-sparql11-query-20100601 - This link provides the documentation for the current version of Sparql which is version 1.1. It explains all the Sparql concepts in detail as well as provides the EBNF grammar of Sparql 1.1.

http://www.cambridgesemantics.com/2008/09/sparql-by-example/#(1) - Provides a presentation about Sparql explaining all the key concepts in detail.

http://www.garshol.priv.no/download/text/bnf.html - This link provides information on BNF and EBNF and how the production rules are parsed.

http://www.antlr.org/wiki/display/ANTLR3/Quick+Starter+on+Parser+Grammars+-+No+Past+Experience+Required - Provides another source of information about EBNF.

http://www.eclipse.org/Xtext/documentation/ - This link provides access to the Xtext documentation as well as other tutorials, presentations and webinars and will be a valuable resource throughout my project, through the early stages of defining the grammar in Xtext to the latter stages of editor customisation.

http://www.opentox.org/data/documents/development/RDF%20files/JavaOnly/query-reasoning-with-jena-and-sparql - This link provides an example as to how to use Sparql in Java with Jena.

http://exmo.inrialpes.fr/software/psparql/ - Provides information about an extension to Sparql where regular expressions can be used in the predicate part of a Sparql query. The grammar for the extensions is also provided through this link.

http://www.w3.org/TR/sparql11-update/ - This link talks about the Sparql Update functionality which was introduced in Sparql 1.

http://www.eclipsepluginsite.com/ - This site provides a tutorial into eclipse plug-in development. This will be particularly useful when the time comes for me to customise my editor.

http://jena.sourceforge.net/ - This link is the home page for Jena, the semantic web framework. From the home page I can access the documentation as well as download and install the Jena framework on my machine.

http://www.mt-ag.com/uploads/media/Implementation_and_Integration_of_a_DSL.pdf - This link provides a pdf which contains a use case of how to use Xtext in Eclipse.

Time scales

The Time scale for my project is as follows (Starting from week 3):

By the end of week 3: To have defined the grammar in Xtext and have the basic Sparql editor working, also to prepare for Milestone 1

By the end of week4: Research plug-in customisation in more detail, start customisation of the editor and to start the Interim report

By then end of week 5: Continue and Complete the Interim report. Continue customising editor.

By then end of week 6: Continue Customising editor

By the end of week 7: Prepare for Milestone 2 and finalise editor.

By the end of week 8: Start Dissertation Draft and research ways to integrate plug-in with Protégé 4.

By the end of week 9: Continue Dissertation draft and complete Protégé 4 integration

By the end of week 10: Complete Dissertation draft and start final dissertation

By the end of week 11: Complete Final Dissertation and Prepare for Viva

By the end of week 12 : To have completed all aspects of my dissertation