Query
Query your topic map
In Kamala, it is possible to create queries on your topic map and use them for management reports. Or you use your query to observe changes in particular items on a daily basis by placing the result of a query on your dashboard.
The Query page
In the top menu is a link to the Query page. The first tab shows the available queries, the results are shown on the right. The second tab, editor , is the place to create and update your queries. Your access level might block you from using the editor in some topic maps. The top left pane is the editing area, the bottom left pane shows your stored queries and the right pane shows the query results.
Query languages
Kamala supports two query languages:
- Tolog: a logical language based on SQL+Prolog (Tolog tutorial)
- TMQL: the ISO standardized query language for Topic Maps (TMQL)
Examples
The following Tolog query is a simple query to start using on your topic map if you have a few topic types with instances.
instance-of($Topic, $Type)?
To create a list of all persons in your topic map, you can use:
using i for i"http://en.wikipedia.org/wiki/"
instance-of($Person, i:person)?
Note that i:person is a prefixed identifier, see the Tolog tutorial above.
April 2, 2013