Mastro in Protégé!
Protégé is the world's most popular and widely-used ontology editor. It offers a free and open-source environment for editing OWL 2 and RDF ontologies. Protégé is Java-based and is extensible through plug-ins. Now users can access all the features provided by the Mastro system, plus many more, such as mapping editing, through the Mastro Protégé Plug-in.
The Mastro Reasoner for DL-Lite ontologies implements the common interface of ontology reasoners in Protégé, providing all required services, beginning with classification, meaning the inference of a subsumption hierarchy for the classes described in the ontology, along with satisfiability checking of the ontology and of all its elements. The Mastro Reasoner, on startup, also approximates the ontology to conform to the DL-Lite language (if necessary), and initialises the data structures that are required to perform OBDA query answering.
The Mapping Editor allows to create, modify, and inspect a full Mastro mapping specification. Through a guided and easy-to-use interface, users can define views and mappings: the former are named SQL queries, while the latter are assertions, or rules, that link elements of the ontology to the SQL queries in the views. Through these mappings and views, the mapping specification defines the exact correspondence between the data in the sources and the classes and relations in the ontology.
The Query Engine handles all query answering-related operations. It provides an interface to define and document SPARQL queries over the ontology, and allows to save the queries in the query catalog, through which the user can see the ontology or mapping rewriting of the selected query, execute the query and see its results, possibly exporting them to file, or delete the query from the catalog.
Using the Plug-in
Starting the Reasoner
The Mastro DL-Lite Reasoner can be selected in Protégé's Reasoner menu. Upon startup, to operate the reasoner needs a mapping file (in XML format), which can be either pre-existing, or can be created through the Plug-in. If no path to a mapping file is provided in the Mastro Configuration View, then the plug-in will automatically search for, and load, a mappings.xml file in the same directory as the active ontology.
The Mastro Mappings View
The Mastro Mappings View manages the mapping specification, allowing to create, open, save a mapping file.
A mapping can be inspected, edited, or deleted from the Mappings panel. Adding or editing a mapping will open a Mapping Editor dialog through which the ID, description, predicate, SQL View, and the functor or template of the mapping can be selected.
Any modification of the mappings will require saving the mapping file to take effect.
The Mastro SQL Views View
The SQL Views panel manages the SQL views that are used in the mappings. Adding or editing an SQL view will open an SQL View Editor dialog through which the name and SQL query of the view can be defined.
Additionally, Key Dependencies, Inclusion Dependencies, and Denial Constraints can be defined for the SQL Views. These constraints optimize Mastro's performance during query answering.
Any modification of the SQL views will require saving the mapping file to take effect.
The Mastro SPARQL Query View
The Mastro SPARQL Query View is used to query the Mastro OBDA System. It contains the following panels:
- Query Editor allows to create new queries, specifying a valid identifier and a valid SPARQL query. If a query is selected from the Query Catalog the fields are automatically filled.
- Query Execution Details shows the results for the selected query results, allows to export the results of a query in a CSV file, and also provides other details of the query execution such as the Ontology Rewritings and the Mapping Rewritings.
- Query Catalog allows to save and load SPARQL queries from a catalog.
The Data Quality Checking View
The Mastro Data Quality Checking View allows to verify the quality of the data in the datasource with respect to the constraints defined in the ontology.
The user can select one or more disjointness and functionality constraint among those defined in the ontology, and for each constraint, Mastro queries the database in search of violations. If any violation is found, it is shown to the user in the Data Quality Check Witnesses panel.