This work has been carried out within Optique, a European research project that aims to provide non-IT end users an access to information in large and complex data stores. A prototypical query formulation interface OptiqueVQS has been implemented as a part of Optique project. OptiqueVQS is an ontology-based visual query system that provides end-users an opportunity to formulate queries according to their needs without having any technical expertise. This interface supports visual query formulation where users can navigate among different concepts and create a graph/tree structure. This interface then converts these visual queries into SPARQL queries and retrieves information from underlying data sources. What is missing is a possibility to author/edit/formulate SPARQL queries in textual format. A system where queries can be formulated in both textual and visual format and are in comprehensive synchronization with each other will enable domain experts and technical specialists to formulate complex queries in collaboration. This thesis aims to develop such a system.