Asking SBQL queries addressing imported XML files

Short manual by Kazimierz Subieta

 

General

The demo allows you to import any number of XML files to the ODRA store in the M0 store model (no classes). You can also see the content of a given XML file on a IDE pane. After the import you can ask SBQL queries and observe their results. The demo contains the following files:

The XML importer is implemented in such a way that no information contained in the original XML file is lost in its M0 store model representation. In some cases this assumption implies inconveniencies in asking SBQL queries they are a bit more complex. In particular, due to XML attributes each atomic value from an XML file is wrapped into an object named _VALUE. This implies that an SBQL reference to such a atomic value must be ended by dot and _VALUE; see examples. Note also that XML attributes id and idref are mapped as pointer links between objects, giving the possibility to use SBQL path expressions.

 

Getting started (be sure you have installed the Java environment)

  1. Start IDE by double clicking jOdra2-IDE.jar
  2. On left you see Workspace(0). Click it by right mouse button and then select Create a new project.
  3. On the new window enter the project name or accept the default name New Project 1.
  4. On the new window accept the default location of the project file or introduce an own location.
  5. On the left you see New Project 1 (or another project name). Click it by the right mouse button and then select Add existing file. Then navigate to the file deptemp.xml (or to another XML file).
  6. Double click New Project 1 (or another project name) and then double click the name of the chosen XML file (e.g. deptemp.xml). The text of the file is displayed in the central window.
  7. Choose New Project 1 by right mouse button and choose Server <Not connected> by right button and then choose Start default. The ODRA server will be activated
  8. In the same place choose by the right button Import data using plugin.
  9. In the new window you have to choose Plugin -> XML importer ( be careful, this is not a default), file name deptemp.xml (or another one) and then press OK.
  10. Press Reload to load the admin module (the default module in which the data is created).
  11. Ask SBQL queries in the window below and observe the results. They can be copied to clipboard (by right mouse button) and then pasted to Notepad, Word, etc.